* Flying projectiles cannot be cancelled, * but they can be "skipped". */
| 587 | * but they can be "skipped". |
| 588 | */ |
| 589 | void ProjectileFlyBState::cancel() |
| 590 | { |
| 591 | if (_parent->getMap()->getProjectile()) |
| 592 | { |
| 593 | _parent->getMap()->getProjectile()->skipTrajectory(); |
| 594 | Position p = _parent->getMap()->getProjectile()->getPosition(); |
| 595 | if (!_parent->getMap()->getCamera()->isOnScreen(Position(p.x/16, p.y/16, p.z/24), false)) |
| 596 | _parent->getMap()->getCamera()->centerOnPosition(Position(p.x/16, p.y/16, p.z/24)); |
| 597 | } |
| 598 | } |
| 599 | |
| 600 | /** |
| 601 | * Validates the throwing range. |
nothing calls this directly
no test coverage detected