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:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user