mirror of
https://github.com/ChocoTaco1/TacoServer.git
synced 2026-07-16 00:24:35 +00:00
Added Gamepoint
This commit is contained in:
parent
a86b1e5f2c
commit
116e6f9061
1 changed files with 35 additions and 14 deletions
|
|
@ -926,21 +926,42 @@ function SCtFGame::flagCap(%game, %player)
|
||||||
//call the AI function
|
//call the AI function
|
||||||
%game.AIflagCap(%player, %flag);
|
%game.AIflagCap(%player, %flag);
|
||||||
|
|
||||||
//if this cap didn't end the game, play the announcer...
|
//Determine score status
|
||||||
if ($missionRunning)
|
%caplimit = MissionGroup.CTF_scoreLimit;
|
||||||
|
%otherteam = ( %client.team == 1 ) ? 2 : 1;
|
||||||
|
//Find out caps from score
|
||||||
|
%clientteamcaps = mFloor($TeamScore[%client.team] / %game.SCORE_PER_TEAM_FLAG_CAP);
|
||||||
|
%otherteamcaps = mFloor($TeamScore[%otherteam] / %game.SCORE_PER_TEAM_FLAG_CAP);
|
||||||
|
|
||||||
|
//Determine Gamepoint
|
||||||
|
if(%clientteamcaps >= (%caplimit - 1))
|
||||||
{
|
{
|
||||||
if (%game.getTeamName(%client.team) $= 'Inferno')
|
if(%clientteamcaps == %otherteamcaps)
|
||||||
messageAll("", '~wvoice/announcer/ann.infscores.wav');
|
%scorestatus = "tied";
|
||||||
else if (%game.getTeamName(%client.team) $= 'Storm')
|
else
|
||||||
messageAll("", '~wvoice/announcer/ann.stoscores.wav');
|
%scorestatus = "gamepoint";
|
||||||
else if (%game.getTeamName(%client.team) $= 'Phoenix')
|
}
|
||||||
messageAll("", '~wvoice/announcer/ann.pxscore.wav');
|
else
|
||||||
else if (%game.getTeamName(%client.team) $= 'Blood Eagle')
|
%scorestatus = "normal";
|
||||||
messageAll("", '~wvoice/announcer/ann.bescore.wav');
|
|
||||||
else if (%game.getTeamName(%client.team) $= 'Diamond Sword')
|
//if this cap didn't end the game, play the announcer...
|
||||||
messageAll("", '~wvoice/announcer/ann.dsscore.wav');
|
if($missionRunning)
|
||||||
else if (%game.getTeamName(%client.team) $= 'Starwolf')
|
{
|
||||||
messageAll("", '~wvoice/announcer/ann.swscore.wav');
|
switch$(%scorestatus)
|
||||||
|
{
|
||||||
|
case normal:
|
||||||
|
//classic uses only storm/inferno
|
||||||
|
if(%game.getTeamName(%client.team) $= 'Inferno')
|
||||||
|
messageAll("", '~wvoice/announcer/ann.infscores.wav');
|
||||||
|
else if(%game.getTeamName(%client.team) $= 'Storm')
|
||||||
|
messageAll("", '~wvoice/announcer/ann.stoscores.wav');
|
||||||
|
case tied:
|
||||||
|
//Announce tied message
|
||||||
|
messageAll("", '~wvoice/announcer/ann.closegame_03.wav');
|
||||||
|
case gamepoint:
|
||||||
|
//Announce gamepoint
|
||||||
|
messageAll("", '~wvoice/announcer/ann.gamepoint_imminent.wav');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue