summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcelestar <celestar@openttd.org>2006-05-11 05:32:26 +0000
committercelestar <celestar@openttd.org>2006-05-11 05:32:26 +0000
commit26f17e3e013e6b43d55da7ac32224095fbce8c6d (patch)
treec736ab933eec1af444a60dc264f88a23edeb9e96
parent90be3fadf71877f26a1c79da3ba43cd544efabb9 (diff)
downloadopenttd-26f17e3e013e6b43d55da7ac32224095fbce8c6d.tar.xz
(svn r4819) -Debug: When clicking on a vehicle in the viewport, the index and address of the vehicle get dumped for "misc" debug levels >= 2
-rw-r--r--viewport.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/viewport.c b/viewport.c
index d9c7afd62..1e879e51b 100644
--- a/viewport.c
+++ b/viewport.c
@@ -1686,7 +1686,10 @@ void HandleViewportClicked(const ViewPort *vp, int x, int y)
CheckClickOnLandscape(vp, x, y);
v = CheckClickOnVehicle(vp, x, y);
- if (v != NULL) _on_vehicle_click_proc[v->type - 0x10](v);
+ if (v != NULL) {
+ DEBUG(misc, 2) ("Vehicle %d at %p", v->index, v);
+ _on_vehicle_click_proc[v->type - 0x10](v);
+ }
}
Vehicle *CheckMouseOverVehicle(void)