Index: code/ship/ship.cpp
===================================================================
RCS file: /home/fs2source/cvsroot/fs2_open/code/ship/ship.cpp,v
retrieving revision 2.336.2.17
diff -u -r2.336.2.17 ship.cpp
--- code/ship/ship.cpp	20 Jul 2006 00:41:26 -0000	2.336.2.17
+++ code/ship/ship.cpp	21 Jul 2006 02:51:41 -0000
@@ -5761,9 +5761,11 @@
 	int num = obj->instance;
 	Assert( num >= 0);
 	ship *shipp = &Ships[num];
+	ship *warp_shipp = NULL;
 	ship_info *si = &Ship_info[Ships[num].ship_info_index];
 	bool reset_proj_when_done = false;
-	
+	dock_function_info dfi;
+
 
 #if 0
 	// show target when attacking big ship
@@ -5832,12 +5834,26 @@
 		}
 	}
 
-	MONITOR_INC( NumShipsRend, 1 );	
+	MONITOR_INC( NumShipsRend, 1 );
 
-	// Make ships that are warping in not render during stage 1
-	if (!(shipp->flags & SF_ARRIVING_STAGE_1))
-	{				
+	bool is_first_stage_arrival = false;
+
+	memset( &dfi, 0, sizeof(dock_function_info) );
 
+	// look for a warping ship, whether for me or for anybody I'm docked with
+	dock_evaluate_all_docked_objects(obj, &dfi, ship_find_warping_ship_helper);
+
+	// if any docked objects are set to stage 1 arrival then set bool
+	if (dfi.maintained_variables.bool_value) {
+		warp_shipp = &Ships[dfi.maintained_variables.objp_value->instance];
+
+		is_first_stage_arrival = ((warp_shipp->flags & SF_ARRIVING_STAGE_1) > 0);
+	}
+
+
+	// Make ships that are warping in not render during stage 1
+	if ( !(is_first_stage_arrival) )
+	{
 		if ( Ship_shadows && shipfx_in_shadow( obj ) )	{
 			light_set_shadow(1);
 		} else {
@@ -6078,18 +6094,12 @@
 			// set up the model renderer to only draw the polygons in front
 			// of the warp in effect
 			int clip_started = 0;
-			dock_function_info dfi;
-
-			// look for a warping ship, whether for me or for anybody I'm docked with
-			dock_evaluate_all_docked_objects(obj, &dfi, ship_find_warping_ship_helper);
 
 			// Warp_shipp points to the ship that is going through a
 			// warp... either this ship or the ship it is docked with.
-			if ( dfi.maintained_variables.bool_value )
+			if ( warp_shipp != NULL )
 			{
-				ship *warp_shipp = &Ships[dfi.maintained_variables.objp_value->instance];
-
-				if(Ship_info[warp_shipp->ship_info_index].warpout_type == WT_DEFAULT)
+				if (Ship_info[warp_shipp->ship_info_index].warpout_type == WT_DEFAULT)
 				{
 					clip_started = 1;
 					g3_start_user_clip_plane( &warp_shipp->warp_effect_pos, &warp_shipp->warp_effect_fvec );
