553 local statusText, scoreText |
553 local statusText, scoreText |
554 if roundNumber >= roundLimit then |
554 if roundNumber >= roundLimit then |
555 statusText = loc("Game over!") |
555 statusText = loc("Game over!") |
556 scoreText = loc("Final team scores:") |
556 scoreText = loc("Final team scores:") |
557 else |
557 else |
558 AddCaption(string.format(loc("Rounds complete: %d/%d"), roundNumber, roundLimit), 0xFFFFFFFF, capgrpMessage) |
558 AddCaption(string.format(loc("Rounds complete: %d/%d"), roundNumber, roundLimit), capcolDefault, capgrpMessage) |
559 return |
559 return |
560 end |
560 end |
561 local displayTime |
561 local displayTime |
562 if roundNumber >= roundLimit then |
562 if roundNumber >= roundLimit then |
563 displayTime = 20000 |
563 displayTime = 20000 |
574 for i = 0, (numhhs-1) do |
574 for i = 0, (numhhs-1) do |
575 if GetHogTeamName(hhs[i]) == winnerTeam then |
575 if GetHogTeamName(hhs[i]) == winnerTeam then |
576 SetState(hhs[i], bor(GetState(hhs[i]), gstWinner)) |
576 SetState(hhs[i], bor(GetState(hhs[i]), gstWinner)) |
577 end |
577 end |
578 end |
578 end |
579 AddCaption(string.format(loc("%s wins!"), winnerTeam), 0xFFFFFFFF, capgrpGameState) |
579 AddCaption(string.format(loc("%s wins!"), winnerTeam), capcolDefault, capgrpGameState) |
580 SendStat(siGameResult, string.format(loc("%s wins!"), winnerTeam)) |
580 SendStat(siGameResult, string.format(loc("%s wins!"), winnerTeam)) |
581 |
581 |
582 for i = 1, TeamsCount do |
582 for i = 1, TeamsCount do |
583 SendStat(siPointType, loc("points")) |
583 SendStat(siPointType, loc("points")) |
584 SendStat(siPlayerKills, tostring(teamStats[i].score), teamStats[i].name) |
584 SendStat(siPlayerKills, tostring(teamStats[i].score), teamStats[i].name) |
1277 TimeLeft = 0 |
1277 TimeLeft = 0 |
1278 end |
1278 end |
1279 |
1279 |
1280 if (TimeLeft == 0) then |
1280 if (TimeLeft == 0) then |
1281 if PlayerIsFine() then |
1281 if PlayerIsFine() then |
1282 AddCaption(loc("Time's up!"), 0xFFFFFFFF, capgrpGameState) |
1282 AddCaption(loc("Time's up!"), capcolDefault, capgrpGameState) |
1283 end |
1283 end |
1284 if (stopMovement == false) then --time to stop the player |
1284 if (stopMovement == false) then --time to stop the player |
1285 stopMovement = true |
1285 stopMovement = true |
1286 boosterOn = false |
1286 boosterOn = false |
1287 beam = false |
1287 beam = false |