DEADSOFTWARE

"mon_sq_enabled" console command
[d2df-sdl.git] / src / game / g_game.pas
index c09158d4428909d9041a06e6ea7b2b505f0f56ad..9edbcf0ed2f5c7d00cbba3850735174494a7419c 100644 (file)
@@ -1440,7 +1440,7 @@ var
   w: Word;
   i, b: Integer;
 
-  function sendMonsPos (monidx: Integer; mon: TMonster): Boolean;
+  function sendMonsPos (mon: TMonster): Boolean;
   begin
     result := false; // don't stop
     if (mon.MonsterType = MONSTER_BARREL) then
@@ -2442,7 +2442,7 @@ procedure DrawMinimap(p: TPlayer; RenderRect: e_graphics.TRect);
 var
   a, aX, aY, aX2, aY2, Scale, ScaleSz: Integer;
 
-  function monDraw (monidx: Integer; mon: TMonster): Boolean;
+  function monDraw (mon: TMonster): Boolean;
   begin
     result := false; // don't stop
     with mon do
@@ -4171,7 +4171,7 @@ procedure g_Game_RestartRound(NoMapRestart: Boolean = False);
 var
   i, n, nb, nr: Integer;
 
-  function monRespawn (monidx: Integer; mon: TMonster): Boolean;
+  function monRespawn (mon: TMonster): Boolean;
   begin
     result := false; // don't stop
     if not mon.FNoRespawn then mon.Respawn();
@@ -4995,6 +4995,17 @@ begin
     if gdbg_map_dump_coldet_tree_queries then g_Console_Add('grid coldet tree queries: tan') else g_Console_Add('grid coldet tree queries: ona');
     exit;
   end;
+
+  if (cmd = 'mon_sq_enabled') then
+  begin
+    case getBool(1) of
+      -1: begin end;
+       0: gmon_debug_use_sqaccel := false;
+       1: gmon_debug_use_sqaccel := true;
+    end;
+    if gmon_debug_use_sqaccel then g_Console_Add('accelerated monster coldet: tan') else g_Console_Add('accelerated monster coldet: ona');
+    exit;
+  end;
 end;
 
 procedure DebugCommands(P: SArray);