summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2012-04-22 16:27:41 +0000
committerfrosch <frosch@openttd.org>2012-04-22 16:27:41 +0000
commit1b0d3e3034b4f7a43d4d32692861a1d07bb0f50c (patch)
treebe5a912352da0cdacb828b022b13a31e97c8143b
parentc8ec47130d15ffc1ca4af612039ac27d7fab776c (diff)
downloadopenttd-1b0d3e3034b4f7a43d4d32692861a1d07bb0f50c.tar.xz
(svn r24159) -Fix: If you spent hard work on finding an available object ID, you should probably also use it instead of always 0.
-rw-r--r--src/object_gui.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/object_gui.cpp b/src/object_gui.cpp
index e18f6c4f9..241fcdca6 100644
--- a/src/object_gui.cpp
+++ b/src/object_gui.cpp
@@ -326,7 +326,7 @@ public:
for (uint i = 0; i < ObjectClass::GetCount(_selected_object_class); i++) {
const ObjectSpec *spec = ObjectClass::Get(_selected_object_class, i);
if (spec->IsAvailable()) {
- this->SelectOtherObject(0);
+ this->SelectOtherObject(i);
return;
}
}