Skip to content

Commit fcd05ee

Browse files
committed
Fixed bug where player death broke player idle anim
After the player was resurrected from death, the player's idle animation wasn't playing correctly. This fix forces the player model to play the default idle animation after resurrection.
1 parent 98239e3 commit fcd05ee

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

d3xp/Actor.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,10 @@ class idActor : public idAFEntity_Gibbable {
213213
idEntity* GetHeadEntity() { return head.GetEntity(); };
214214
#endif
215215

216+
//BC 1-30-2026: playerdeath respawn animation bugfix
217+
//Moving this to public (was private)
218+
void Event_IdleAnim(int channel, const char *name);
219+
216220
protected:
217221
friend class idAnimState;
218222

@@ -302,7 +306,7 @@ class idActor : public idAFEntity_Gibbable {
302306
void Event_StopAnim( int channel, int frames );
303307
void Event_PlayAnim( int channel, const char *name );
304308
void Event_PlayCycle( int channel, const char *name );
305-
void Event_IdleAnim( int channel, const char *name );
309+
306310
void Event_SetSyncedAnimWeight( int channel, int anim, float weight );
307311
void Event_OverrideAnim( int channel );
308312
void Event_EnableAnim( int channel, int blendFrames );

d3xp/Player.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8435,6 +8435,13 @@ void idPlayer::RevivePlayer( void )
84358435
this->health = 100;
84368436
physicsObj.SetMovementType( PM_NORMAL );
84378437
AI_DEAD = false;
8438+
8439+
//BC 1-30-2026: playerdeath respawn animation bugfix
8440+
//Force the player model to return to idle animation cycle.
8441+
//If you don't do this, the player gets stuck in unexpected idle anims.
8442+
Event_IdleAnim(ANIMCHANNEL_TORSO, "idle");
8443+
Event_IdleAnim(ANIMCHANNEL_LEGS, "idle");
8444+
84388445
SetAnimState( ANIMCHANNEL_LEGS, "Legs_Idle", 4 );
84398446
forceRespawn = false;
84408447

0 commit comments

Comments
 (0)