Why not something more like:
Code: Select all
Time_Freeze (bool state, fixed freezetime, fixed slowtime)
if
state is
TRUE,
freezetime would be used to determine how long the freeze lasts, with
0 meaning it lasts forever until it's toggled off with
state = FALSE;
slowtime would determine how long the "slow effect" (that matrix'y effect when the time powerup is wearing off) lasts and would add onto
freezetime. If
freezetime is negative and
slowtime is
0, the slow effect lasts until
state = FALSE.
Somewhat more complicated, but a LOT more flexible that way. But then again, the perfect solution for this would be to have something like:
Like Unreal has, where the game speed is set directly, with
1.0 being normal,
0.5 being half,
2.0 being double, etc. If you wanted to freeze the game, you'd just call
Game_Speed (
FALSE).