-Fix kDudeModernCustomDude may not morphing during specific events

copied from NBlood commit 0fbf9a1b2efef997e9ab8ba16e0405acd8d860b0
This commit is contained in:
Christoph Oelckers 2022-05-06 00:55:50 +02:00
parent 98c985de73
commit 84834b0095

View file

@ -796,7 +796,7 @@ static void unicultThinkChase(DBloodActor* actor)
if (hitactor->IsDudeActor() && (weaponType != kGenDudeWeaponHitscan || hscn))
{
// dodge a bit in sides
if (hitactor->GetTarget() != actor)
if (hitactor->xspr.health > 0 && hitactor->GetTarget() != actor)
{
if (pExtra->baseDispersion < 1024 && weaponType != kGenDudeWeaponMissile)
{
@ -1215,6 +1215,10 @@ void aiGenDudeNewState(DBloodActor* actor, AISTATE* pAIState)
{
return;
}
if (actor->xspr.health <= 0 || actor->xspr.sysData1 == kGenDudeTransformStatus)
return;
// redirect dudes which cannot walk to non-walk states
if (!actor->genDudeExtra.canWalk)