diff options
author | celestar <celestar@openttd.org> | 2006-05-11 05:32:26 +0000 |
---|---|---|
committer | celestar <celestar@openttd.org> | 2006-05-11 05:32:26 +0000 |
commit | 26f17e3e013e6b43d55da7ac32224095fbce8c6d (patch) | |
tree | c736ab933eec1af444a60dc264f88a23edeb9e96 | |
parent | 90be3fadf71877f26a1c79da3ba43cd544efabb9 (diff) | |
download | openttd-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.c | 5 |
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) |