hedgewars/uScript.pas
changeset 13764 c46998ecd8fa
parent 13752 f1c66a34f2fe
child 13778 e2d902745fd5
equal deleted inserted replaced
13763:29abd3d5f9bb 13764:c46998ecd8fa
  3734 // TODO: Remove this behaviour in a future version.
  3734 // TODO: Remove this behaviour in a future version.
  3735 currentTTL:= TurnTimeLeft;
  3735 currentTTL:= TurnTimeLeft;
  3736 currentRTL:= ReadyTimeLeft;
  3736 currentRTL:= ReadyTimeLeft;
  3737 newTTL:= ScriptGetInteger('TurnTimeLeft');
  3737 newTTL:= ScriptGetInteger('TurnTimeLeft');
  3738 newRTL:= ScriptGetInteger('ReadyTimeLeft');
  3738 newRTL:= ScriptGetInteger('ReadyTimeLeft');
  3739 if currentTTL <> newTTL then
  3739 if (currentTTL <> newTTL) and (not isPendingTurnTimeLeft) then
  3740     begin
  3740     begin
  3741     TurnTimeLeft:= newTTL;
  3741     TurnTimeLeft:= newTTL;
  3742     LuaWarning('Writing to TurnTimeLeft directly is deprecated! Use SetTurnTimeLeft instead!');
  3742     LuaWarning('Writing to TurnTimeLeft directly is deprecated! Use SetTurnTimeLeft instead!');
  3743     end;
  3743     end;
  3744 
  3744 
  3745 if currentRTL <> newRTL then
  3745 if (currentRTL <> newRTL) and (not isPendingReadyTimeLeft) then
  3746     begin
  3746     begin
  3747     ReadyTimeLeft:= newRTL;
  3747     ReadyTimeLeft:= newRTL;
  3748     LuaWarning('Writing to ReadyTimeLeft directly is deprecated! Use SetReadyTimeLeft instead!');
  3748     LuaWarning('Writing to ReadyTimeLeft directly is deprecated! Use SetReadyTimeLeft instead!');
  3749     end;
  3749     end;
  3750 
  3750