More Flag-Waypoint options

This commit is contained in:
ChocoTaco 2019-01-23 09:00:46 -05:00
parent 7186d6dff8
commit cdd1c8783c

View file

@ -11,6 +11,7 @@
//Sounds for regular & special hits //Sounds for regular & special hits
//Points based on difficulty, speed, and distance //Points based on difficulty, speed, and distance
//Duel Mode forces rabbit to fight and rewards for killing //Duel Mode forces rabbit to fight and rewards for killing
//Stand and fight to get the most points.
//--- GAME RULES END --- //--- GAME RULES END ---
// Thanks for helping me test! // Thanks for helping me test!
@ -19,11 +20,10 @@
// 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 // 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
// Took out waypoint sound.
// //
// v3.31 October 2018 // v3.31 October 2018
// Adjusted the flag updater code so its more like the way it was. A little harder to catch. Down from 10 times a second to 2. // Adjusted the flag updater code so its more like the way it was. A little harder to catch. Down from 10 times a second to 2.
@ -113,9 +113,9 @@
// Vars: // Vars:
// $Host::ShowFlagIcon // $Host::ShowFlagIcon
// 0 - Don't show // 0 - Don't show any
// 1 - Scope when sensor visible // 1 - Show flag icon when flag dropped only
// 2 - Do not scope when sensor visible // 2 - Show flag icon on rabbit
// //
// $Host::LakRabbitPubPro // $Host::LakRabbitPubPro
// 0 - Disable LakPro features // 0 - Disable LakPro features
@ -150,9 +150,9 @@ function Flag::objectiveInit(%data, %flag)
%flag.rotate = true; %flag.rotate = true;
// ilys -- add the icon to the flag // ilys -- add the icon to the flag
if($Host::ShowFlagIcon == 1) if( $Host::ShowFlagIcon == 1 || $Host::ShowFlagIcon == 2 )
{ {
%flag.scopeWhenSensorVisible(false); %flag.scopeWhenSensorVisible(true);
setTargetSensorGroup(%flag.getTarget(), $NonRabbitTeam); setTargetSensorGroup(%flag.getTarget(), $NonRabbitTeam);
setTargetRenderMask(%flag.getTarget(), getTargetRenderMask(%flag.getTarget()) | 0x2); setTargetRenderMask(%flag.getTarget(), getTargetRenderMask(%flag.getTarget()) | 0x2);
setTargetAlwaysVisMask(%flag.getTarget(), 0x7); setTargetAlwaysVisMask(%flag.getTarget(), 0x7);
@ -455,6 +455,7 @@ function Armor::damageObject(%data, %targetObject, %sourceObject, %position, %am
Game.playerDroppedFlag(%targetObject); Game.playerDroppedFlag(%targetObject);
//Added so cloak is turned off when slapped. //Added so cloak is turned off when slapped.
%targetObject.setCloaked(false); %targetObject.setCloaked(false);
%targetObject.freeDJ = 1;
} }
if(%sourceObject.holdingFlag && Game.duelMode) if(%sourceObject.holdingFlag && Game.duelMode)
{ {
@ -1533,16 +1534,17 @@ function LakRabbitGame::playerDroppedFlag(%game, %player)
if($Host::ShowFlagIcon == 1 || $Host::ShowFlagIcon == 2) if($Host::ShowFlagIcon == 1 || $Host::ShowFlagIcon == 2)
{ {
setTargetSensorGroup(%flag.getTarget(), $Observer); setTargetSensorGroup(%flag.getTarget(), $Observer);
%player.scopeWhenSensorVisible(false); %player.scopeWhenSensorVisible(true);
%target = %player.getTarget(); %target = %player.getTarget();
setTargetRenderMask(%target, getTargetRenderMask(%target) & ~0x2); setTargetRenderMask(%target, getTargetRenderMask(%target) & ~0x2);
setTargetAlwaysVisMask(%target, (1 << getTargetSensorGroup(%target))); setTargetAlwaysVisMask(%target, (1 << getTargetSensorGroup(%target)));
} }
if($Host::ShowFlagIcon == 1) //just always true
%flag.scopeWhenSensorVisible(true); //if( $Host::ShowFlagIcon == 1 )
else if($Host::ShowFlagIcon == 2) //%flag.scopeWhenSensorVisible(true);
%flag.scopeWhenSensorVisible(false); //else if($Host::ShowFlagIcon == 2)
//%flag.scopeWhenSensorVisible(false);
// borlak -- throw the flag, don't just drop it like dead weight // borlak -- throw the flag, don't just drop it like dead weight
// v3.1 -- in duel mode, make flag bounce up always, even if player isn't moving.. more midair grabs // v3.1 -- in duel mode, make flag bounce up always, even if player isn't moving.. more midair grabs
@ -1692,13 +1694,13 @@ function LakRabbitGame::playerTouchFlag(%game, %player, %flag)
cancel(%flag.returnThread); cancel(%flag.returnThread);
%flag.hide(true); %flag.hide(true);
// ilys -- add flag icon to player // ilys -- add flag icon to player
if($Host::ShowFlagIcon == 1 || $Host::ShowFlagIcon == 2) if( $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;
@ -1783,7 +1785,8 @@ function LakRabbitGame::resetFlag(%game, %flag)
$flagStatus = "<At Home>"; $flagStatus = "<At Home>";
%flag.hide(false); %flag.hide(false);
if($Host::ShowFlagIcon == 1 || $Host::ShowFlagIcon == 2) //so flag turns back green
if($Host::ShowFlagIcon == 1 || $Host::ShowFlagIcon == 2)
{ {
setTargetSensorGroup(%flag.getTarget(), $NonRabbitTeam); setTargetSensorGroup(%flag.getTarget(), $NonRabbitTeam);
} }
@ -2278,8 +2281,7 @@ function LakRabbitGame::showRabbitWaypoint(%game, %clRabbit)
%cl.sendTargetTo(%cl, true); %cl.sendTargetTo(%cl, true);
//send the "waypoint is here sound" //send the "waypoint is here sound"
//took out -choco messageClient(%cl, 'MsgRabbitWaypoint', '~wfx/misc/target_waypoint.wav');
//messageClient(%cl, 'MsgRabbitWaypoint', '~wfx/misc/target_waypoint.wav');
} }
//schedule the time to hide the waypoint //schedule the time to hide the waypoint