(svn r21516) -Codechange: Add IsGroundVehicle function to the Vehicle class.

This commit is contained in:
terkhen
2010-12-14 21:26:03 +00:00
parent 96b98b392a
commit 79e2b3153d
9 changed files with 27 additions and 18 deletions

View File

@@ -611,7 +611,7 @@ static uint32 VehicleGetVariable(const ResolverObject *object, byte variable, by
* B - current wagon to next wagon, 0 if wagon is last
* T - previous wagon to next wagon, 0 in an S-bend
*/
if (v->type != VEH_TRAIN && v->type != VEH_ROAD) return 0;
if (!v->IsGroundVehicle()) return 0;
const Vehicle *u_p = v->Previous();
const Vehicle *u_n = v->Next();