Merge branch 'robo-hood-nojump' into 'next'

Restore toggle for Robo-Hood to not jump away from nearby players.

See merge request STJr/SRB2!1548
This commit is contained in:
sphere 2021-06-18 10:00:42 -04:00
commit 357b64129c
2 changed files with 2 additions and 1 deletions

View file

@ -3589,6 +3589,7 @@ thingtypes
sprite = "ARCHA1";
width = 24;
height = 32;
flags8text = "[8] Don't jump away";
}
118
{

View file

@ -1709,7 +1709,7 @@ void A_HoodThink(mobj_t *actor)
dx = (actor->target->x - actor->x), dy = (actor->target->y - actor->y), dz = (actor->target->z - actor->z);
dm = P_AproxDistance(dx, dy);
// Target dangerously close to robohood, retreat then.
if ((dm < 256<<FRACBITS) && (abs(dz) < 128<<FRACBITS))
if ((dm < 256<<FRACBITS) && (abs(dz) < 128<<FRACBITS) && !(actor->flags2 & MF2_AMBUSH))
{
S_StartSound(actor, actor->info->attacksound);
P_SetMobjState(actor, actor->info->raisestate);