(svn r8897) -Fix
Change the signature of GetNewVehiclePos(): -void GetNewVehiclePos(const Vehicle *v, GetNewVehiclePosResult *gp); +GetNewVehiclePosResult GetNewVehiclePos(const Vehicle *v);
This commit is contained in:
@@ -2692,7 +2692,7 @@ void EndVehicleMove(Vehicle *v)
|
||||
}
|
||||
|
||||
/* returns true if staying in the same tile */
|
||||
void GetNewVehiclePos(const Vehicle *v, GetNewVehiclePosResult *gp)
|
||||
GetNewVehiclePosResult GetNewVehiclePos(const Vehicle *v)
|
||||
{
|
||||
static const int8 _delta_coord[16] = {
|
||||
-1,-1,-1, 0, 1, 1, 1, 0, /* x */
|
||||
@@ -2702,10 +2702,12 @@ void GetNewVehiclePos(const Vehicle *v, GetNewVehiclePosResult *gp)
|
||||
int x = v->x_pos + _delta_coord[v->direction];
|
||||
int y = v->y_pos + _delta_coord[v->direction + 8];
|
||||
|
||||
gp->x = x;
|
||||
gp->y = y;
|
||||
gp->old_tile = v->tile;
|
||||
gp->new_tile = TileVirtXY(x, y);
|
||||
GetNewVehiclePosResult gp;
|
||||
gp.x = x;
|
||||
gp.y = y;
|
||||
gp.old_tile = v->tile;
|
||||
gp.new_tile = TileVirtXY(x, y);
|
||||
return gp;
|
||||
}
|
||||
|
||||
static const Direction _new_direction_table[] = {
|
||||
|
Reference in New Issue
Block a user