Sync/save @tick/@time; make @time be based off of @tick

Closes Anuken/Mindustry-Suggestions/issues/2976
This commit is contained in:
Anuken
2021-09-22 19:35:15 -04:00
parent 6d41b894ab
commit 3f6d5b9dfe
5 changed files with 13 additions and 3 deletions

View File

@@ -57,9 +57,10 @@ public class LExecutor{
/** Runs a single instruction. */
public void runOnce(){
//set time
vars[varTime].numval = Time.millis();
vars[varTick].numval = Time.time;
//set up time; note that @time is now only updated once every invocation and directly based off of @tick.
//having time be based off of user system time was a very bad idea.
vars[varTime].numval = state.tick / 60.0 * 1000.0;
vars[varTick].numval = state.tick;
//reset to start
if(vars[varCounter].numval >= instructions.length || vars[varCounter].numval < 0){