Fix A_LookForBetter to not leave a stray thinker reference lingering potentially forever, as toaster pointed out it might do.
This commit is contained in:
parent
54fea4d0b9
commit
a5331f8024
|
@ -12389,10 +12389,10 @@ void A_LookForBetter(mobj_t *actor)
|
||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
P_SetTarget(&oldtarget, actor->target);
|
oldtarget = actor->target;
|
||||||
|
|
||||||
if (!P_LookForPlayers(actor, (locvar1 & 65535), false, FixedMul((locvar1 >> 16)*FRACUNIT, actor->scale)))
|
if (!P_LookForPlayers(actor, (locvar1 & 65535), false, FixedMul((locvar1 >> 16)*FRACUNIT, actor->scale)))
|
||||||
P_SetTarget(&actor->target, oldtarget);
|
actor->target = oldtarget;
|
||||||
|
|
||||||
A_FaceTarget(actor);
|
A_FaceTarget(actor);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue