xp_inactivitySpectator and server-side demos
Hello,
I'm currently making an engine patch to allow server-side demos recording on OpenArena (which patch should be easily portable to ioquake3), and I face a problem with xp_inactivitySpectator, which sets democlients to spectators (because of course democlients aren't real clients but simulated clients).
So I would like to know more informations on this cvar: how does it work? On what field does it bases its timing?
I assumed that it was based on about the same principle as g_inactivity, so I added the simulation of usercmd_t, but it doesn't work better...
Thank you for reading me,
GrosBedo
It must be something like this ( but with xp_inactivitySpectator instead of g_inactivity ) -->
Make sure that your simulated usercmd_t packets are read from within GAME_CLIENT_THINK vmcall. It will reset the timer if either forwardmove or rightmove or upmove or BUTTON_ATTACK was nonzero right before GAME_RUN_FRAME. It will also ignore the timer if SVF_BOT flag was set or userinfo IP is "localhost".
this -->
It seems not, at first I thought it was a similar approach that was taken for xp_inactivitySpectator as g_inactivity, but since replaying usercmd_t packets (and so user movement) does not break the timer, I think it must rely on something else than user movement.
Can an E+ dev give some more details please?