mirror of
https://github.com/ZDoom/qzdoom.git
synced 2025-02-27 22:31:07 +00:00
- clear spechit before leaving P_CheckPosition.
Otherwise this may contain residual data from the last call. One can only hope that this doesn't cause other side effects - this entire code is one horrendous mess of bad ideas.
This commit is contained in:
parent
f6af50fc74
commit
0caabbe355
1 changed files with 8 additions and 2 deletions
|
@ -1809,6 +1809,10 @@ bool P_CheckPosition(AActor *thing, const DVector2 &pos, FCheckPosition &tm, boo
|
||||||
tm.abovemidtex = false;
|
tm.abovemidtex = false;
|
||||||
validcount++;
|
validcount++;
|
||||||
|
|
||||||
|
// Remove all old entries before returning.
|
||||||
|
spechit.Clear();
|
||||||
|
portalhit.Clear();
|
||||||
|
|
||||||
if ((thing->flags & MF_NOCLIP) && !(thing->flags & MF_SKULLFLY))
|
if ((thing->flags & MF_NOCLIP) && !(thing->flags & MF_SKULLFLY))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
@ -1886,13 +1890,15 @@ bool P_CheckPosition(AActor *thing, const DVector2 &pos, FCheckPosition &tm, boo
|
||||||
// being considered for collision with the player.
|
// being considered for collision with the player.
|
||||||
validcount++;
|
validcount++;
|
||||||
|
|
||||||
|
// Clear out any residual garbage left behind by PIT_CheckThing induced recursions etc.
|
||||||
|
spechit.Clear();
|
||||||
|
portalhit.Clear();
|
||||||
|
|
||||||
thing->BlockingMobj = NULL;
|
thing->BlockingMobj = NULL;
|
||||||
thing->Height = realHeight;
|
thing->Height = realHeight;
|
||||||
if (actorsonly || (thing->flags & MF_NOCLIP))
|
if (actorsonly || (thing->flags & MF_NOCLIP))
|
||||||
return (thing->BlockingMobj = thingblocker) == NULL;
|
return (thing->BlockingMobj = thingblocker) == NULL;
|
||||||
|
|
||||||
spechit.Clear();
|
|
||||||
portalhit.Clear();
|
|
||||||
|
|
||||||
FMultiBlockLinesIterator it(pcheck, pos.X, pos.Y, thing->Z(), thing->Height, thing->radius, newsec);
|
FMultiBlockLinesIterator it(pcheck, pos.X, pos.Y, thing->Z(), thing->Height, thing->radius, newsec);
|
||||||
FMultiBlockLinesIterator::CheckResult lcres;
|
FMultiBlockLinesIterator::CheckResult lcres;
|
||||||
|
|
Loading…
Reference in a new issue