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

This commit is contained in:
sphere 2021-06-16 16:12:38 +02:00
parent d90b6949d7
commit df5c9933ec
2 changed files with 2 additions and 1 deletions

View file

@ -3589,6 +3589,7 @@ thingtypes
sprite = "ARCHA1"; sprite = "ARCHA1";
width = 24; width = 24;
height = 32; height = 32;
flags8text = "[8] Don't jump away";
} }
118 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); dx = (actor->target->x - actor->x), dy = (actor->target->y - actor->y), dz = (actor->target->z - actor->z);
dm = P_AproxDistance(dx, dy); dm = P_AproxDistance(dx, dy);
// Target dangerously close to robohood, retreat then. // 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); S_StartSound(actor, actor->info->attacksound);
P_SetMobjState(actor, actor->info->raisestate); P_SetMobjState(actor, actor->info->raisestate);