- Exhumed: Bring player neartag() call to branch where it's needed.

This commit is contained in:
Mitchell Richters 2023-03-24 12:56:57 +11:00
parent ed2c557297
commit 611d7bae98

View file

@ -1327,12 +1327,6 @@ sectdone:
pFloorActor->spr.pos.Z = pPlayerActor->sector()->floorz;
}
// code to handle item pickup?
HitInfo near;
// neartag finds the nearest sector, wall, and sprite which has its hitag and/or lotag set to a value.
neartag(pPlayerActor->spr.pos, pPlayerActor->sector(), pPlayerActor->spr.Angles.Yaw, near, 128., NT_Hitag | NT_NoSpriteCheck);
doPlayerItemPickups(pPlayer);
// CORRECT ? // loc_1BAF9:
@ -1363,6 +1357,12 @@ sectdone:
{
pPlayer->input.actions &= ~SB_OPEN;
// code to handle item pickup?
HitInfo near;
// neartag finds the nearest sector, wall, and sprite which has its hitag and/or lotag set to a value.
neartag(pPlayerActor->spr.pos, pPlayerActor->sector(), pPlayerActor->spr.Angles.Yaw, near, 128., NT_Hitag | NT_NoSpriteCheck);
int tag;
if (near.hitWall != nullptr && (tag = near.hitWall->lotag) > 0)
{