This is a very old problem -- One to which no solution has yet been
found. The problem is with the viewmodel skipping and jerking in its
animation playback. I traced the problem to the server and client
fighting over m_flCycle, m_nSequence, m_flAnimTime, m_flPlaybackRate
networked variables. In particular, the client sets these variables and
then a short time later (lag time) the server also sets these variables
since they are networked. The result is an animation skip/jerk.

The obvious fix is to block the server from changing the value of these
variables and let the client do the viewmodel animation independantly
from the server. However, this is proving exceedingly difficult to do. I
changed the viewmodel class's send table as follows:

IMPLEMENT_SERVERCLASS_ST_NOBASE(CBaseViewModel, DT_BaseViewModel)
SendPropModelIndex(SENDINFO(m_nModelIndex)),
SendPropInt (SENDINFO(m_nBody), 8),
SendPropInt (SENDINFO(m_nSkin), 10),
// SendPropInt (SENDINFO(m_nSequence), 8, SPROP_UNSIGNED),
SendPropInt (SENDINFO(m_nViewModelIndex), VIEWMODEL_INDEX_BITS,
SPROP_UNSIGNED),
// SendPropFloat (SENDINFO(m_flPlaybackRate), 8, SPROP_ROUNDUP, -4.0,
12.0f),
SendPropInt (SENDINFO(m_fEffects), 10, SPROP_UNSIGNED),
// SendPropInt (SENDINFO(m_nAnimationParity), 3, SPROP_UNSIGNED ),
SendPropEHandle (SENDINFO(m_hWeapon)),
SendPropEHandle (SENDINFO(m_hOwner)),

// SendPropInt( SENDINFO( m_nNewSequenceParity ), EF_PARITY_BITS,
SPROP_UNSIGNED ),
SendPropInt( SENDINFO( m_nResetEventsParity ), EF_PARITY_BITS,
SPROP_UNSIGNED ),
SendPropInt( SENDINFO( m_nMuzzleFlashParity ), EF_MUZZLEFLASH_BITS,
SPROP_UNSIGNED ),
END_SEND_TABLE()

As I understand the SDK docs, the ST_NOBASE should prevent the base
class variables (namely m_flCycle, m_flSequence, etc. from
CBaseAnimating) from being sent to the client. However, what I'm finding
is that they are still get transmitted. I also tried |SendPropExclude(…)
on the variables, but they are still getting sent to the viewmodel. The
only way I found to stop the server from screwing with the viewmodel was
to go into the CBaseAnimating class and strip m_flCycle, m_nSequence,
etc. completely from the network variables list and remove the
prediction completely. Arrgh.

There has to be something that I'm missing, or something that isn't
working as advertised. Any Ideas?
|

_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to