mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-12 18:40:29 +00:00
(svn r8296) -Fix: GenerateVehicleSortList() tried to put a TileIndex into an uint16
-Fix: CmdMassStartStopVehicle() tried to put a TileIndex into an uint16 Those two bugs were unrelated to each other and unrelated to r8295, even though that commit touched the code in question
This commit is contained in:
parent
518c4cdfce
commit
59e6e762b8
@ -1621,7 +1621,7 @@ int32 CmdMassStartStopVehicle(TileIndex tile, uint32 flags, uint32 p1, uint32 p2
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (vehicle_list_window) {
|
if (vehicle_list_window) {
|
||||||
uint16 id = GB(p1, 0, 16);
|
uint32 id = p1;
|
||||||
uint16 window_type = p2 & VLW_MASK;
|
uint16 window_type = p2 & VLW_MASK;
|
||||||
|
|
||||||
engine_count = GenerateVehicleSortList((const Vehicle***)&vl, &engine_list_length, vehicle_type, _current_player, id, window_type);
|
engine_count = GenerateVehicleSortList((const Vehicle***)&vl, &engine_list_length, vehicle_type, _current_player, id, window_type);
|
||||||
@ -2369,7 +2369,7 @@ void BuildDepotVehicleList(byte type, TileIndex tile, Vehicle ***engine_list, ui
|
|||||||
* @param window_type tells what kind of window the list is for. Use the VLW flags in vehicle_gui.h
|
* @param window_type tells what kind of window the list is for. Use the VLW flags in vehicle_gui.h
|
||||||
* @return the number of vehicles added to the list
|
* @return the number of vehicles added to the list
|
||||||
*/
|
*/
|
||||||
uint GenerateVehicleSortList(const Vehicle ***sort_list, uint16 *length_of_array, byte type, PlayerID owner, uint16 index, uint16 window_type)
|
uint GenerateVehicleSortList(const Vehicle ***sort_list, uint16 *length_of_array, byte type, PlayerID owner, uint32 index, uint16 window_type)
|
||||||
{
|
{
|
||||||
const uint subtype = (type != VEH_Aircraft) ? Train_Front : 2;
|
const uint subtype = (type != VEH_Aircraft) ? Train_Front : 2;
|
||||||
uint n = 0;
|
uint n = 0;
|
||||||
|
@ -333,7 +333,7 @@ int CheckTrainStoppedInDepot(const Vehicle *v);
|
|||||||
|
|
||||||
bool VehicleNeedsService(const Vehicle *v);
|
bool VehicleNeedsService(const Vehicle *v);
|
||||||
|
|
||||||
uint GenerateVehicleSortList(const Vehicle*** sort_list, uint16 *length_of_array, byte type, PlayerID owner, uint16 index, uint16 window_type);
|
uint GenerateVehicleSortList(const Vehicle*** sort_list, uint16 *length_of_array, byte type, PlayerID owner, uint32 index, uint16 window_type);
|
||||||
void BuildDepotVehicleList(byte type, TileIndex tile, Vehicle ***engine_list, uint16 *engine_list_length, uint16 *engine_count, Vehicle ***wagon_list, uint16 *wagon_list_length, uint16 *wagon_count);
|
void BuildDepotVehicleList(byte type, TileIndex tile, Vehicle ***engine_list, uint16 *engine_list_length, uint16 *engine_count, Vehicle ***wagon_list, uint16 *wagon_list_length, uint16 *wagon_count);
|
||||||
int32 SendAllVehiclesToDepot(byte type, uint32 flags, bool service, PlayerID owner, uint16 vlw_flag, uint32 id);
|
int32 SendAllVehiclesToDepot(byte type, uint32 flags, bool service, PlayerID owner, uint16 vlw_flag, uint32 id);
|
||||||
bool IsVehicleInDepot(const Vehicle *v);
|
bool IsVehicleInDepot(const Vehicle *v);
|
||||||
|
Loading…
Reference in New Issue
Block a user