Added SCtFGame

This commit is contained in:
ChocoTaco1 2021-02-22 20:53:19 -05:00
parent 9915a45d66
commit 222d27dc00

View file

@ -132,8 +132,7 @@ if (!isActivePackage(PizzaThings))
function serverCmdObserveFirstFlag(%client) function serverCmdObserveFirstFlag(%client)
{ {
// works only for CTF if(Game.class !$= CTFGame || Game.class !$= SCtFGame)
if(Game.class !$= CTFGame)
return; return;
// client must be an observer // client must be an observer
@ -151,8 +150,7 @@ function serverCmdObserveFirstFlag(%client)
function serverCmdObserveSecondFlag(%client) function serverCmdObserveSecondFlag(%client)
{ {
// works only for CTF if(Game.class !$= CTFGame || Game.class !$= SCtFGame)
if(Game.class !$= CTFGame)
return; return;
// client must be an observer // client must be an observer
@ -176,7 +174,7 @@ function observeFlag(%client, %target, %type, %flagTeam)
if(!isObject(%client) || !isObject(%target) || !isObject(%client.camera)) if(!isObject(%client) || !isObject(%target) || !isObject(%client.camera))
return; return;
if(Game.class !$= CTFGame) if(Game.class !$= CTFGame || Game.class !$= SCtFGame)
return; return;
if(%client.team > 0) if(%client.team > 0)
@ -225,11 +223,11 @@ function observeFlag(%client, %target, %type, %flagTeam)
%found = false; %found = false;
for(%i = 0; %i < %count; %i++) for(%i = 0; %i < %count; %i++)
{ {
if(ClientGroup.getObject(%i) == %target) if(ClientGroup.getObject(%i) == %target)
{ {
%found = true; %found = true;
break; break;
} }
} }
if(!%found) if(!%found)
return; return;