DEADSOFTWARE

"suicide" console command now works in singleplayer mode
authorKetmar Dark <ketmar@ketmar.no-ip.org>
Sun, 3 Sep 2017 17:05:07 +0000 (20:05 +0300)
committerKetmar Dark <ketmar@ketmar.no-ip.org>
Sun, 3 Sep 2017 17:06:20 +0000 (20:06 +0300)
src/game/g_game.pas

index a377122e143a16bf6b443b54e6fc381cb8ea9e07..a85ad9af2ab7362961e28449b46f8dc125f6467e 100644 (file)
@@ -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