summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbjarni <bjarni@openttd.org>2007-08-07 23:07:10 +0000
committerbjarni <bjarni@openttd.org>2007-08-07 23:07:10 +0000
commita973c893fbcde83fe4e269f609e9dae27bf17e9e (patch)
tree8fae74afa5edd164c837717a6ea4224538415e94 /src
parentfcf9130ee5e684e60134eb0988f0e5508e15db61 (diff)
downloadopenttd-a973c893fbcde83fe4e269f609e9dae27bf17e9e.tar.xz
(svn r10823) -Fix r8610 [FS#1097]: the autoreplace window vehicle count didn't always update correctly) (Matthias)
Diffstat (limited to 'src')
-rw-r--r--src/aircraft_cmd.cpp2
-rw-r--r--src/roadveh_cmd.cpp2
-rw-r--r--src/ship_cmd.cpp2
-rw-r--r--src/train_cmd.cpp4
4 files changed, 5 insertions, 5 deletions
diff --git a/src/aircraft_cmd.cpp b/src/aircraft_cmd.cpp
index b21448786..6e2977dc2 100644
--- a/src/aircraft_cmd.cpp
+++ b/src/aircraft_cmd.cpp
@@ -452,7 +452,7 @@ CommandCost CmdBuildAircraft(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
RebuildVehicleLists();
InvalidateWindow(WC_COMPANY, v->owner);
if (IsLocalPlayer())
- InvalidateAutoreplaceWindow(VEH_AIRCRAFT, v->group_id); //updates the replace Aircraft window
+ InvalidateAutoreplaceWindow(v->engine_type, v->group_id); //updates the replace Aircraft window
GetPlayer(_current_player)->num_engines[p1]++;
}
diff --git a/src/roadveh_cmd.cpp b/src/roadveh_cmd.cpp
index 796f86f76..5050fcb78 100644
--- a/src/roadveh_cmd.cpp
+++ b/src/roadveh_cmd.cpp
@@ -270,7 +270,7 @@ CommandCost CmdBuildRoadVeh(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
RebuildVehicleLists();
InvalidateWindow(WC_COMPANY, v->owner);
if (IsLocalPlayer())
- InvalidateAutoreplaceWindow(VEH_ROAD, v->group_id); // updates the replace Road window
+ InvalidateAutoreplaceWindow(v->engine_type, v->group_id); // updates the replace Road window
GetPlayer(_current_player)->num_engines[p1]++;
}
diff --git a/src/ship_cmd.cpp b/src/ship_cmd.cpp
index 1cba23e0d..29be282e6 100644
--- a/src/ship_cmd.cpp
+++ b/src/ship_cmd.cpp
@@ -897,7 +897,7 @@ CommandCost CmdBuildShip(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
RebuildVehicleLists();
InvalidateWindow(WC_COMPANY, v->owner);
if (IsLocalPlayer())
- InvalidateAutoreplaceWindow(VEH_SHIP, v->group_id); // updates the replace Ship window
+ InvalidateAutoreplaceWindow(v->engine_type, v->group_id); // updates the replace Ship window
GetPlayer(_current_player)->num_engines[p1]++;
diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp
index eab077ad6..d604d633d 100644
--- a/src/train_cmd.cpp
+++ b/src/train_cmd.cpp
@@ -588,7 +588,7 @@ static CommandCost CmdBuildRailWagon(EngineID engine, TileIndex tile, uint32 fla
InvalidateWindow(WC_VEHICLE_DEPOT, v->tile);
if (IsLocalPlayer()) {
- InvalidateAutoreplaceWindow(VEH_TRAIN, v->group_id); // updates the replace Train window
+ InvalidateAutoreplaceWindow(v->engine_type, v->group_id); // updates the replace Train window
}
GetPlayer(_current_player)->num_engines[engine]++;
}
@@ -772,7 +772,7 @@ CommandCost CmdBuildRailVehicle(TileIndex tile, uint32 flags, uint32 p1, uint32
RebuildVehicleLists();
InvalidateWindow(WC_COMPANY, v->owner);
if (IsLocalPlayer())
- InvalidateAutoreplaceWindow(VEH_TRAIN, v->group_id); // updates the replace Train window
+ InvalidateAutoreplaceWindow(v->engine_type, v->group_id); // updates the replace Train window
GetPlayer(_current_player)->num_engines[p1]++;
}