- scriptified the remains of APowerup.

- ensure that actor defaults contain a valid virtual table and class pointer so that they can actually use virtual and class-dependent method functions. This is needed for retrieving script variables from them.
This commit is contained in:
Christoph Oelckers 2017-01-18 10:33:03 +01:00
commit 534b2ebbfb
15 changed files with 65 additions and 172 deletions

View file

@ -5728,9 +5728,9 @@ doplaysound: if (funcIndex == ACSF_PlayActorSound)
AActor *actor = SingleActorFromTID(args[0], activator);
if (actor != NULL)
{
APowerup* powerup = (APowerup*)actor->FindInventory(powerupclass);
auto powerup = actor->FindInventory(powerupclass);
if (powerup != NULL)
return powerup->EffectTics;
return powerup->IntVar(NAME_EffectTics);
}
return 0;
}