mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-02-12 15:15:46 +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;
|
AActor *onmobj = nullptr;
|
||||||
if (pOnmobj) *pOnmobj = nullptr;
|
if (pOnmobj) *pOnmobj = nullptr;
|
||||||
if (actor->flags & MF_NOCLIP)
|
if ((actor->flags & MF_NOCLIP) || (actor->flags2 & MF2_THRUACTORS))
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -2011,7 +2011,7 @@ int P_TestMobjZ(AActor *actor, bool quick, AActor **pOnmobj)
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if ((actor->flags2 | thing->flags2) & MF2_THRUACTORS)
|
if (thing->flags2 & MF2_THRUACTORS)
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue