(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

@@ -354,7 +354,7 @@ CommandCost CmdSetGroupReplaceProtection(TileIndex tile, uint32 flags, uint32 p1
*/
void RemoveVehicleFromGroup(const Vehicle *v)
{
if (!v->IsValid() || !(v->HasFront() && v->IsPrimaryVehicle())) return;
if (!v->IsValid() || !v->IsPrimaryVehicle()) return;
if (!IsDefaultGroupID(v->group_id)) DecreaseGroupNumVehicle(v->group_id);
}