summaryrefslogtreecommitdiff
path: root/src/roadveh_cmd.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-08-03 19:36:00 +0000
committerrubidium <rubidium@openttd.org>2007-08-03 19:36:00 +0000
commit836105864c840469cbaea7776fe376a2008d72fc (patch)
treeea92676733322e0fc10f54254112dd92b294ebfb /src/roadveh_cmd.cpp
parentaa9869e2de9117bbe0203aa1485ae6b5acac6f03 (diff)
downloadopenttd-836105864c840469cbaea7776fe376a2008d72fc.tar.xz
(svn r10770) -Codechange: use the pool item class as super class for the vehicle struct.
-Codechange: do not force "special" vehicles to be allocated in the low 1024 vehicle slots and non "special" vehicles in the rest of the slots.
Diffstat (limited to 'src/roadveh_cmd.cpp')
-rw-r--r--src/roadveh_cmd.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/roadveh_cmd.cpp b/src/roadveh_cmd.cpp
index 0180b345f..56d48a816 100644
--- a/src/roadveh_cmd.cpp
+++ b/src/roadveh_cmd.cpp
@@ -185,7 +185,7 @@ CommandCost CmdBuildRoadVeh(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
Vehicle *vl[11];
memset(&vl, 0, sizeof(vl));
- if (!AllocateVehicles(vl, num_vehicles)) {
+ if (!Vehicle::AllocateList(vl, num_vehicles)) {
return_cmd_error(STR_00E1_TOO_MANY_VEHICLES_IN_GAME);
}
@@ -372,7 +372,7 @@ CommandCost CmdSellRoadVeh(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
InvalidateWindow(WC_COMPANY, v->owner);
DeleteWindowById(WC_VEHICLE_VIEW, v->index);
DeleteDepotHighlightOfVehicle(v);
- DeleteVehicle(v);
+ delete v;
}
return CommandCost(-v->value);
@@ -610,7 +610,7 @@ static void DeleteLastRoadVeh(Vehicle *v)
BeginVehicleMove(v);
EndVehicleMove(v);
- DeleteVehicle(v);
+ delete v;
}
static byte SetRoadVehPosition(Vehicle *v, int x, int y)