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 | 1f0735b6cc686b61690e6e01afbc44cefe23146a (patch) | |
tree | c736ab933eec1af444a60dc264f88a23edeb9e96 | |
parent | 5ebd8be2d638b580e6d6cc51615dc9f6629d88d8 (diff) | |
download | openttd-1f0735b6cc686b61690e6e01afbc44cefe23146a.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) |