- 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:
parent
b41d4d9f84
commit
534b2ebbfb
15 changed files with 65 additions and 172 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue