Skip to content

Commit

Permalink
Move particle fix to CBaseCombatWeapon::SetViewModel
Browse files Browse the repository at this point in the history
  • Loading branch information
TomyLobo committed May 20, 2016
1 parent 7217287 commit cd08f98
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
3 changes: 3 additions & 0 deletions mp/src/game/shared/basecombatweapon_shared.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1170,6 +1170,9 @@ void CBaseCombatWeapon::SetViewModel()
if ( vm == NULL )
return;
Assert( vm->ViewModelIndex() == m_nViewModelIndex );
#ifdef CLIENT_DLL
vm->ParticleProp()->StopParticlesInvolving(vm);
#endif
vm->SetWeaponModel( GetViewModel( m_nViewModelIndex ), this );
}

Expand Down
5 changes: 0 additions & 5 deletions mp/src/game/shared/sdk/weapon_sdkbase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1965,11 +1965,6 @@ bool CWeaponSDKBase::Deploy( )

if (GetPlayerOwner()->GetCurrentTime() < GetPlayerOwner()->m_flDisarmRedraw)
return false;

#ifdef CLIENT_DLL
CBaseViewModel* vm = GetPlayerOwner()->GetViewModel( m_nViewModelIndex );
vm->ParticleProp()->StopParticlesInvolving(vm);
#endif
}

bool bDeploy = DefaultDeploy( (char*)GetViewModel(), (char*)GetWorldModel(), GetDeployActivity(), (char*)GetAnimPrefix() );
Expand Down

0 comments on commit cd08f98

Please sign in to comment.