Improved Flag waypoints

This commit is contained in:
ChocoTaco 2019-01-22 14:41:49 -05:00
parent e5ef88b4ca
commit 5b10f583bb

View file

@ -19,6 +19,7 @@
// v3.33 January 2019 // v3.33 January 2019
// Took out slap headshot. // Took out slap headshot.
// Added footnotes for voting references with evo admin mod. // Added footnotes for voting references with evo admin mod.
// An improved Flag-Waypoint
// //
// v3.32 December 2018 // v3.32 December 2018
// Fixed an issue with lak vote items in the Evo Admin Votemenu // Fixed an issue with lak vote items in the Evo Admin Votemenu
@ -158,14 +159,17 @@ function Flag::objectiveInit(%data, %flag)
} }
// create a waypoint to the flag's starting place // create a waypoint to the flag's starting place
%flagWaypoint = new WayPoint() if( $Host::ShowFlagIcon == 0 )
{ {
position = %flag.position; %flagWaypoint = new WayPoint()
rotation = "1 0 0 0"; {
name = "Flag Home"; position = %flag.position;
dataBlock = "WayPointMarker"; rotation = "1 0 0 0";
team = $NonRabbitTeam; name = "Flag Home";
}; dataBlock = "WayPointMarker";
team = $NonRabbitTeam;
};
}
$AIRabbitFlag = %flag; $AIRabbitFlag = %flag;
@ -1528,7 +1532,7 @@ function LakRabbitGame::playerDroppedFlag(%game, %player)
// ilys -- remove flag icon from player // ilys -- remove flag icon from player
if($Host::ShowFlagIcon == 1 || $Host::ShowFlagIcon == 2) if($Host::ShowFlagIcon == 1 || $Host::ShowFlagIcon == 2)
{ {
setTargetSensorGroup(%flag.getTarget(), $NonRabbitTeam); setTargetSensorGroup(%flag.getTarget(), $Observer);
%player.scopeWhenSensorVisible(false); %player.scopeWhenSensorVisible(false);
%target = %player.getTarget(); %target = %player.getTarget();
setTargetRenderMask(%target, getTargetRenderMask(%target) & ~0x2); setTargetRenderMask(%target, getTargetRenderMask(%target) & ~0x2);
@ -1690,11 +1694,11 @@ function LakRabbitGame::playerTouchFlag(%game, %player, %flag)
// ilys -- add flag icon to player // ilys -- add flag icon to player
if($Host::ShowFlagIcon == 1 || $Host::ShowFlagIcon == 2) if($Host::ShowFlagIcon == 1 || $Host::ShowFlagIcon == 2)
{ {
setTargetSensorGroup(%flag.getTarget(), $RabbitTeam); //setTargetSensorGroup(%flag.getTarget(), $RabbitTeam);
%player.scopeWhenSensorVisible(true); //%player.scopeWhenSensorVisible(true);
%target = %player.getTarget(); //%target = %player.getTarget();
setTargetRenderMask(%target, getTargetRenderMask(%target) | 0x2); //setTargetRenderMask(%target, getTargetRenderMask(%target) | 0x2);
setTargetAlwaysVisMask(%target, 0x7); //setTargetAlwaysVisMask(%target, 0x7);
} }
%flag.isHome = false; %flag.isHome = false;
$flagStatus = %client.name; $flagStatus = %client.name;