mirror of https://github.com/OpenRCT2/OpenRCT2.git
Make changes for set last network position change
This commit is contained in:
parent
71bdd28022
commit
a8cf6381da
|
@ -59,8 +59,6 @@ public:
|
||||||
res->Position.z = _origin.z;
|
res->Position.z = _origin.z;
|
||||||
res->ExpenditureType = RCT_EXPENDITURE_TYPE_RIDE_CONSTRUCTION;
|
res->ExpenditureType = RCT_EXPENDITURE_TYPE_RIDE_CONSTRUCTION;
|
||||||
|
|
||||||
int16_t trackpieceZ = _origin.z;
|
|
||||||
|
|
||||||
// Stations require some massaging of the track type for comparing
|
// Stations require some massaging of the track type for comparing
|
||||||
auto comparableTrackType = _trackType;
|
auto comparableTrackType = _trackType;
|
||||||
switch (_trackType)
|
switch (_trackType)
|
||||||
|
@ -145,6 +143,9 @@ public:
|
||||||
startLoc.x -= trackLoc.x;
|
startLoc.x -= trackLoc.x;
|
||||||
startLoc.y -= trackLoc.y;
|
startLoc.y -= trackLoc.y;
|
||||||
startLoc.z -= trackBlock->z;
|
startLoc.z -= trackBlock->z;
|
||||||
|
res->Position.x = startLoc.x;
|
||||||
|
res->Position.y = startLoc.y;
|
||||||
|
res->Position.z = startLoc.z;
|
||||||
|
|
||||||
money32 cost = 0;
|
money32 cost = 0;
|
||||||
|
|
||||||
|
@ -160,8 +161,6 @@ public:
|
||||||
|
|
||||||
map_invalidate_tile_full(mapLoc.x, mapLoc.y);
|
map_invalidate_tile_full(mapLoc.x, mapLoc.y);
|
||||||
|
|
||||||
trackpieceZ = mapLoc.z;
|
|
||||||
|
|
||||||
found = false;
|
found = false;
|
||||||
tileElement = map_get_first_element_at(mapLoc.x / 32, mapLoc.y / 32);
|
tileElement = map_get_first_element_at(mapLoc.x / 32, mapLoc.y / 32);
|
||||||
do
|
do
|
||||||
|
@ -249,12 +248,6 @@ public:
|
||||||
else
|
else
|
||||||
price *= -10;
|
price *= -10;
|
||||||
|
|
||||||
LocationXYZ16 coord;
|
|
||||||
coord.x = startLoc.x + 16;
|
|
||||||
coord.y = startLoc.y + 16;
|
|
||||||
coord.z = trackpieceZ;
|
|
||||||
network_set_player_last_action_coord(network_get_player_index(game_command_playerid), coord);
|
|
||||||
|
|
||||||
res->Cost = price;
|
res->Cost = price;
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
@ -267,8 +260,6 @@ public:
|
||||||
res->Position.z = _origin.z;
|
res->Position.z = _origin.z;
|
||||||
res->ExpenditureType = RCT_EXPENDITURE_TYPE_RIDE_CONSTRUCTION;
|
res->ExpenditureType = RCT_EXPENDITURE_TYPE_RIDE_CONSTRUCTION;
|
||||||
|
|
||||||
int16_t trackpieceZ = _origin.z;
|
|
||||||
|
|
||||||
// Stations require some massaging of the track type for comparing
|
// Stations require some massaging of the track type for comparing
|
||||||
auto comparableTrackType = _trackType;
|
auto comparableTrackType = _trackType;
|
||||||
switch (_trackType)
|
switch (_trackType)
|
||||||
|
@ -348,7 +339,9 @@ public:
|
||||||
startLoc.x -= trackLoc.x;
|
startLoc.x -= trackLoc.x;
|
||||||
startLoc.y -= trackLoc.y;
|
startLoc.y -= trackLoc.y;
|
||||||
startLoc.z -= trackBlock->z;
|
startLoc.z -= trackBlock->z;
|
||||||
|
res->Position.x = startLoc.x;
|
||||||
|
res->Position.y = startLoc.y;
|
||||||
|
res->Position.z = startLoc.z;
|
||||||
money32 cost = 0;
|
money32 cost = 0;
|
||||||
|
|
||||||
trackBlock = get_track_def_from_ride(ride, trackType);
|
trackBlock = get_track_def_from_ride(ride, trackType);
|
||||||
|
@ -363,8 +356,6 @@ public:
|
||||||
|
|
||||||
map_invalidate_tile_full(mapLoc.x, mapLoc.y);
|
map_invalidate_tile_full(mapLoc.x, mapLoc.y);
|
||||||
|
|
||||||
trackpieceZ = mapLoc.z;
|
|
||||||
|
|
||||||
found = false;
|
found = false;
|
||||||
tileElement = map_get_first_element_at(mapLoc.x / 32, mapLoc.y / 32);
|
tileElement = map_get_first_element_at(mapLoc.x / 32, mapLoc.y / 32);
|
||||||
do
|
do
|
||||||
|
@ -515,12 +506,6 @@ public:
|
||||||
else
|
else
|
||||||
price *= -10;
|
price *= -10;
|
||||||
|
|
||||||
LocationXYZ16 coord;
|
|
||||||
coord.x = startLoc.x + 16;
|
|
||||||
coord.y = startLoc.y + 16;
|
|
||||||
coord.z = trackpieceZ;
|
|
||||||
network_set_player_last_action_coord(network_get_player_index(game_command_playerid), coord);
|
|
||||||
|
|
||||||
res->Cost = price;
|
res->Cost = price;
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue