Skip to content

Commit 726ce95

Browse files
authored
Merge pull request #3089 from Goober5000/fix_submodel_debris
de-parent live debris
2 parents a545a4e + 0434663 commit 726ce95

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

code/model/model.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -803,7 +803,7 @@ polymodel *model_get(int model_num);
803803

804804
polymodel_instance* model_get_instance(int model_instance_num);
805805

806-
// routine to copy susbsystems. Must be called when subsystems sets are the same -- see ship.cpp
806+
// routine to copy subsystems. Must be called when subsystems sets are the same -- see ship.cpp
807807
void model_copy_subsystems(int n_subsystems, model_subsystem *d_sp, model_subsystem *s_sp);
808808

809809
// If MR_FLAG_OUTLINE bit set this color will be used for outlines.

code/model/modelread.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2722,6 +2722,9 @@ int model_load(const char *filename, int n_subsystems, model_subsystem *subsyst
27222722
Assert(pm->submodel[i].num_live_debris < MAX_LIVE_DEBRIS);
27232723
pm->submodel[i].live_debris[pm->submodel[i].num_live_debris++] = j;
27242724
pm->submodel[j].is_live_debris = 1;
2725+
2726+
// make sure live debris doesn't have a parent
2727+
pm->submodel[j].parent = -1;
27252728
}
27262729
}
27272730

code/ship/shipfx.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ void shipfx_blow_off_subsystem(object *ship_objp, ship *ship_p, ship_subsys *sub
285285
shipfx_blow_up_model(ship_objp, psub->subobj_num, 50, &subobj_pos );
286286

287287
// create live debris objects, if any
288-
// TODO: some MULITPLAYER implcations here!!
288+
// TODO: some MULTIPLAYER implcations here!!
289289
shipfx_subsystem_maybe_create_live_debris(ship_objp, ship_p, subsys, exp_center, 1.0f);
290290

291291
int fireball_type = fireball_ship_explosion_type(&Ship_info[ship_p->ship_info_index]);

0 commit comments

Comments
 (0)