Merge branch 'master' into jgrpp

# Conflicts:
#	.github/workflows/release-linux.yml
#	.github/workflows/release.yml
#	src/rail_cmd.cpp
#	src/rail_gui.cpp
#	src/script/api/script_rail.cpp
#	src/settings_gui.cpp
#	src/signal_type.h
#	src/video/sdl2_v.cpp
This commit is contained in:
Jonathan G Rennison
2024-01-16 00:38:56 +00:00
88 changed files with 417 additions and 131 deletions

View File

@@ -22,6 +22,7 @@
#include "../string_func.h"
#include "../error.h"
#include "../strings_func.h"
#include "../economy_base.h"
#include "../3rdparty/cpp-btree/btree_map.h"
#include "../core/format.hpp"
@@ -205,6 +206,19 @@ void UpdateOldAircraft()
SetAircraftPosition(a, gp.x, gp.y, GetAircraftFlightLevel(a));
}
}
/* Clear aircraft from loading vehicles, if we bumped them into the air. */
for (Station *st : Station::Iterate()) {
for (auto iter = st->loading_vehicles.begin(); iter != st->loading_vehicles.end(); /* nothing */) {
Vehicle *v = *iter;
if (v->type == VEH_AIRCRAFT && !v->current_order.IsType(OT_LOADING)) {
iter = st->loading_vehicles.erase(iter);
delete v->cargo_payment;
} else {
++iter;
}
}
}
}
/**