- added a fallback in shoot_* for incompletely ported items.

This commit is contained in:
Christoph Oelckers 2022-12-18 00:34:17 +01:00
parent 46660ab889
commit e9acd74157
3 changed files with 4 additions and 1 deletions

View file

@ -1079,6 +1079,7 @@ void shoot_d(DDukeActor* actor, int atwith, PClass *cls)
}
}
if (cls && cls->IsDescendantOf(RUNTIME_CLASS(DDukeActor)) && CallShootThis(static_cast<DDukeActor*>(GetDefaultByType(cls)), actor, p, spos, sang)) return;
if (cls && atwith == -1) atwith = GetDefaultByType(cls)->spr.picnum;
if (isWorldTour())
{ // Twentieth Anniversary World Tour

View file

@ -815,6 +815,7 @@ void shoot_r(DDukeActor* actor, int atwith, PClass* cls)
}
}
if (cls && cls->IsDescendantOf(RUNTIME_CLASS(DDukeActor)) && CallShootThis(static_cast<DDukeActor*>(GetDefaultByType(cls)), actor, p, spos, sang)) return;
if (cls && atwith == -1) atwith = GetDefaultByType(cls)->spr.picnum;
switch (atwith)
{

View file

@ -651,7 +651,8 @@ void DukeActor_shoot(DDukeActor* act, int intname)
if (picnum == -1)
{
auto cls = PClass::FindActor(FName(ENamedName(intname)));
auto n = FName(ENamedName(intname));
auto cls = PClass::FindActor(n);
assert(cls);
fi.shoot(act, -1, cls);
}