summaryrefslogtreecommitdiff
path: root/src/engine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine.cpp')
-rw-r--r--src/engine.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/engine.cpp b/src/engine.cpp
index 05bbc9113..4e212640e 100644
--- a/src/engine.cpp
+++ b/src/engine.cpp
@@ -477,6 +477,7 @@ void SetCachedEngineCounts()
/* Recalculate */
Group *g;
FOR_ALL_GROUPS(g) {
+ g->num_vehicle = 0;
free(g->num_engines);
g->num_engines = CallocT<EngineID>(engines);
}
@@ -496,6 +497,7 @@ void SetCachedEngineCounts()
assert(v->owner == g->owner);
g->num_engines[v->engine_type]++;
+ if (v->IsPrimaryVehicle()) g->num_vehicle++;
}
}