Page 1 of 1

Freeze CMD: Frozen Actors still do certain actions

PostPosted: Wed May 15, 2019 3:46 pm
by XxMiltenXx
Actors will still perform overriden Tick() when frozen.

Code: Select allExpand view
   override void Tick()
   {
      angle += 4;
      SetXYZ((Pos.X + 0.1, Pos.Y, Pos.Z));
      A_LogFloat(angle);
      Super.Tick();
   }


Testable Example is attached.
Start a Level in Doom
Open the Console
Summon Turner
Freeze or Give PowerTimeFreeze

The Actor will still turn and move, even though it shouldn't.

Re: Freeze CMD: Frozen Actors still do certain actions

PostPosted: Wed May 15, 2019 4:10 pm
by Arctangent
You've got it backwards: it's not that the game checks for whether or not an actor is frozen and calls Tick() based on that, Tick() itself checks if the actor is frozen and just doesn't do anything if it is. Subsequently, any code in an Tick() override will run regardless if it doesn't check for that itself.

Re: Freeze CMD: Frozen Actors still do certain actions

PostPosted: Wed May 15, 2019 4:43 pm
by Graf Zahl
More to the point, even when frozen, Tick still runs some actions. This cannot be disabled globally. Tick needs to be called and a Tick override needs to check itself and ensure that the base function still performs the needed actions.

Re: Freeze CMD: Frozen Actors still do certain actions

PostPosted: Wed May 15, 2019 4:52 pm
by XxMiltenXx
Ah, thanks for the clarification, I wasn't aware of that. Sorry for the false report then.