From 8f1c6849cd34e572ddba50b719d9540dce976e6c Mon Sep 17 00:00:00 2001 From: ChocoTaco1 Date: Thu, 3 Sep 2020 18:46:02 -0400 Subject: [PATCH] Update LakRabbitGame.cs Different method for the cant pickup flag message --- Classic/scripts/LakRabbitGame.cs | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/Classic/scripts/LakRabbitGame.cs b/Classic/scripts/LakRabbitGame.cs index c70fa75..da79d4a 100644 --- a/Classic/scripts/LakRabbitGame.cs +++ b/Classic/scripts/LakRabbitGame.cs @@ -1768,11 +1768,6 @@ function LakRabbitGame::playerDroppedFlag(%game, %player) } } -function ResetCantPickUpFlag(%player) -{ - %player.client.CantPickUpFlag = false; -} - function LakRabbitGame::playerTouchFlag(%game, %player, %flag) { if(%player.getState() $= "Dead" || %player.client.flagDeny) @@ -1781,11 +1776,11 @@ function LakRabbitGame::playerTouchFlag(%game, %player, %flag) // borlak - can't pick up flag until 2 ppl are on if(PlayingPlayers() < 2) { - if(!%player.client.CantPickUpFlag) + %timeDif = getSimTime() - %player.client.pickUpTime; + if(%timeDif > 5000 || !%player.client.pickUpTime) { messageClient(%player.client, 'msgNoFlagWarning', "\c2You can't pick up the flag until another person joins." ); - %player.client.CantPickUpFlag = true; - schedule(5000, 0, "ResetCantPickUpFlag", %player ); //message only every 5 seconds + %player.client.pickUpTime = getSimTime(); } return; }