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

Function LadderMonkeyExtra

TombEngine/Game/Lara/lara_overhang.cpp:971–985  ·  view source on GitHub ↗

Extends LS_LADDER_IDLE (56)

Source from the content-addressed store, hash-verified

969
970// Extends LS_LADDER_IDLE (56)
971bool LadderMonkeyExtra(ItemInfo* item, CollisionInfo* coll)
972{
973 auto probe = GetPointCollision(*item);
974
975 if (probe.IsSteepCeiling())
976 return false;
977
978 if (probe.GetBottomSector().Flags.Monkeyswing && (item->Pose.Position.y - coll->Setup.Height - CLICK(0.5f) <= probe.GetCeilingHeight()))
979 {
980 item->Animation.TargetState = LS_MONKEY_IDLE;
981 return true;
982 }
983
984 return false;
985}
986
987// Extends LS_LADDER_DOWN (61)
988void SlopeClimbDownExtra(ItemInfo* item, CollisionInfo* coll)

Callers 1

lara_col_climb_idleFunction · 0.85

Calls 3

GetPointCollisionFunction · 0.85
IsSteepCeilingMethod · 0.45
GetCeilingHeightMethod · 0.45

Tested by

no test coverage detected