Index: code/ship/ship.cpp
===================================================================
RCS file: /home/fs2source/cvsroot/fs2_open/code/ship/ship.cpp,v
retrieving revision 2.217
diff -u -r2.217 ship.cpp
--- code/ship/ship.cpp	30 Jul 2005 22:34:42 -0000	2.217
+++ code/ship/ship.cpp	7 Aug 2005 09:04:51 -0000
@@ -5271,6 +5271,15 @@
 			hud_set_wingman_status_departed(sp->wing_status_wing_index, sp->wing_status_wing_pos);
 		}
 
+		// if ship belongs to a wing -- increment the total number of ships in the wing vanished
+		if ( sp->wingnum != -1 ) {
+			wing *wingp;
+
+			wingp = &Wings[sp->wingnum];
+			// don't increment as a destroyed ship since that would make it logged
+			ship_wing_cleanup( objp->instance, wingp );
+		}
+
 		ai_ship_destroy(objp->instance, SEF_DEPARTED);		// should still do AI cleanup after ship has departed
 		ship_clear_decals(sp);
 	}
