| 25 | int RopeSwing = 0; |
| 26 | |
| 27 | void InitializeRope(short itemNumber) |
| 28 | { |
| 29 | auto* item = &g_Level.Items[itemNumber]; |
| 30 | short roomNumber = item->RoomNumber; |
| 31 | |
| 32 | auto itemPos = item->Pose.Position; |
| 33 | |
| 34 | FloorInfo* floor = GetFloor(itemPos.x, itemPos.y, itemPos.z, &roomNumber); |
| 35 | itemPos.y = GetCeiling(floor, itemPos.x, itemPos.y, itemPos.z); |
| 36 | |
| 37 | auto pos = Vector3i(0, 16384, 0); |
| 38 | ROPE_STRUCT rope; |
| 39 | PrepareRope(&rope, &itemPos, &pos, CLICK(0.5f), item); |
| 40 | |
| 41 | item->TriggerFlags = short(Ropes.size()); |
| 42 | |
| 43 | Ropes.push_back(rope); |
| 44 | } |
| 45 | |
| 46 | void PrepareRope(ROPE_STRUCT* rope, Vector3i* pos1, Vector3i* pos2, int length, ItemInfo* item) |
| 47 | { |
nothing calls this directly
no test coverage detected