Change: Remove direction parameter from Vehicle::UpdateDeltaXY. (#6792)

The value is either unused or always the same as this->direction.
This commit is contained in:
PeterN
2018-05-22 18:43:34 +01:00
committed by GitHub
parent 4cebebcf68
commit a07394a63a
14 changed files with 33 additions and 34 deletions

View File

@@ -296,7 +296,7 @@ TileIndex Ship::GetOrderStationLocation(StationID station)
}
}
void Ship::UpdateDeltaXY(Direction direction)
void Ship::UpdateDeltaXY()
{
static const int8 _delta_xy_table[8][4] = {
/* y_extent, x_extent, y_offs, x_offs */
@@ -310,7 +310,7 @@ void Ship::UpdateDeltaXY(Direction direction)
{32, 6, -16, -3}, // NW
};
const int8 *bb = _delta_xy_table[direction];
const int8 *bb = _delta_xy_table[this->direction];
this->x_offs = bb[3];
this->y_offs = bb[2];
this->x_extent = bb[1];
@@ -670,7 +670,7 @@ CommandCost CmdBuildShip(TileIndex tile, DoCommandFlag flags, const Engine *e, u
v->y_pos = y;
v->z_pos = GetSlopePixelZ(x, y);
v->UpdateDeltaXY(v->direction);
v->UpdateDeltaXY();
v->vehstatus = VS_HIDDEN | VS_STOPPED | VS_DEFPAL;
v->spritenum = svi->image_index;