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

Function FallFromRope

TombEngine/Objects/Generic/Object/rope.cpp:661–681  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

659 }
660
661 void FallFromRope(ItemInfo* item, bool stumble)
662 {
663 item->Animation.Velocity.z = abs(CurrentPendulum.velocity.x >> FP_SHIFT) + abs(CurrentPendulum.velocity.z >> FP_SHIFT) / 2;
664 item->Pose.Orientation.x = 0;
665 item->Pose.Position.y += 320;
666
667 SetAnimation(item, stumble ? LA_JUMP_WALL_SMASH_START : LA_FALL_START);
668
669 item->Animation.Velocity.y = 0;
670 item->Animation.IsAirborne = true;
671
672 auto* lara = GetLaraInfo(item);
673 lara->Control.HandStatus = HandStatus::Free;
674 lara->Control.Rope.Ptr = -1;
675
676 if (stumble)
677 {
678 item->Animation.Velocity.z = -item->Animation.Velocity.z;
679 DoDamage(item, 0);
680 }
681 }
682
683 void LaraClimbRope(ItemInfo* item, CollisionInfo* coll)
684 {

Callers 7

RopeSwingCollisionFunction · 0.85
LaraClimbRopeFunction · 0.85
lara_as_rope_idleFunction · 0.85
lara_col_rope_idleFunction · 0.85
lara_as_rope_upFunction · 0.85

Calls 2

SetAnimationFunction · 0.85
DoDamageFunction · 0.85

Tested by

no test coverage detected