mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-16 09:31:14 +00:00
- adjusted collision detection for item pickups
Use vanilla condition for a thing with MF_SPECIAL flag to fix inability to grab it when item's top is at the same height as sector's floor from it can be picked up https://forum.zdoom.org/viewtopic.php?t=60181&start=88#p1122935
This commit is contained in:
parent
3e0fa5cc1b
commit
85fe6c5aaa
1 changed files with 7 additions and 1 deletions
|
@ -1336,8 +1336,14 @@ bool PIT_CheckThing(FMultiBlockThingsIterator &it, FMultiBlockThingsIterator::Ch
|
|||
(thing->flags5 & MF5_DONTRIP) ||
|
||||
((tm.thing->flags6 & MF6_NOBOSSRIP) && (thing->flags2 & MF2_BOSS)))
|
||||
{
|
||||
if (thing->flags & MF_SPECIAL)
|
||||
{
|
||||
// Vanilla condition, i.e. without equality, for item pickups
|
||||
if ((tm.thing->Z() > topz) || (tm.thing->Top() < thing->Z()))
|
||||
return true;
|
||||
}
|
||||
// Some things prefer not to overlap each other, if possible (Q: Is this even needed anymore? It was just for dealing with some deficiencies in the code below in Heretic.)
|
||||
if (!(tm.thing->flags3 & thing->flags3 & MF3_DONTOVERLAP))
|
||||
else if (!(tm.thing->flags3 & thing->flags3 & MF3_DONTOVERLAP))
|
||||
{
|
||||
if ((tm.thing->Z() >= topz) || (tm.thing->Top() <= thing->Z()))
|
||||
return true;
|
||||
|
|
Loading…
Reference in a new issue