TombEngine
TombEngine copied to clipboard
PointCollisionData class
Introduces the new and improved PointCollisionData
class to replace CollisionResult
. The advantage over the old method is that it fetches and caches computationally expensive data only when needed. It can be easily wrapped for the eventual Lua collision detection object. Additionally, it can theoretically plug in with any potential future collision overhaul.
Usage example:
auto pointColl = GetPointCollision(pos, roomNumber);
int floorHeight = pointColl.GetFloorHeight();
To get a broad overview of this PR, look at Game/collision/Point.h
first.
Some general improvements:
- Added the ability to retrieve top sectors.
- Added the ability to retrieve ceiling bridge item numbers.
- Added the ability to query water height values.
- Provided the option to test environment flags.
- Bridges are recognised when fetching floor or ceiling normals.
- Bridges can be wobbled (but not too much).
- etc.
Full adoption of new functions complete.