summaryrefslogtreecommitdiff
path: root/src/engine.cpp
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2008-05-14 15:29:48 +0000
committersmatz <smatz@openttd.org>2008-05-14 15:29:48 +0000
commitf64c4fc4fbf9ca976074647a8d259143e9355096 (patch)
treed8f32e0f77faa771a8fb4a73724c598581994d34 /src/engine.cpp
parent044f385f9c6bb510712d5266a6073793344d8a26 (diff)
downloadopenttd-f64c4fc4fbf9ca976074647a8d259143e9355096.tar.xz
(svn r13086) -Fix: do not crash badly after loading a newgrf with engines in-game that often
Diffstat (limited to 'src/engine.cpp')
-rw-r--r--src/engine.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/engine.cpp b/src/engine.cpp
index 818cd2d6e..4a548b967 100644
--- a/src/engine.cpp
+++ b/src/engine.cpp
@@ -141,6 +141,9 @@ void EngList_SortPartial(EngineList *el, EngList_SortTypeFunction compare, uint
qsort(&((*el)[begin]), num_items, sizeof(EngineID), compare);
}
+
+/** Sets cached values in Player::num_vehicles and Group::num_vehicles
+ */
void SetCachedEngineCounts()
{
uint engines = GetEnginePoolSize();