mirror of
https://github.com/shavitush/bhoptimer.git
synced 2025-12-09 11:28:26 +00:00
set snapshot.fplayer_speedmod when checkpointing a bot so players don't get stuck
This commit is contained in:
parent
7a11acf2e6
commit
117d2d277c
@ -1497,14 +1497,15 @@ void SaveCheckpointCache(int target, cp_cache_t cpcache, bool actually_a_checkpo
|
||||
snapshot.fServerTime = GetEngineTime();
|
||||
snapshot.iSHSWCombination = -1;
|
||||
snapshot.iTimerTrack = Shavit_GetReplayBotTrack(target);
|
||||
snapshot.fTimescale = Shavit_GetStyleSettingFloat(snapshot.bsStyle, "timescale");
|
||||
snapshot.fTimescale = 1.0;
|
||||
snapshot.fplayer_speedmod = 1.0;
|
||||
|
||||
float ticks = (Shavit_GetReplayBotCurrentFrame(target) - Shavit_GetReplayCachePreFrames(target)) * snapshot.fTimescale;
|
||||
float ticks = float(Shavit_GetReplayBotCurrentFrame(target) - Shavit_GetReplayCachePreFrames(target));
|
||||
float fraction = FloatFraction(ticks);
|
||||
snapshot.iFullTicks = RoundFloat(ticks-fraction);
|
||||
snapshot.iFractionalTicks = RoundFloat(fraction * 10000.0);
|
||||
|
||||
cpcache.fSpeed = snapshot.fTimescale * Shavit_GetStyleSettingFloat(snapshot.bsStyle, "speed");
|
||||
cpcache.fSpeed = Shavit_GetStyleSettingFloat(snapshot.bsStyle, "timescale") * Shavit_GetStyleSettingFloat(snapshot.bsStyle, "speed");
|
||||
ScaleVector(cpcache.fVelocity, 1 / cpcache.fSpeed);
|
||||
cpcache.fGravity = Shavit_GetStyleSettingFloat(target, "gravity");
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user