summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6d7e09e)
raw | patch | inline | side by side (parent: 6d7e09e)
author | Stas'M <x86corez@gmail.com> | |
Thu, 25 Jul 2019 17:05:45 +0000 (20:05 +0300) | ||
committer | Stas'M <x86corez@gmail.com> | |
Thu, 25 Jul 2019 17:05:45 +0000 (20:05 +0300) |
src/game/g_console.pas | patch | blob | history |
diff --git a/src/game/g_console.pas b/src/game/g_console.pas
index b5e771091280eeaaa43be238aedaea15d8b7b72c..fd7c36612ffca0daf6f7ad87daf7ba292502ae6c 100644 (file)
--- a/src/game/g_console.pas
+++ b/src/game/g_console.pas
procedure intVarHandler (me: PCommand; p: SSArray);
- procedure binaryFlag (var flag: Boolean; msg: AnsiString);
- begin
- if (Length(p) > 2) then
- begin
- conwritefln('too many arguments to ''%s''', [p[0]]);
- end
- else
- begin
- case conGetBoolArg(p, 1) of
- -1: begin end;
- 0: if not me.cheat or conIsCheatsEnabled then flag := false else begin conwriteln('not available'); exit; end;
- 1: if not me.cheat or conIsCheatsEnabled then flag := true else begin conwriteln('not available'); exit; end;
- 666: if not me.cheat or conIsCheatsEnabled then flag := not flag else begin conwriteln('not available'); exit; end;
- end;
- if (Length(msg) = 0) then msg := p[0] else msg += ':';
- if flag then conwritefln('%s tan', [msg]) else conwritefln('%s ona', [msg]);
- end;
- end;
begin
if (Length(p) <> 2) then
begin