Skip to content

Commit

Permalink
Fix zombie anim events not playing when ZMing outside world (#305)
Browse files Browse the repository at this point in the history
May also be cause of #316
  • Loading branch information
TotallyMehis committed Aug 11, 2020
1 parent 300e1ea commit 0b50c56
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions mp/src/game/server/zmr/npcs/zmr_zombieanimevent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,13 @@ END_SEND_TABLE()

void TE_ZombieAnimEvent( CZMBaseZombie* pZombie, ZMZombieAnimEvent_t anim, int nData )
{
CPVSFilter filter( pZombie->WorldSpaceCenter() );
// We need to send this to all players always, because some animations
// affect the state of the zombie fundamentally.
// ie. banshee ceiling ambush will have wrong anims if banshee was not in PVS.
// or just ZM being outside the map and the zombie attacking something.
CRecipientFilter filter;
filter.AddAllPlayers();


// It's possible to get here from the player class.
//filter.UsePredictionRules();

g_ZMTEZombieAnimEvent.m_hZombie = pZombie;
g_ZMTEZombieAnimEvent.m_iEvent = anim;
g_ZMTEZombieAnimEvent.m_nData = nData;
Expand Down

0 comments on commit 0b50c56

Please sign in to comment.