| 5453 | static U32 sBalance; |
| 5454 | |
| 5455 | bool Player::displaceObject(const Point3F& displacement) |
| 5456 | { |
| 5457 | F32 vellen = mVelocity.len(); |
| 5458 | if (vellen < 0.001f || sBalance > 16) { |
| 5459 | mVelocity.set(0.0f, 0.0f, 0.0f); |
| 5460 | return false; |
| 5461 | } |
| 5462 | |
| 5463 | F32 dt = displacement.len() / vellen; |
| 5464 | |
| 5465 | sBalance++; |
| 5466 | |
| 5467 | bool result = updatePos(dt); |
| 5468 | |
| 5469 | sBalance--; |
| 5470 | |
| 5471 | getTransform().getColumn(3, &mDelta.pos); |
| 5472 | mDelta.posVec.set(0.0f, 0.0f, 0.0f); |
| 5473 | |
| 5474 | return result; |
| 5475 | } |
| 5476 | |
| 5477 | #else |
| 5478 |
no test coverage detected