- Duke: fixed setup of purely scripted enemies,

Some band-aid is still needed for the time being.
This commit is contained in:
Christoph Oelckers 2023-02-09 17:34:25 +01:00
parent 17392fe400
commit 6c77d1c39e
4 changed files with 10 additions and 5 deletions

View file

@ -149,7 +149,8 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
switch (act->spr.picnum) switch (act->spr.picnum)
{ {
default: default:
CallInitialize(act); if (!badguy(act) || commonEnemySetup(act, actj))
CallInitialize(act);
break; break;
case FOF: case FOF:
act->spr.scale = DVector2(0, 0); act->spr.scale = DVector2(0, 0);

View file

@ -61,7 +61,8 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
{ {
default: default:
default_case: default_case:
CallInitialize(act); if (!badguy(act) || commonEnemySetup(act, actj))
CallInitialize(act);
break; break;
case RTILE_RRTILE7936: case RTILE_RRTILE7936:
if (!isRRRA()) goto default_case; if (!isRRRA()) goto default_case;

Binary file not shown.

View file

@ -263,9 +263,12 @@ class DukeActor : CoreActor native
self.scale = (0, 0); self.scale = (0, 0);
self.ChangeStat(STAT_MISC); self.ChangeStat(STAT_MISC);
} }
self.clipdist = 10; else
self.ownerActor = self; {
self.ChangeStat(STAT_ACTOR); self.clipdist = 10;
self.ownerActor = self;
self.ChangeStat(STAT_ACTOR);
}
} }
} }