1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-27 00:19:09 +00:00

(svn r11068) -Codechange: remove Vehicle::HasFront as all vehicles have the Vehicle::first pointer correctly set.

This commit is contained in:
rubidium
2007-09-09 11:23:49 +00:00
parent efea7622ac
commit 40b871410b
8 changed files with 5 additions and 15 deletions

View File

@@ -509,8 +509,6 @@ static uint32 VehicleGetVariable(const ResolverObject *object, byte variable, by
switch (variable) {
case 0x40: // Get length of consist
case 0x41: // Get length of same consecutive wagons
if (!v->HasFront()) return 1;
{
const Vehicle* u;
byte chain_before = 0;
@@ -832,7 +830,7 @@ static inline void NewVehicleResolver(ResolverObject *res, EngineID engine_type,
res->ResolveReal = &VehicleResolveReal;
res->u.vehicle.self = v;
res->u.vehicle.parent = (v != NULL && v->HasFront()) ? v->First() : v;
res->u.vehicle.parent = (v != NULL) ? v->First() : v;
res->u.vehicle.self_type = engine_type;