Discussion:
[hlcoders] Source 2010 (Swarm) - env_slomo breaks demos
Ben Lubar
2016-09-07 05:14:18 UTC
Permalink
Is there a known way to fix timescale changing entities (env_slomo,
asw_weapon_stim, asw_marine deathcam) causing recorded demos to stutter a
lot?

What appears to be happening is interpolation not understanding timescales.
If I play the demo using the timedemo command, interpolation is disabled
and the animations stutter a lot less (but they aren't interpolated, so
it's not ideal). cl_extrapolate seems to have no effect on the stuttering.

Is this something I can fix in my mod or is it an unavoidable bug in the
engine?

Thanks,
Ben Lubar
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please visit:
https://list.valvesoftware.com/cgi-bin/mailman/listinfo/hlcoders
Björn Stabel
2016-09-12 16:50:06 UTC
Permalink
I don't know what env_slomo does or is, but the way that Double Action:
Boogaloo does slow motion is by giving each player a local slowmo state.
It transfers to other players in their PVS, transitively.

Works well in multiplayer without necessarily affecting everyone each
time someone goes into slow motion.

I haven't tried demos yet, but the game is free to play so you can
download it (on Steam) to see if you can replicate your issue there.

slow motion is on the "C" key. use the "reflexes" skill/perk in order to
get 1s of slow motion right from the start.
Post by Ben Lubar
Is there a known way to fix timescale changing entities (env_slomo,
asw_weapon_stim, asw_marine deathcam) causing recorded demos to stutter a
lot?
What appears to be happening is interpolation not understanding timescales.
If I play the demo using the timedemo command, interpolation is disabled
and the animations stutter a lot less (but they aren't interpolated, so
it's not ideal). cl_extrapolate seems to have no effect on the stuttering.
Is this something I can fix in my mod or is it an unavoidable bug in the
engine?
Thanks,
Ben Lubar
_______________________________________________
https://list.valvesoftware.com/cgi-bin/mailman/listinfo/hlcoders
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please visit:
https://list.valvesoftware.com/cgi-bin/mailman/listinfo/hlcoders
Ben Lubar
2016-09-12 18:25:22 UTC
Permalink
Ah, I thought I had replied to this when I made the fix, but apparently I
forgot.

https://gist.github.com/BenLubar/e4396da5cfa6597f4605433ba74642a1

Here's the commit message I used when I added this to Reactive Drop:

GameTimescale is used by env_slomo, asw_weapon_stim, and the marine
deathcam to slow down time. The problem is that this also scales demo
playback in the engine. This is a hack to work around the issue by setting
demo_timescale to the reciprocal of GameTimescale and then scaling
gpGlobals->curtime and gpGlobals->frametime appropriately so that all the
timescales line up where we want them.
Post by Björn Stabel
Boogaloo does slow motion is by giving each player a local slowmo state.
It transfers to other players in their PVS, transitively.
Works well in multiplayer without necessarily affecting everyone each
time someone goes into slow motion.
I haven't tried demos yet, but the game is free to play so you can
download it (on Steam) to see if you can replicate your issue there.
slow motion is on the "C" key. use the "reflexes" skill/perk in order to
get 1s of slow motion right from the start.
Post by Ben Lubar
Is there a known way to fix timescale changing entities (env_slomo,
asw_weapon_stim, asw_marine deathcam) causing recorded demos to stutter a
lot?
What appears to be happening is interpolation not understanding
timescales.
Post by Ben Lubar
If I play the demo using the timedemo command, interpolation is disabled
and the animations stutter a lot less (but they aren't interpolated, so
it's not ideal). cl_extrapolate seems to have no effect on the
stuttering.
Post by Ben Lubar
Is this something I can fix in my mod or is it an unavoidable bug in the
engine?
Thanks,
Ben Lubar
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives,
https://list.valvesoftware.com/cgi-bin/mailman/listinfo/hlcoders
_______________________________________________
https://list.valvesoftware.com/cgi-bin/mailman/listinfo/hlcoders
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please visit:
https://list.valves

Loading...