mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-03-23 19:31:05 +00:00
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
1 changed files with 2 additions and 2 deletions
|
@ -12389,10 +12389,10 @@ void A_LookForBetter(mobj_t *actor)
|
|||
return;
|
||||
#endif
|
||||
|
||||
P_SetTarget(&oldtarget, actor->target);
|
||||
oldtarget = actor->target;
|
||||
|
||||
if (!P_LookForPlayers(actor, (locvar1 & 65535), false, FixedMul((locvar1 >> 16)*FRACUNIT, actor->scale)))
|
||||
P_SetTarget(&actor->target, oldtarget);
|
||||
actor->target = oldtarget;
|
||||
|
||||
A_FaceTarget(actor);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue