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

Function CanSprintJumpForward

TombEngine/Game/Lara/PlayerContext.cpp:956–980  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

954 }
955
956 bool CanSprintJumpForward(const ItemInfo& item, const CollisionInfo& coll)
957 {
958 const auto& player = GetLaraInfo(item);
959
960 // 1) Check if sprint jump is enabled.
961 if (!g_GameFlow->GetSettings()->Animations.SprintJump)
962 return false;
963
964 // 2) Check for jump state dispatch.
965 if (!TestStateDispatch(item, LS_JUMP_FORWARD))
966 return false;
967
968 // 3) Check running jump timer.
969 if (player.Control.Count.Run < PLAYER_SPRINT_JUMP_TIME)
970 return false;
971
972 auto setup = JumpSetupData
973 {
974 item.Pose.Orientation.y,
975 CLICK(1.8f)
976 };
977
978 // 4) Assess context.
979 return TestJumpSetup(item, coll, setup);
980 }
981
982 bool CanPerformSlideJump(const ItemInfo& item, const CollisionInfo& coll)
983 {

Callers 1

lara_as_sprintFunction · 0.85

Calls 3

TestStateDispatchFunction · 0.85
TestJumpSetupFunction · 0.85
GetSettingsMethod · 0.80

Tested by

no test coverage detected