TBTR: Fix virtual trains being created at load using wrong company.

Fix virtual trains showing up in company engine counts.
This commit is contained in:
Jonathan G Rennison
2016-03-21 18:22:29 +00:00
parent cf638e836a
commit 6741c98f6b
4 changed files with 14 additions and 1 deletions

View File

@@ -653,6 +653,7 @@ uint CountVehiclesInChain(const Vehicle *v)
*/
bool Vehicle::IsEngineCountable() const
{
if (HasBit(this->subtype, GVSF_VIRTUAL)) return false;
switch (this->type) {
case VEH_AIRCRAFT: return Aircraft::From(this)->IsNormalAircraft(); // don't count plane shadows and helicopter rotors
case VEH_TRAIN: