Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10436


Ignore:
Timestamp:
May 7, 2015, 10:45:20 PM (10 years ago)
Author:
meggiman
Message:

Fixed dangling pointer bug when GravityBomb was destroyed by tick of base class because of collision with other pawns.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/weaponFS15/src/modules/weapons/projectiles/GravityBomb.cc

    r10435 r10436  
    5454        void GravityBomb::tick(float dt)
    5555        {
    56                         SUPER(GravityBomb,tick,dt);
    5756                        timeToLife_ -= dt;
    5857                        if(timeToLife_ < 0)
     
    6160                                setVelocity(Vector3::ZERO);
    6261                                setAcceleration(Vector3::ZERO);
    63                                 detonate();
     62                                isDetonated_ = true;
    6463                        }
    6564                        else
     
    6968                        }
    7069                        if(isDetonated_) detonate();
     70                        else SUPER(GravityBomb, tick, dt);
    7171        }
    7272
Note: See TracChangeset for help on using the changeset viewer.