Skip to content

Commit

Permalink
-Fix kDudeModernCustomDude may not morphing during specific events
Browse files Browse the repository at this point in the history
copied from NBlood commit 0fbf9a1b2efef997e9ab8ba16e0405acd8d860b0
  • Loading branch information
coelckers committed May 5, 2022
1 parent 98c985d commit 84834b0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion source/games/blood/src/aiunicult.cpp
Expand Up @@ -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)
{
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 84834b0

Please sign in to comment.