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

Function LaraCheckForLetGo

TombEngine/Game/Lara/lara_climb.cpp:966–985  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

964}
965
966bool LaraCheckForLetGo(ItemInfo* item, CollisionInfo* coll)
967{
968 auto* lara = GetLaraInfo(item);
969
970 item->Animation.Velocity.y = 0;
971 item->Animation.IsAirborne = false;
972
973 if (IsHeld(In::Action) && item->HitPoints > 0 || item->Animation.AnimNumber == LA_ONWATER_TO_LADDER) // Can't let go on this anim
974 return false;
975
976 ResetPlayerFlex(item);
977
978 SetAnimation(item, LA_FALL_START);
979
980 item->Animation.Velocity.z = 2;
981 item->Animation.Velocity.y = 1;
982 item->Animation.IsAirborne = true;
983 lara->Control.HandStatus = HandStatus::Free;
984 return true;
985}

Callers 5

lara_col_climb_downFunction · 0.85
lara_col_climb_upFunction · 0.85
lara_col_climb_rightFunction · 0.85
lara_col_climb_leftFunction · 0.85
lara_col_climb_idleFunction · 0.85

Calls 3

IsHeldFunction · 0.85
ResetPlayerFlexFunction · 0.85
SetAnimationFunction · 0.85

Tested by

no test coverage detected