Merge branch 'tracerestrict-sx' into jgrpp
# Conflicts: # src/command.cpp # src/group_gui.cpp # src/lang/english.txt # src/saveload/extended_ver_sl.cpp # src/settings_gui.cpp # src/tracerestrict.cpp # src/tracerestrict.h # src/tracerestrict_gui.cpp # src/vehicle_gui.cpp # src/vehicle_gui_base.h # src/vehiclelist.cpp # src/window_type.h
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
#include "autoreplace_func.h"
|
||||
#include "autoreplace_gui.h"
|
||||
#include "articulated_vehicles.h"
|
||||
#include "tracerestrict.h"
|
||||
#include "core/random_func.hpp"
|
||||
|
||||
#include "table/strings.h"
|
||||
@@ -567,6 +568,11 @@ static CommandCost ReplaceChain(Vehicle **chain, DoCommandFlag flags, bool wagon
|
||||
/* Success ! */
|
||||
if ((flags & DC_EXEC) != 0 && new_head != old_head) {
|
||||
*chain = new_head;
|
||||
if (HasBit(Train::From(old_head)->flags, VRF_HAVE_SLOT)) {
|
||||
TraceRestrictTransferVehicleOccupantInAllSlots(old_head->index, new_head->index);
|
||||
ClrBit(Train::From(old_head)->flags, VRF_HAVE_SLOT);
|
||||
SetBit(Train::From(new_head)->flags, VRF_HAVE_SLOT);
|
||||
}
|
||||
}
|
||||
|
||||
/* Transfer cargo of old vehicles and sell them */
|
||||
|
Reference in New Issue
Block a user