1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2024-11-15 22:19:07 +00:00

allow arbitrary damage type IDs in shots instead of only "DT_*" string constants

This commit is contained in:
fgenesis 2013-03-13 23:28:38 +01:00
parent 0784d1b9df
commit 1217432561
2 changed files with 4 additions and 2 deletions

View file

@ -6252,7 +6252,7 @@ void Game::applyState()
core->afterEffectManager->clear(); core->afterEffectManager->clear();
//core->afterEffectManager->addEffect(new RippleEffect()); //core->afterEffectManager->addEffect(new RippleEffect());
} }
Shot::shots.clear(); Shot::shots.clear(); // the shots were deleted elsewhere, drop any remaining pointers
Shot::deleteShots.clear(); Shot::deleteShots.clear();
backdropQuad = 0; backdropQuad = 0;
clearObsRows(); clearObsRows();
@ -10887,7 +10887,7 @@ void Game::removeState()
debugLog("killAllShots"); debugLog("killAllShots");
Shot::killAllShots(); Shot::killAllShots();
Shot::clearShotGarbage(); Shot::clearShotGarbage(); // make sure there are no pointers left (would lead to a crash on shutdown otherwise)
debugLog("killAllBeams"); debugLog("killAllBeams");
Beam::killAllBeams(); Beam::killAllBeams();
debugLog("killAllWebs"); debugLog("killAllWebs");

View file

@ -230,6 +230,8 @@ void ShotData::bankLoad(const std::string &file, const std::string &path)
damageType = DT_ENEMY_CREATOR; damageType = DT_ENEMY_CREATOR;
else if (bt == "DT_ENEMY_MANTISBOMB") else if (bt == "DT_ENEMY_MANTISBOMB")
damageType = DT_ENEMY_MANTISBOMB; damageType = DT_ENEMY_MANTISBOMB;
else
damageType = (DamageType)atoi(bt.c_str());
} }
else if (token == "Invisible") else if (token == "Invisible")
inf >> invisible; inf >> invisible;