Browse Source

Fix beam leak

hlzbot-dirty
root 9 years ago committed by mittorn
parent
commit
4449b6a96d
  1. 6
      dlls/ar2.cpp

6
dlls/ar2.cpp

@ -241,6 +241,8 @@ void CAR2::PrimaryAttack()
} }
MyAnim(iAnim); MyAnim(iAnim);
if( m_pBeam1 )
UTIL_Remove(m_pBeam1);
m_pBeam1 = CBeam::BeamCreate(AR2_BEAM_SPRITE, 40); m_pBeam1 = CBeam::BeamCreate(AR2_BEAM_SPRITE, 40);
m_pBeam1->SetFlags(BEAM_FSINE); m_pBeam1->SetFlags(BEAM_FSINE);
@ -268,7 +270,9 @@ void CAR2::PrimaryAttack()
void CAR2::Cleaner(void) { void CAR2::Cleaner(void) {
UTIL_Remove(m_pBeam1); if( m_pBeam1 )
UTIL_Remove(m_pBeam1);
m_pBeam1 = 0;
} }
void CAR2::SecondaryAttack(void) void CAR2::SecondaryAttack(void)

Loading…
Cancel
Save