Merge branch 'master' into jgrpp
# Conflicts: # .github/workflows/release-linux.yml # src/base_consist.h # src/blitter/32bpp_optimized.cpp # src/blitter/32bpp_optimized.hpp # src/blitter/32bpp_sse2.hpp # src/blitter/8bpp_optimized.hpp # src/gfx_func.h # src/industry_cmd.cpp # src/industrytype.h # src/linkgraph/linkgraphjob.cpp # src/mixer.cpp # src/newgrf_callbacks.h # src/openttd.cpp # src/os/macosx/macos.mm # src/os/windows/win32.cpp # src/pathfinder/npf/npf.cpp # src/road_cmd.cpp # src/saveload/afterload.cpp # src/saveload/saveload.h # src/saveload/vehicle_sl.cpp # src/sound.cpp # src/spritecache.cpp # src/spriteloader/spriteloader.hpp # src/station_map.h # src/timetable_cmd.cpp # src/timetable_cmd.h # src/timetable_gui.cpp # src/town_cmd.cpp # src/vehicle_cmd.cpp # src/vehicle_gui_base.h # src/video/opengl.cpp # src/video/opengl.h # src/viewport.cpp
This commit is contained in:
@@ -1486,6 +1486,7 @@ static CommandCost CmdBuildRailWagon(TileIndex tile, DoCommandFlag flags, const
|
||||
|
||||
v->group_id = DEFAULT_GROUP;
|
||||
|
||||
if (TestVehicleBuildProbability(v, v->engine_type, BuildProbabilityType::Reversed)) SetBit(v->flags, VRF_REVERSE_DIRECTION);
|
||||
AddArticulatedParts(v);
|
||||
|
||||
_new_vehicle_id = v->index;
|
||||
@@ -1520,6 +1521,7 @@ static CommandCost CmdBuildRailWagon(TileIndex tile, DoCommandFlag flags, const
|
||||
/** Move all free vehicles in the depot to the train */
|
||||
void NormalizeTrainVehInDepot(const Train *u)
|
||||
{
|
||||
assert(u->IsEngine());
|
||||
for (const Train *v : Train::Iterate()) {
|
||||
if (v->IsFreeWagon() && v->tile == u->tile &&
|
||||
v->track == TRACK_BIT_DEPOT &&
|
||||
@@ -1563,6 +1565,7 @@ static void AddRearEngineToMultiheadedTrain(Train *v)
|
||||
u->SetMultiheaded();
|
||||
if (v->IsVirtual()) u->SetVirtual();
|
||||
v->SetNext(u);
|
||||
if (TestVehicleBuildProbability(u, u->engine_type, BuildProbabilityType::Reversed)) SetBit(u->flags, VRF_REVERSE_DIRECTION);
|
||||
u->UpdatePosition();
|
||||
|
||||
/* Now we need to link the front and rear engines together */
|
||||
@@ -1640,6 +1643,7 @@ CommandCost CmdBuildRailVehicle(TileIndex tile, DoCommandFlag flags, const Engin
|
||||
v->SetFrontEngine();
|
||||
v->SetEngine();
|
||||
|
||||
if (TestVehicleBuildProbability(v, v->engine_type, BuildProbabilityType::Reversed)) SetBit(v->flags, VRF_REVERSE_DIRECTION);
|
||||
v->UpdatePosition();
|
||||
|
||||
if (rvi->railveh_type == RAILVEH_MULTIHEAD) {
|
||||
|
Reference in New Issue
Block a user