mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-03-23 03:12:38 +00:00
I just checked how P_LookForPlayers works, and it turns out it doesn't modify the target *unless* it returns true. So I guess we've no need to account for a change in target in A_LookForBetter after all?
This commit is contained in:
parent
09368963dd
commit
9e26d7bdaa
1 changed files with 1 additions and 6 deletions
|
@ -12385,16 +12385,11 @@ void A_LookForBetter(mobj_t *actor)
|
|||
{
|
||||
INT32 locvar1 = var1;
|
||||
//INT32 locvar2 = var2;
|
||||
mobj_t *oldtarget = NULL;
|
||||
#ifdef HAVE_BLUA
|
||||
if (LUA_CallAction("A_LookForBetter", actor))
|
||||
return;
|
||||
#endif
|
||||
|
||||
oldtarget = actor->target;
|
||||
|
||||
if (!P_LookForPlayers(actor, (locvar1 & 65535), false, FixedMul((locvar1 >> 16)*FRACUNIT, actor->scale)))
|
||||
actor->target = oldtarget;
|
||||
|
||||
P_LookForPlayers(actor, (locvar1 & 65535), false, FixedMul((locvar1 >> 16)*FRACUNIT, actor->scale));
|
||||
A_FaceTarget(actor);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue