| 443 | } |
| 444 | |
| 445 | void SetPendulumVelocity(int x, int y, int z) |
| 446 | { |
| 447 | int node = 2 * (CurrentPendulum.node >> 1); |
| 448 | if (node < ROPE_SEGMENTS) |
| 449 | { |
| 450 | int val = 4096 / (ROPE_SEGMENTS - node) * 256; |
| 451 | |
| 452 | x = (int64_t)val * x >> FP_SHIFT; |
| 453 | y = (int64_t)val * y >> FP_SHIFT; |
| 454 | z = (int64_t)val * z >> FP_SHIFT; |
| 455 | } |
| 456 | |
| 457 | CurrentPendulum.velocity.x += x; |
| 458 | CurrentPendulum.velocity.y += y; |
| 459 | CurrentPendulum.velocity.z += z; |
| 460 | } |
| 461 | |
| 462 | void SetPendulumPoint(ROPE_STRUCT* rope, int node) |
| 463 | { |
no outgoing calls
no test coverage detected