From 1c315223c6dbddff71a842f83a5bb1ef7ff5c6cb Mon Sep 17 00:00:00 2001 From: Ketmar Dark Date: Sun, 3 Sep 2017 20:05:07 +0300 Subject: [PATCH 1/1] "suicide" console command now works in singleplayer mode --- src/game/g_game.pas | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/game/g_game.pas b/src/game/g_game.pas index a377122..a85ad9a 100644 --- a/src/game/g_game.pas +++ b/src/game/g_game.pas @@ -6125,6 +6125,21 @@ begin Exit; end; end + else if cmd = 'suicide' then + begin + if gGameOn then + begin + if g_Game_IsClient then + MC_SEND_CheatRequest(NET_CHEAT_SUICIDE) + else + begin + if gPlayer1 <> nil then + gPlayer1.Damage(SUICIDE_DAMAGE, gPlayer1.UID, 0, 0, HIT_SELF); + if gPlayer2 <> nil then + gPlayer2.Damage(SUICIDE_DAMAGE, gPlayer2.UID, 0, 0, HIT_SELF); + end; + end; + end // Êîìàíäû Ñâîåé èãðû: else if gGameSettings.GameType in [GT_CUSTOM, GT_SERVER, GT_CLIENT] then begin @@ -6142,21 +6157,6 @@ begin else g_Bot_Add(TEAM_BLUE, 2); end - else if cmd = 'suicide' then - begin - if gGameOn then - begin - if g_Game_IsClient then - MC_SEND_CheatRequest(NET_CHEAT_SUICIDE) - else - begin - if gPlayer1 <> nil then - gPlayer1.Damage(SUICIDE_DAMAGE, gPlayer1.UID, 0, 0, HIT_SELF); - if gPlayer2 <> nil then - gPlayer2.Damage(SUICIDE_DAMAGE, gPlayer2.UID, 0, 0, HIT_SELF); - end; - end; - end else if cmd = 'spectate' then begin if not gGameOn then -- 2.29.2