Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions code/model/modelread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4605,14 +4605,12 @@ void model_set_instance(int model_num, int sub_model_num, submodel_instance_info
bsp_info *sm = &pm->submodel[sub_model_num];

if (flags & SSF_NO_DISAPPEAR) {
// If the submodel is to not disappear when the subsystem is destroyed, we simply
// make the submodel act as its own replacement as well
sm->my_replacement = sub_model_num;
sm->blown_off = 0;
} else {
// Set the "blown out" flags
sm->blown_off = sii->blown_off;
}

// Set the "blown out" flags
sm->blown_off = sii->blown_off;

if ( (sm->blown_off) && (!(flags & SSF_NO_REPLACE)) ) {
if ( sm->my_replacement > -1 ) {
pm->submodel[sm->my_replacement].blown_off = 0;
Expand Down
6 changes: 5 additions & 1 deletion code/model/modelrender.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1411,7 +1411,11 @@ void model_render_children_buffers(draw_list* scene, model_render_params* interp
smi = &pmi->submodel[mn];
}

if ( (smi != NULL && smi->blown_off) || model->blown_off ) {
if ( smi != NULL ) {
if ( smi->blown_off ) {
return;
}
} else if ( model->blown_off ) {
return;
}

Expand Down