The previous situation is unfortunately not sustainable; header pollution
isn't consistent across all non-Windows platforms. As a result, some of
the earlier includes may pull functions/types into the global namespace too
soon, and the later includes will have no visibility of them because they're
in a different namespace. Re-including the necessary one doesn't work
because include guards will prevent their re-inclusion, and it's not a good
idea to try and #undefine include guards now that we're in a new namespace.
This fixes the build on FreeBSD, and likely some other systems as well.
- If an actor crosses back over a portal because they're blocked, it will result in false positives.
- Fixed nodes not being targeted for aim direction.
- AMBUSH flag on nodes makes them blind and untargetable when getting `startnode` and `goalnode` for `FindPath()`. This is useful for indicating a node should be skipped when tele/portaling, so the current path can be preserved.
- Setup is simple: place nodes behind lines that tele/portal entities and mark them as AMBUSH.
Other changes:
- Restored global array since blockmap is not a viable option here.
- Added MAPINFO `pathing` flag which enables pathing by default.
- Added NOPATHING flag to disable pathing entirely, useful for maps that have pathing enabled.
- Added `ReachedNode(Actor mo)` virtual, responsible for handling node traversal.
- Nodes now make use of MeleeRange to limit their sight checking functions.
Extra safety to ensure dummy Actor deaths properly emulate a real death and aren't duplicate called. Fixed a crash when using the kill command while set to unmorph on death. Super morphing is now possible while using the morphme cheat if passing the morph class directly. Added a flag to ignore player invulnerability completely when morphing.
Added getter and setter functions for handling whether or not the player fields should be gotten/set. Added MRF_KEEPARMOR flag to prevent stripping armor on morph. Optimized unmorphed Actor by setting it to NoInteraction and removing it from the blockmap and sector lists.
Players will now use their Alternative field to check if they're morphed instead of their MorphTics. This makes the current state of morphing more reliable, otherwise setting this to 0 manually without unmorphing could have very odd results. Both monsters and players consider 0 morph time to mean infinite now (previously this only applied to monsters). Player unmorphs no longer die in the case of a failed unmorph on death. Removed inventory swapping on player pointer substitution as it's too messy to do here.
Removed StaticPointerSubstitution in favor of a much safer function that only changes select pointers. As a result the ability to properly modify morphing has been opened back up to ZScript. Many missing virtual callbacks were amended and MorphedDeath has been reworked to only be called back on an actual morphed death. MorphedMonster is no longer required to morph an Actor. CheckUnmorph virtual added that gets called back on morphed Actors. Fixed numerous bugs related to morph behavior.
View offsets are now added after the base position and angles (accounting for interpolation) are calculated. Behavior was centralized into a singular tracer that all view offsets now use to prevent clipping out of the map. Cleaned up camera rendering behavior. Angles are now properly normalized after all offsetting is accounted for. The chase cam can now update in real-time instead of forcing interpolation.
No longer relies on last input fraction to determine offset on frame (now uses TicFrac). No longer modifies Actor angle in real-time. Fixed offsetting breaking when other viewports are being renderer.