@@ -262,14 +262,59 @@ function OnMinigameEnd()
262262 local lives = Ware_GetPlayerSpecialRoundData (player). lives
263263 if (lives > 0 )
264264 player. RemoveCond (TF_COND_HALLOWEEN_GHOST_MODE)
265-
265+
266266 player. SetMoveType (MOVETYPE_WALK, 0 )
267267 player. SetCollisionGroup (COLLISION_GROUP_PUSHAWAY)
268268 player. RemoveCond (TF_COND_HALLOWEEN_KART)
269269 }
270270 Ware_MinigameHomeLocation. Teleport (Wipeout_Spectators)
271+
272+ AnnounceKnockouts ()
273+ }
274+
275+
276+ function AnnounceKnockouts ()
277+ {
278+ local knocked_out = 0
279+
280+ foreach (data in Ware_PlayersData)
281+ {
282+ local player = data. player
283+ local idx = Wipeout_ValidPlayers. find (player)
284+ if (idx == null )
285+ continue
286+
287+ local lives = Ware_GetPlayerSpecialRoundData (player). lives
288+ if (lives <= 0 )
289+ {
290+ knocked_out++
291+ Ware_ChatPrint (null , " {player}{color} has been {color}wiped out!" , player, " 9AB973" , COLOR_GREEN);
292+
293+ Wipeout_ValidPlayers. remove (idx)
294+ if (player. IsAlive ())
295+ Ware_SuicidePlayer (player)
296+ }
297+ }
298+
299+ local players_len = Wipeout_GetAlivePlayers (). len ()
300+
301+ if (knocked_out > 0 )
302+ {
303+ Ware_ChatPrint (null , " {int} {str} been knocked out! There are {int} {str} still standing." ,
304+ knocked_out,
305+ knocked_out > 1 ? " players have" : " player has" ,
306+ players_len,
307+ players_len == 1 ? " player" : " players" )
308+ }
309+ // else
310+ // {
311+ // Ware_ChatPrint(null, "No one has been knocked out! There are {int} {str} still standing.",
312+ // players_len,
313+ // players_len == 1 ? "player" : "players")
314+ // }
271315}
272316
317+
273318function OnDeclareWinners (top_players, top_score, winner_count)
274319{
275320 if (winner_count > 1 )
@@ -287,4 +332,12 @@ function OnDeclareWinners(top_players, top_score, winner_count)
287332 {
288333 Ware_ChatPrint (null , " {color}Nobody won!?" , TF_COLOR_DEFAULT)
289334 }
290- }
335+ }
336+
337+ function OnEnd ())
338+ {
339+ for (player in Ware_Players)
340+ {
341+ player. RemoveCond (TF_COND_HALLOWEEN_GHOST_MODE)
342+ }
343+ }
0 commit comments