diff options
author | glx <glx@openttd.org> | 2011-02-10 15:58:22 +0000 |
---|---|---|
committer | glx <glx@openttd.org> | 2011-02-10 15:58:22 +0000 |
commit | 16dd93d3fbb42141e7d24f14b928ba7579980347 (patch) | |
tree | 36e5c8884b350b594e766191bd2f6bbbbfd533a8 /src | |
parent | 421ba1c3421d11ea62438c14e47591a3360948d7 (diff) | |
download | openttd-16dd93d3fbb42141e7d24f14b928ba7579980347.tar.xz |
(svn r22048) -Fix (r4495): company 0 does not always exist, so put temporary vehicles in a valid company
Diffstat (limited to 'src')
-rw-r--r-- | src/articulated_vehicles.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/articulated_vehicles.cpp b/src/articulated_vehicles.cpp index ae6b9d5e6..95ec4871a 100644 --- a/src/articulated_vehicles.cpp +++ b/src/articulated_vehicles.cpp @@ -14,6 +14,7 @@ #include "roadveh.h" #include "vehicle_func.h" #include "engine_func.h" +#include "company_func.h" #include "table/strings.h" #include "table/sprites.h" @@ -51,6 +52,7 @@ uint CountArticulatedParts(EngineID engine_type, bool purchase_window) if (!purchase_window) { v = new Vehicle(); v->engine_type = engine_type; + v->owner = _current_company; } uint i; |