mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 23:01:50 +00:00
Optimized P_TestMobjZ by not running the iterator if actor
also has THRUACTORS.
This commit is contained in:
parent
688e5ac694
commit
6432e4f6a8
1 changed files with 2 additions and 2 deletions
|
@ -1993,7 +1993,7 @@ int P_TestMobjZ(AActor *actor, bool quick, AActor **pOnmobj)
|
|||
{
|
||||
AActor *onmobj = nullptr;
|
||||
if (pOnmobj) *pOnmobj = nullptr;
|
||||
if (actor->flags & MF_NOCLIP)
|
||||
if ((actor->flags & MF_NOCLIP) || (actor->flags2 & MF2_THRUACTORS))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -2011,7 +2011,7 @@ int P_TestMobjZ(AActor *actor, bool quick, AActor **pOnmobj)
|
|||
{
|
||||
continue;
|
||||
}
|
||||
if ((actor->flags2 | thing->flags2) & MF2_THRUACTORS)
|
||||
if (thing->flags2 & MF2_THRUACTORS)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue