| 397 | } |
| 398 | |
| 399 | void SystemObject::enterOrbit(CelestialCoordinate const& target, Vec2F const& targetPosition, double time) { |
| 400 | int direction = Random::randf() > 0.5 ? 1 : -1; // random direction |
| 401 | m_orbit.set(CelestialOrbit{target, direction, time, targetPosition - position()}); |
| 402 | m_approach.reset(); |
| 403 | } |
| 404 | |
| 405 | Maybe<CelestialCoordinate> SystemObject::orbitTarget() const { |
| 406 | if (m_orbit.get()) |
no test coverage detected