(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
authorcelestar
Thu, 11 May 2006 05:32:26 +0000
changeset 3809 d67cd0232924
parent 3808 dadaaa757e8f
child 3810 97155cbcfbf4
(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
--- 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)