Animation jitter fix for players.

This commit is contained in:
Marco Cawthorne 2021-09-08 20:16:32 +02:00
parent 4a68156699
commit bd84d76685
Signed by: eukara
GPG Key ID: C196CD8BA993248A
2 changed files with 4 additions and 9 deletions

View File

@ -387,7 +387,7 @@ void
HUD_DrawNotify(void) HUD_DrawNotify(void)
{ {
vector pos; vector pos;
if (pSeatLocal->m_flPickupAlpha <= 0.0f) { if (pSeatLocal->m_flPickupAlpha <= 0.0f) {
return; return;
} }

11
src/shared/animations.qc Executable file → Normal file
View File

@ -33,7 +33,7 @@ void Animation_Print(string sWow) {
void void
Animation_TimerUpdate(player pl, float ftime) Animation_TimerUpdate(player pl, float ftime)
{ {
makevectors([0, pl.angles[1], 0]); makevectors([0, pl.v_angle[1], 0]);
/* top animation is always just being incremented */ /* top animation is always just being incremented */
pl.anim_top_time += ftime; pl.anim_top_time += ftime;
@ -94,7 +94,7 @@ Animation_PlayerUpdate(player pl)
pl.frame1time = 10.0f; pl.frame1time = 10.0f;
} }
makevectors([0, pl.angles[1], 0]); makevectors([0, pl.v_angle[1], 0]);
float fCorrect = dotproduct(pl.velocity, v_right) * 0.25f; float fCorrect = dotproduct(pl.velocity, v_right) * 0.25f;
/* Turn torso */ /* Turn torso */
@ -104,15 +104,10 @@ Animation_PlayerUpdate(player pl)
pl.bonecontrol4 = pl.bonecontrol3 * 0.5; pl.bonecontrol4 = pl.bonecontrol3 * 0.5;
/* Correct the legs */ /* Correct the legs */
pl.angles[1] -= fCorrect; pl.angles[1] = pl.v_angle[1] - fCorrect;
#ifdef SERVER
pl.subblendfrac = pl.subblendfrac =
pl.subblend2frac = pl.v_angle[0] / 90; pl.subblend2frac = pl.v_angle[0] / 90;
#else
pl.subblendfrac =
pl.subblend2frac = pl.pitch / 90;
#endif
} }
void void