From: Ketmar Dark Date: Sun, 3 Sep 2017 17:05:07 +0000 (+0300) Subject: "suicide" console command now works in singleplayer mode X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;h=1c315223c6dbddff71a842f83a5bb1ef7ff5c6cb;p=d2df-sdl.git "suicide" console command now works in singleplayer mode --- 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