More ObsFlag Things

This commit is contained in:
ChocoTaco1 2020-03-29 01:38:04 -04:00
parent 7477a11c2f
commit 76511f8938
4 changed files with 56 additions and 0 deletions

View file

@ -906,6 +906,18 @@ function SCtFGame::flagCap(%game, %player)
%client = %player.client;
%flag = %player.holdingFlag;
%flag.carrier = "";
// when a player cap the flag, continue observing the player
for(%i = 0; %i < ClientGroup.getCount(); %i++)
{
%cl = ClientGroup.getObject(%i);
if(%cl.team <= 0 && %cl.observingFlag && %cl.flagObsTeam == %flag.team)
{
%cl.observingFlag = false;
%cl.flagObserved = "";
%cl.flagObsTeam = "";
}
}
%held = %game.formatTime(getSimTime() - %game.flagHeldTime[%flag], false); // z0dd - ZOD, 8/15/02. How long did player hold flag?