@@ -90,7 +90,7 @@ void model_get_rotating_submodel_axis(vec3d *model_axis, vec3d *world_axis, cons
90
90
*
91
91
* DKA: 5/26/99 make velocity of debris scale according to size of debris subobject (at least for large subobjects)
92
92
*/
93
- static void shipfx_subsystem_maybe_create_live_debris (object *ship_objp, const ship *ship_p, const ship_subsys *subsys, const vec3d *exp_center, float exp_mag)
93
+ static void shipfx_subsystem_maybe_create_live_debris (object *ship_objp, const ship *ship_p, const ship_subsys *subsys, const vec3d *exp_center, float exp_mag, bool no_fireballs = false )
94
94
{
95
95
// initializations
96
96
ship *shipp = &Ships[ship_objp->instance ];
@@ -146,8 +146,11 @@ static void shipfx_subsystem_maybe_create_live_debris(object *ship_objp, const s
146
146
if (fireball_type < 0 ) {
147
147
fireball_type = FIREBALL_EXPLOSION_MEDIUM;
148
148
}
149
- // create fireball here.
150
- fireball_create (&end_world_pos, fireball_type, FIREBALL_MEDIUM_EXPLOSION, OBJ_INDEX (ship_objp), pm->submodel [live_debris_submodel].rad );
149
+
150
+ if (!no_fireballs) {
151
+ // create fireball here.
152
+ fireball_create (&end_world_pos, fireball_type, FIREBALL_MEDIUM_EXPLOSION, OBJ_INDEX (ship_objp), pm->submodel [live_debris_submodel].rad );
153
+ }
151
154
152
155
// create debris
153
156
live_debris_obj = debris_create (ship_objp, pm->id , live_debris_submodel, &end_world_pos, exp_center, 1 , exp_mag, subsys);
@@ -269,7 +272,7 @@ static void shipfx_maybe_create_live_debris_at_ship_death( object *ship_objp )
269
272
}
270
273
}
271
274
272
- void shipfx_blow_off_subsystem (object *ship_objp, ship *ship_p, const ship_subsys *subsys, const vec3d *exp_center, bool no_explosion)
275
+ void shipfx_blow_off_subsystem (object *ship_objp, ship *ship_p, const ship_subsys *subsys, const vec3d *exp_center, bool no_explosion, bool no_fireballs )
273
276
{
274
277
vec3d subobj_pos;
275
278
@@ -286,14 +289,16 @@ void shipfx_blow_off_subsystem(object *ship_objp, ship *ship_p, const ship_subsy
286
289
287
290
// create live debris objects, if any
288
291
// TODO: some MULTIPLAYER implcations here!!
289
- shipfx_subsystem_maybe_create_live_debris (ship_objp, ship_p, subsys, exp_center, 1 .0f );
292
+ shipfx_subsystem_maybe_create_live_debris (ship_objp, ship_p, subsys, exp_center, 1 .0f , no_fireballs );
290
293
291
- int fireball_type = fireball_ship_explosion_type (&Ship_info[ship_p->ship_info_index ]);
292
- if (fireball_type < 0 ) {
293
- fireball_type = FIREBALL_EXPLOSION_MEDIUM;
294
+ if (!no_fireballs) {
295
+ int fireball_type = fireball_ship_explosion_type (&Ship_info[ship_p->ship_info_index ]);
296
+ if (fireball_type < 0 ) {
297
+ fireball_type = FIREBALL_EXPLOSION_MEDIUM;
298
+ }
299
+ // create first fireball
300
+ fireball_create ( &subobj_pos, fireball_type, FIREBALL_MEDIUM_EXPLOSION, OBJ_INDEX (ship_objp), psub->radius );
294
301
}
295
- // create first fireball
296
- fireball_create ( &subobj_pos, fireball_type, FIREBALL_MEDIUM_EXPLOSION, OBJ_INDEX (ship_objp), psub->radius );
297
302
}
298
303
}
299
304
0 commit comments