Eliminate all unnecessary uses of ZSHIFT
Since the z position of mapthings is now set in P_PrepareRawThings
, there's no need to use mt->options >> ZSHIFT
to retrieve it anymore, so I replaced all occurrences of it with reading mt->z
directly. This is crucial for UDMF where z position is its own field. The only remaining usages of ZSHIFT
are in P_PrepareRawThings
and in the objectplace code, where it's used to calculate the flags value and figure out the maximum allowed z position.
While I was at it, I also made P_RespawnSpecials
call P_SpawnMapThing
to respawn items instead of trying to do all the work itself. This may have slightly worse performance because some of the checks in P_SpawnMapThing
are unnecessary in this case, but it's not worth all the code duplication considering it only respawns one item per tic.