hedgewars/uScript.pas
changeset 13766 c46998ecd8fa
parent 13754 f1c66a34f2fe
child 13812 e2d902745fd5
--- a/hedgewars/uScript.pas	Tue Sep 04 22:18:03 2018 +0200
+++ b/hedgewars/uScript.pas	Tue Sep 04 22:59:08 2018 +0200
@@ -3736,13 +3736,13 @@
 currentRTL:= ReadyTimeLeft;
 newTTL:= ScriptGetInteger('TurnTimeLeft');
 newRTL:= ScriptGetInteger('ReadyTimeLeft');
-if currentTTL <> newTTL then
+if (currentTTL <> newTTL) and (not isPendingTurnTimeLeft) then
     begin
     TurnTimeLeft:= newTTL;
     LuaWarning('Writing to TurnTimeLeft directly is deprecated! Use SetTurnTimeLeft instead!');
     end;
 
-if currentRTL <> newRTL then
+if (currentRTL <> newRTL) and (not isPendingReadyTimeLeft) then
     begin
     ReadyTimeLeft:= newRTL;
     LuaWarning('Writing to ReadyTimeLeft directly is deprecated! Use SetReadyTimeLeft instead!');