- fixed: APowerupGiver::PowerupType also needs replacement handling for placeholder classes.

This commit is contained in:
Christoph Oelckers 2016-02-10 10:04:52 +01:00
commit bc616dbf06
5 changed files with 27 additions and 3 deletions

View file

@ -42,6 +42,18 @@ IMPLEMENT_CLASS (APowerup)
// Powerup-Giver -------------------------------------------------------------
IMPLEMENT_CLASS(PClassPowerupGiver)
void PClassPowerupGiver::ReplaceClassRef(PClass *oldclass, PClass *newclass)
{
Super::ReplaceClassRef(oldclass, newclass);
APowerupGiver *def = (APowerupGiver*)Defaults;
if (def != NULL)
{
if (def->PowerupType == oldclass) def->PowerupType = static_cast<PClassWeapon *>(newclass);
}
}
//===========================================================================
//
// APowerupGiver :: Use