1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2024-12-26 14:45:48 +00:00

Fix bug introduced in 0784d1b9df.

Thx Diablodoct0r for reporting.
Not sure if bug was harmless, maybe...
This commit is contained in:
fgenesis 2013-04-30 00:50:45 +02:00
parent 7d158f5f1c
commit a6929c51f2
2 changed files with 9 additions and 2 deletions

View file

@ -342,6 +342,7 @@ Shot::Shot() : Quad(), Segmented(0,0)
fired = false;
target = 0;
dead = false;
enqueuedForDelete = false;
shotIdx = shots.size();
shots.push_back(this);
}
@ -487,7 +488,6 @@ void Shot::setLifeTime(float l)
void Shot::onEndOfLife()
{
destroySegments(0.2);
deleteShots.push_back(this);
dead = true;
if (emitter)
@ -495,6 +495,12 @@ void Shot::onEndOfLife()
emitter->killParticleEffect();
emitter = 0;
}
if (!enqueuedForDelete)
{
enqueuedForDelete = true;
deleteShots.push_back(this);
}
}
void Shot::doHitEffects()

View file

@ -128,7 +128,6 @@ public:
protected:
float waveTimer;
bool fired;
void suicide();
@ -141,6 +140,8 @@ protected:
void onEndOfLife();
bool dead;
bool fired;
bool enqueuedForDelete;
void onUpdate(float dt);
private: