blob: 7eec7c89f267fca1980995fa5fa652b34ca3b64d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
global function GamemodePs_Init
void function GamemodePs_Init()
{
Riff_ForceTitanAvailability( eTitanAvailability.Never )
AddCallback_OnPlayerKilled( GiveScoreForPlayerKill )
ScoreEvent_SetupEarnMeterValuesForMixedModes()
SetTimeoutWinnerDecisionFunc( CheckScoreForDraw )
}
void function GiveScoreForPlayerKill( entity victim, entity attacker, var damageInfo )
{
if ( victim != attacker && victim.IsPlayer() && attacker.IsPlayer() || GetGameState() != eGameState.Playing )
AddTeamScore( attacker.GetTeam(), 1 )
}
int function CheckScoreForDraw()
{
if (GameRules_GetTeamScore(TEAM_IMC) > GameRules_GetTeamScore(TEAM_MILITIA))
return TEAM_IMC
else if (GameRules_GetTeamScore(TEAM_MILITIA) > GameRules_GetTeamScore(TEAM_IMC))
return TEAM_MILITIA
return TEAM_UNASSIGNED
}
|