- initialize the angle of script spawned actors.

This commit is contained in:
Christoph Oelckers 2023-05-01 17:25:47 +02:00
parent e8a3e2ee53
commit 94a80dda11
2 changed files with 7 additions and 1 deletions

View file

@ -846,6 +846,11 @@ DDukeActor* spawninit(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>* ac
}
commonEnemySetup(act, actj);
}
else if (!(act->flags3 & SFLAG3_SIMPLEINIT))
{
act->ownerActor = actj;
}
CallInitialize(act);
}
else

View file

@ -422,7 +422,8 @@ class DukeActor : CoreActor native
}
self.clipdist = 10;
self.ownerActor = self;
if (self.ownerActor == null) self.ownerActor = self;
else self.angle = self.ownerActor.angle;
self.ChangeStat(STAT_ACTOR);
}
}