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

Function CutsceneRopeControl

TombEngine/Objects/Generic/Object/objects.cpp:184–199  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

182}
183
184void CutsceneRopeControl(short itemNumber)
185{
186 auto* ropeItem = &g_Level.Items[itemNumber];
187
188 auto pos1 = GetJointPosition(&g_Level.Items[ropeItem->ItemFlags[2]], 0, Vector3i(-128, -72, -16));
189 auto pos2 = GetJointPosition(&g_Level.Items[ropeItem->ItemFlags[3]], 0, Vector3i(830, -12, 0));
190
191 ropeItem->Pose.Position = pos2;
192
193 int dx = (pos2.x - pos1.x) * (pos2.x - pos1.x);
194 int dy = (pos2.y - pos1.y) * (pos2.y - pos1.y);
195 int dz = (pos2.z - pos1.z) * (pos2.z - pos1.z);
196
197 ropeItem->ItemFlags[1] = ((sqrt(dx + dy + dz) * 2) + sqrt(dx + dy + dz)) * 2;
198 ropeItem->Pose.Orientation.x = ANGLE(-26.75f);
199}
200
201void HybridCollision(short itemNumber, ItemInfo* laraItem, CollisionInfo* coll)
202{

Callers

nothing calls this directly

Calls 3

GetJointPositionFunction · 0.85
ANGLEFunction · 0.85
Vector3iClass · 0.70

Tested by

no test coverage detected