mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-09 15:41:15 +00:00
(svn r22048) -Fix (r4495): company 0 does not always exist, so put temporary vehicles in a valid company
This commit is contained in:
parent
421ba1c342
commit
16dd93d3fb
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user