Merge branch 'master' into jgrpp
# Conflicts: # src/vehicle_cmd.cpp
This commit is contained in:
@@ -3845,7 +3845,8 @@ uint16 ReversingDistanceTargetSpeed(const Train *v)
|
||||
bool TrainController(Train *v, Vehicle *nomove, bool reverse)
|
||||
{
|
||||
Train *first = v->First();
|
||||
Train *prev;
|
||||
Train *prev = nullptr;
|
||||
SCOPE_INFO_FMT([&], "TrainController: %s, %s, %s", scope_dumper().VehicleInfo(v), scope_dumper().VehicleInfo(prev), scope_dumper().VehicleInfo(nomove));
|
||||
bool direction_changed = false; // has direction of any part changed?
|
||||
bool update_signal_tunbridge_exit = false;
|
||||
Direction old_direction = INVALID_DIR;
|
||||
@@ -4378,7 +4379,7 @@ bool TrainController(Train *v, Vehicle *nomove, bool reverse)
|
||||
|
||||
invalid_rail:
|
||||
/* We've reached end of line?? */
|
||||
if (prev != NULL) error("Disconnecting train");
|
||||
if (prev != NULL) return true; //error("Disconnecting train");
|
||||
|
||||
reverse_train_direction:
|
||||
if (old_trackbits != INVALID_TRACK_BIT && (v->track ^ old_trackbits) & TRACK_BIT_WORMHOLE) {
|
||||
@@ -5471,7 +5472,7 @@ CommandCost CmdTemplateReplaceVehicle(TileIndex tile, DoCommandFlag flags, uint3
|
||||
// the template refit will be set further down, if we use it at all
|
||||
if (!use_refit) {
|
||||
uint32 cb = GetCmdRefitVeh(new_chain);
|
||||
DoCommand(new_chain->tile, new_chain->index, store_refit_ct | store_refit_csubt << 8 | 1 << 16 | (1 << 5), flags, cb);
|
||||
DoCommand(new_chain->tile, new_chain->index, store_refit_ct | store_refit_csubt << 8 | (1 << 16) | (1 << 31), flags, cb);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5509,10 +5510,10 @@ CommandCost CmdTemplateReplaceVehicle(TileIndex tile, DoCommandFlag flags, uint3
|
||||
if (need_refit && flags == DC_EXEC) {
|
||||
if (use_refit) {
|
||||
uint32 cb = GetCmdRefitVeh(tmp_chain);
|
||||
DoCommand(tmp_chain->tile, tmp_chain->index, cur_tmpl->cargo_type | (cur_tmpl->cargo_subtype << 8) | (1 << 16) | (1 << 5), flags, cb);
|
||||
DoCommand(tmp_chain->tile, tmp_chain->index, cur_tmpl->cargo_type | (cur_tmpl->cargo_subtype << 8) | (1 << 16) | (1 << 31), flags, cb);
|
||||
} else {
|
||||
uint32 cb = GetCmdRefitVeh(tmp_chain);
|
||||
DoCommand(tmp_chain->tile, tmp_chain->index, store_refit_ct | (store_refit_csubt << 8) | (1 << 16) | (1 << 5), flags, cb);
|
||||
DoCommand(tmp_chain->tile, tmp_chain->index, store_refit_ct | (store_refit_csubt << 8) | (1 << 16) | (1 << 31), flags, cb);
|
||||
}
|
||||
}
|
||||
cur_tmpl = cur_tmpl->GetNextUnit();
|
||||
|
Reference in New Issue
Block a user