NSClientPlayer: UpdatePlayerAnimation() is now calling when running player physics, and also run seperately for non predicted player entities during predraw.
This commit is contained in:
parent
298ba7a041
commit
39854c0740
3 changed files with 7 additions and 6 deletions
|
@ -91,7 +91,7 @@ NSClientPlayer:NSClientSpectator
|
|||
virtual bool(void) IsPlayer;
|
||||
|
||||
/** Empty & shared between Client and Server. This is run on every player, every frame, to update their animation cycle. */
|
||||
virtual void UpdatePlayerAnimation(void);
|
||||
virtual void UpdatePlayerAnimation(float);
|
||||
|
||||
#ifdef CLIENT
|
||||
int sequence;
|
||||
|
|
|
@ -141,7 +141,7 @@ NSClientPlayer::ClientInput(void)
|
|||
/* this is where it gets mod specific really fast,
|
||||
as some models may not even support skeletal animation */
|
||||
void
|
||||
NSClientPlayer::UpdatePlayerAnimation(void)
|
||||
NSClientPlayer::UpdatePlayerAnimation(float timelength)
|
||||
{
|
||||
|
||||
}
|
||||
|
@ -180,8 +180,10 @@ NSClientPlayer::predraw(void)
|
|||
/* make sure we're enabling shadow rendering on us! */
|
||||
effects &= ~EF_NOSHADOW;
|
||||
|
||||
/* always advance the player animation in some way */
|
||||
UpdatePlayerAnimation();
|
||||
/* if this player is not the local player, then physics aren't being run on them
|
||||
so we need to advance their animation manually */
|
||||
if (entnum != player_localentnum)
|
||||
UpdatePlayerAnimation(clframetime);
|
||||
|
||||
/* mouth flapping */
|
||||
UpdatePlayerJaw(getplayerkeyfloat(this.entnum - 1, "voiploudness"));
|
||||
|
|
|
@ -363,8 +363,7 @@ NSClientPlayer::Physics_InputPostMove(void)
|
|||
punchangle[2] *= punch;
|
||||
|
||||
/* player animation code */
|
||||
Animation_TimerUpdate((player)this, input_timelength);
|
||||
Animation_PlayerUpdate((player)this);
|
||||
UpdatePlayerAnimation(input_timelength);
|
||||
|
||||
RemoveFlags(FL_FROZEN);
|
||||
ClientInput();
|
||||
|
|
Loading…
Reference in a new issue