summaryrefslogtreecommitdiff
path: root/src/economy.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2013-01-02 22:20:07 +0000
committerrubidium <rubidium@openttd.org>2013-01-02 22:20:07 +0000
commit0dd0bbc0717a62fab93a3279085b7a609526725e (patch)
tree878d48fb442a2359bc9a6d72da4042c6f0866d24 /src/economy.cpp
parent34b7a60a546c95299e4bfff66f2d52ebc69e46d0 (diff)
downloadopenttd-0dd0bbc0717a62fab93a3279085b7a609526725e.tar.xz
(svn r24882) -Fix: desync when NewGRF changes the stats related to acceleration (power, weight, tractive effort, etc) during service or 32 day triggers
Diffstat (limited to 'src/economy.cpp')
-rw-r--r--src/economy.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/economy.cpp b/src/economy.cpp
index 92f9a0cd5..cfb5a4ea1 100644
--- a/src/economy.cpp
+++ b/src/economy.cpp
@@ -1637,6 +1637,9 @@ static void LoadUnloadVehicle(Vehicle *front, int *cargo_left)
front->load_unload_ticks = max(1, unloading_time);
if (completely_emptied) {
+ /* Make sure the vehicle is marked dirty, since we need to update the NewGRF
+ * properties such as weight, power and TE whenever the trigger runs. */
+ assert(dirty_vehicle);
TriggerVehicle(front, VEHICLE_TRIGGER_EMPTY);
}