(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
--- a/viewport.c Wed May 10 21:55:44 2006 +0000
+++ b/viewport.c Thu May 11 05:32:26 2006 +0000
@@ -1686,7 +1686,10 @@
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)