@@ -885,12 +885,8 @@ void render_one_model_htl(object *objp)
885885 // build flags
886886 if ((Show_ship_models || Show_outlines) && ((objp->type == OBJ_SHIP) || (objp->type == OBJ_START))){
887887 g3_start_instance_matrix (&Eye_position, &Eye_matrix, 0 );
888-
889- if (Show_ship_models){
890- j = MR_NORMAL;
891- } else {
892- j = MR_NO_POLYS;
893- }
888+
889+ j = MR_NORMAL;
894890
895891 if (Show_dock_points){
896892 debug_flags |= MR_DEBUG_BAY_PATHS;
@@ -915,17 +911,21 @@ void render_one_model_htl(object *objp)
915911
916912 model_render_params render_info;
917913
914+ render_info.set_debug_flags (debug_flags);
915+ render_info.set_replacement_textures (Ships[z].ship_replacement_textures );
916+
918917 if (Fred_outline) {
919918 render_info.set_color (Fred_outline >> 16 , (Fred_outline >> 8 ) & 0xff , Fred_outline & 0xff );
920- j |= MR_SHOW_OUTLINE_HTL | MR_NO_LIGHTING | MR_NO_POLYS | MR_NO_TEXTURING;
919+ render_info.set_flags (j | MR_SHOW_OUTLINE_HTL | MR_NO_LIGHTING | MR_NO_POLYS | MR_NO_TEXTURING);
920+ model_render_immediate (&render_info, Ship_info[Ships[z].ship_info_index ].model_num , &objp->orient , &objp->pos );
921921 }
922922
923- render_info.set_flags (j);
924- render_info.set_debug_flags (debug_flags);
925- render_info.set_replacement_textures (Ships[z].ship_replacement_textures );
926-
927923 g3_done_instance (0 );
928- model_render_immediate (&render_info, Ship_info[Ships[z].ship_info_index ].model_num , &objp->orient , &objp->pos );
924+
925+ if ( Show_ship_models ) {
926+ render_info.set_flags (j);
927+ model_render_immediate (&render_info, Ship_info[Ships[z].ship_info_index ].model_num , &objp->orient , &objp->pos );
928+ }
929929 } else {
930930 int r = 0 , g = 0 , b = 0 ;
931931
0 commit comments