summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 79066a3)
raw | patch | inline | side by side (parent: 79066a3)
author | TerminalHash <lyashuk.voxx@gmail.com> | |
Sat, 6 May 2023 22:49:26 +0000 (01:49 +0300) | ||
committer | TerminalHash <lyashuk.voxx@gmail.com> | |
Sat, 6 May 2023 22:49:26 +0000 (01:49 +0300) |
src/game/g_game.pas | patch | blob | history |
diff --git a/src/game/g_game.pas b/src/game/g_game.pas
index 34a387ab255c4a9fb8eefee58216c06dfca0a291..200a57a76ca77dee66710288ef1fd2b147eac7fa 100644 (file)
--- a/src/game/g_game.pas
+++ b/src/game/g_game.pas
CloseFile(s);
end;
+procedure ClearDebugCvars();
+begin
+ 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;
+end;
+
function g_Game_ModeToText(Mode: Byte): string;
begin
Result := '';
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;
g_Game_ClearLoading();
+ ClearDebugCvars();
+
// Íàñòðîéêè èãðû:
gGameSettings.GameType := GT_SERVER;
gGameSettings.GameMode := GameMode;
g_Game_ClearLoading();
+ ClearDebugCvars();
+
// Íàñòðîéêè èãðû:
gGameSettings.GameType := GT_CLIENT;