mirror of
https://github.com/ChocoTaco1/TacoServer.git
synced 2026-07-16 00:24:35 +00:00
Added SCtFGame
This commit is contained in:
parent
9915a45d66
commit
222d27dc00
1 changed files with 8 additions and 10 deletions
|
|
@ -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;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue