mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-31 12:30:40 +00:00
- added a fallback in shoot_* for incompletely ported items.
This commit is contained in:
parent
46660ab889
commit
e9acd74157
3 changed files with 4 additions and 1 deletions
|
@ -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 && 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())
|
if (isWorldTour())
|
||||||
{ // Twentieth Anniversary World Tour
|
{ // Twentieth Anniversary World Tour
|
||||||
|
|
|
@ -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 && 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)
|
switch (atwith)
|
||||||
{
|
{
|
||||||
|
|
|
@ -651,7 +651,8 @@ void DukeActor_shoot(DDukeActor* act, int intname)
|
||||||
|
|
||||||
if (picnum == -1)
|
if (picnum == -1)
|
||||||
{
|
{
|
||||||
auto cls = PClass::FindActor(FName(ENamedName(intname)));
|
auto n = FName(ENamedName(intname));
|
||||||
|
auto cls = PClass::FindActor(n);
|
||||||
assert(cls);
|
assert(cls);
|
||||||
fi.shoot(act, -1, cls);
|
fi.shoot(act, -1, cls);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue