mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-23 12:32:34 +00:00
Shift self-clip to first check for performance
This commit is contained in:
parent
1a25e35f3c
commit
389ff4fc98
1 changed files with 4 additions and 4 deletions
|
@ -1013,6 +1013,10 @@ bool PIT_CheckThing(AActor *thing, FCheckPosition &tm)
|
||||||
bool solid;
|
bool solid;
|
||||||
int damage;
|
int damage;
|
||||||
|
|
||||||
|
// don't clip against self
|
||||||
|
if (thing == tm.thing)
|
||||||
|
return true;
|
||||||
|
|
||||||
if (!((thing->flags & (MF_SOLID | MF_SPECIAL | MF_SHOOTABLE)) || thing->flags6 & MF6_TOUCHY))
|
if (!((thing->flags & (MF_SOLID | MF_SPECIAL | MF_SHOOTABLE)) || thing->flags6 & MF6_TOUCHY))
|
||||||
return true; // can't hit thing
|
return true; // can't hit thing
|
||||||
|
|
||||||
|
@ -1020,10 +1024,6 @@ bool PIT_CheckThing(AActor *thing, FCheckPosition &tm)
|
||||||
if (abs(thing->x - tm.x) >= blockdist || abs(thing->y - tm.y) >= blockdist)
|
if (abs(thing->x - tm.x) >= blockdist || abs(thing->y - tm.y) >= blockdist)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
// don't clip against self
|
|
||||||
if (thing == tm.thing)
|
|
||||||
return true;
|
|
||||||
|
|
||||||
if ((thing->flags2 | tm.thing->flags2) & MF2_THRUACTORS)
|
if ((thing->flags2 | tm.thing->flags2) & MF2_THRUACTORS)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue