Closed ZehMatt closed 3 years ago
Does using GetAbsVelocity (actually binded to CBaseEntity::GetLocalVelocity) clientside not return the correct velocity?
I actually opened up an issue about it affecting animations when being on platforms.
Due to other players not being predicted and the fact that most of player related stuff like groundEntity and velocity is networked only to local player there really isn't a ready solution for this. Internally the engine just tries to estimate the velocity from 2 positions. (C_BaseEntity::EstimateAbsVelocity
) This behavior should be identical to HL2DM, and probably TF2 as well.
I think the velocity for players should not be estimated and rather be networked to all players, I proposed this to Willox a long time ago but he never really got around doing it.
Should be fixed on Dev.
Details
The client for some reasons receives sometimes an vector length bigger than 0 when on some moving object. It will sometimes return 0 and sometimes the velocity of the move parent while the server value always sits at 0. This causes the players to go into the walk animation while they shouldn't.
Steps to reproduce
Put a bot on something moving like the train from d1_trainstation_01 and observe the velocity values on client and server.
Workaround