MCPcopy Create free account
hub / github.com/TombEngine/TombEngine / GetCeilingHeight

Method GetCeilingHeight

TombEngine/Game/collision/Point.cpp:101–111  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

99 }
100
101 int PointCollisionData::GetCeilingHeight()
102 {
103 if (_ceilingHeight.has_value())
104 return *_ceilingHeight;
105
106 // Set ceiling height.
107 auto location = RoomVector(GetSector().RoomNumber, _position.y);
108 _ceilingHeight = Floordata::GetSurfaceHeight(location, _position.x, _position.z, false).value_or(NO_HEIGHT);
109
110 return *_ceilingHeight;
111 }
112
113 Vector3 PointCollisionData::GetFloorNormal()
114 {

Callers 15

ControlSpinningBladeFunction · 0.45
TestSkidooDismountOKFunction · 0.45
TestSpeedboatDismountFunction · 0.45
GetVehicleHeightFunction · 0.45
ControlTonyFireBallFunction · 0.45
CanQuadbikeGetOffFunction · 0.45
TestUPVDismountFunction · 0.45
UPVControlFunction · 0.45
TestRubberBoatDismountFunction · 0.45
TestMinecartDismountFunction · 0.45
BearControlFunction · 0.45
ControlZipLineFunction · 0.45

Calls 4

GetSectorFunction · 0.85
GetSurfaceHeightFunction · 0.85
RoomVectorClass · 0.70
has_valueMethod · 0.45

Tested by 15

TestSkidooDismountOKFunction · 0.36
TestSpeedboatDismountFunction · 0.36
TestUPVDismountFunction · 0.36
TestRubberBoatDismountFunction · 0.36
TestMinecartDismountFunction · 0.36
TestMotorbikeDismountFunction · 0.36
TestProjectileNewRoomFunction · 0.36
TestValidLedgeFunction · 0.36
TestHangSwingInFunction · 0.36
LaraCeilingFrontFunction · 0.36
TestLaraWaterClimbOutFunction · 0.36
TestLaraVaultToleranceFunction · 0.36