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:
parent
7d158f5f1c
commit
a6929c51f2
2 changed files with 9 additions and 2 deletions
|
@ -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()
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue