DEADSOFTWARE

net: a more elegant solution for d_*
[d2df-sdl.git] / src / game / g_game.pas
index ebe014424a6183f8ae20d93dc30bb924f0d2a76f..4f6f82a0066413bcc989c3d57d915c0add00b696 100644 (file)
@@ -774,6 +774,19 @@ end;
 function g_Game_IsNet(): Boolean;
 begin
   Result := (gGameSettings.GameType in [GT_SERVER, GT_CLIENT]);
+
+  if gGameSettings.GameType in [GT_SERVER, GT_CLIENT] then
+  begin
+    // set debug options to false to avoid cheaters
+    g_debug_Sounds := False;
+    g_debug_Frames := False;
+    g_debug_WinMsgs := False;
+    g_debug_MonsterOff := False;
+    g_debug_BotAIOff := 0;
+    g_debug_HealthBar := False;
+    g_Debug_Player := False;
+    Exit;
+  end;
 end;
 
 function g_Game_IsServer(): Boolean;
@@ -5768,7 +5781,7 @@ begin
       a := StrToIntDef(p[1], 0);
       g_Force_Model_Set(a);
     end
-  end  
+  end
   else if cmd = 'g_force_model_name' then
   begin
     if (Length(P) > 1) then