@@ -355,29 +355,29 @@ void Ship::UpdateDeltaXY()
if (this->direction != this->rotation) {
/* If we are rotating, then it is possible the ship was moved to its next position. In that
* case, because we are still showing the old direction, the ship will appear to glitch sideways
* slightly. We can work around this by applying an additional offset to make the ship appear
* where it was before it moved. */
this->x_offs -= this->x_pos - this->rotation_x_pos;
this->y_offs -= this->y_pos - this->rotation_y_pos;
}
/**
* Test-procedure for HasVehicleOnPos to check for any ships which are visible and not stopped by the player.
* Test-procedure for HasVehicleOnPos to check for any ships which are moving.
*/
static Vehicle *EnsureNoMovingShipProc(Vehicle *v, void *)
{
return v->type == VEH_SHIP && (v->vehstatus & (VS_HIDDEN | VS_STOPPED)) == 0 ? v : nullptr;
return v->type == VEH_SHIP && v->cur_speed != 0 ? v : nullptr;
static bool CheckReverseShip(const Ship *v, Trackdir *trackdir = nullptr)
/* Ask pathfinder for best direction */
bool reverse = false;
switch (_settings_game.pf.pathfinder_for_ships) {
case VPF_NPF: reverse = NPFShipCheckReverse(v, trackdir); break;
case VPF_YAPF: reverse = YapfShipCheckReverse(v, trackdir); break;
default: NOT_REACHED();
return reverse;
Status change: