hedgewars/uChat.pas
changeset 15272 22f2fd8a3d2c
parent 14783 bbec6b28d072
child 15288 c4fd2813b127
--- a/hedgewars/uChat.pas	Thu Jul 25 16:29:14 2019 +0300
+++ b/hedgewars/uChat.pas	Mon Jul 22 19:26:58 2019 +0200
@@ -35,7 +35,8 @@
 procedure TextInput(var event: TSDL_TextInputEvent);
 
 implementation
-uses uInputHandler, uTypes, uVariables, uCommands, uUtils, uTextures, uRender, uIO, uScript, uRenderUtils, uLocale;
+uses uInputHandler, uTypes, uVariables, uCommands, uUtils, uTextures, uRender, uIO, uScript, uRenderUtils, uLocale
+     {$IFDEF USE_VIDEO_RECORDING}, uVideoRec{$ENDIF};
 
 const MaxStrIndex = 27;
       MaxInputStrLen = 200;
@@ -548,7 +549,15 @@
 
     if (copy(s, 2, 3) = 'lua') then
         begin
+        LuaCmdUsed:= true;
         AddFileLog('/lua issued');
+{$IFDEF USE_VIDEO_RECORDING}
+        if flagPrerecording then
+            begin
+            AddFileLog('Force-stopping prerecording! Lua commands can not be recorded');
+            StopPreRecording;
+            end;
+{$ENDIF}
         if gameType <> gmtNet then
             begin
             liveLua:= (not liveLua);