Implements ghost overtime which makes the timer slow down near end of round when the ghost is held. Note that this depends on nt_ghostcap v1.9.0.
Ghost overtime is also implemented as a stand-alone plugin, but requires tight integration with the comp plugin due to interactions with pause etc. Both plugins should not be used at the same time.
The overtime is controlled by four new cvars
sm_competitive_ghost_overtime (Default: 45)
Controls in seconds the maximum amount of overtime that can be added to the base clock.
sm_competitive_ghost_overtime_grace (Default: 15)
Controls at how many seconds on the clock the overtime kicks in.
Controls whether the grace time should be reset when picking up the ghost. The grace time will never be reset fully, but instead set to what the timer would have been at if the ghost had been held from when the timer showed sm_competitive_ghost_overtime_grace. I.e. a round can never be extended by more than what sm_competitive_ghost_overtime is set to.
There are two modes for the timer decay. By default the decay is linear, but by setting this cvar to 1 the time will decay exponentially, moving slowly to begin with and then faster and faster as the timer reaches 0. This means that the grace period will remain long for longer which may make sense in conjuction with the setting above.
To illustrate how the timer behaves with default settings:
Ghost overtime kicks in at 15 seconds on the clock and will add a maximum of 45 seconds to the round. This gives us a total of 15 + 45 = 60 seconds for the timer of 15 seconds to decay. 60 / 15 = 4, meaning each second on the clock during ghost overtime will last for 4 real seconds.
Ghost is picked up at 15 seconds and is held for 16 seconds. The timer shows 10 (15 - 16/4 = 11, rounded down to 10 for simplicity).
The ghost is dropped, making the timer speed up.
8 seconds later the ghost is picked up again. Since grace reset is enabled, the timer jumps from 2 to 8 seconds (10 - 8/4 = 8).
Note that the upcoming tournament (Winter Warzone 2023) will have grace reset disabled.
This pull request also contains a change to use the m_iGameState prop instead of round time to determine whether the round has ended, with regards to player kills.
Implements ghost overtime which makes the timer slow down near end of round when the ghost is held. Note that this depends on nt_ghostcap v1.9.0.
Ghost overtime is also implemented as a stand-alone plugin, but requires tight integration with the comp plugin due to interactions with pause etc. Both plugins should not be used at the same time.
The overtime is controlled by four new cvars
To illustrate how the timer behaves with default settings:
Ghost overtime kicks in at 15 seconds on the clock and will add a maximum of 45 seconds to the round. This gives us a total of 15 + 45 = 60 seconds for the timer of 15 seconds to decay. 60 / 15 = 4, meaning each second on the clock during ghost overtime will last for 4 real seconds.
Note that the upcoming tournament (Winter Warzone 2023) will have grace reset disabled.
This pull request also contains a change to use the m_iGameState prop instead of round time to determine whether the round has ended, with regards to player kills.