From 26f17e3e013e6b43d55da7ac32224095fbce8c6d Mon Sep 17 00:00:00 2001 From: celestar Date: Thu, 11 May 2006 05:32:26 +0000 Subject: (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 --- viewport.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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) -- cgit v1.2.3-70-g09d2