Skip to content

Commit 7bcfaea

Browse files
committed
remove the splodeing code
This dates back to commit `300d5fc2c1`. It probably did something at some point, but with various upgrades over the years, it no longer has any effect.
1 parent fb229cc commit 7bcfaea

File tree

4 files changed

+3
-107
lines changed

4 files changed

+3
-107
lines changed

code/model/modelinterp.cpp

Lines changed: 0 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,6 @@ struct interp_vertex {
137137
static uint Num_interp_verts_allocated = 0;
138138
vec3d **Interp_verts = NULL;
139139
static vertex *Interp_points = NULL;
140-
static vertex *Interp_splode_points = NULL;
141-
vec3d *Interp_splode_verts = NULL;
142140
static uint Interp_num_verts = 0;
143141

144142
static float Interp_box_scale = 1.0f; // this is used to scale both detail boxes and spheres
@@ -220,16 +218,6 @@ void model_deallocate_interp_data()
220218
Interp_points = nullptr;
221219
}
222220

223-
if (Interp_splode_points != nullptr) {
224-
vm_free(Interp_splode_points);
225-
Interp_splode_points = nullptr;
226-
}
227-
228-
if (Interp_splode_verts != nullptr) {
229-
vm_free(Interp_splode_verts);
230-
Interp_splode_verts = nullptr;
231-
}
232-
233221
if (Interp_norms != nullptr) {
234222
vm_free(Interp_norms);
235223
Interp_norms = nullptr;
@@ -273,8 +261,6 @@ void model_allocate_interp_data(uint n_verts, uint n_norms)
273261
Interp_verts = (vec3d**) vm_malloc( n_verts * sizeof(vec3d *) );
274262

275263
Interp_points = (vertex*) vm_realloc( Interp_points, n_verts * sizeof(vertex) );
276-
Interp_splode_points = (vertex*) vm_realloc( Interp_splode_points, n_verts * sizeof(vertex) );
277-
Interp_splode_verts = (vec3d*) vm_realloc( Interp_splode_verts, n_verts * sizeof(vec3d) );
278264

279265
Num_interp_verts_allocated = n_verts;
280266

@@ -315,9 +301,7 @@ void model_allocate_interp_data(uint n_verts, uint n_norms)
315301

316302
// check that everything is still usable (works in release and debug builds)
317303
Verify( Interp_points != NULL );
318-
Verify( Interp_splode_points != NULL );
319304
Verify( Interp_verts != NULL );
320-
Verify( Interp_splode_verts != NULL );
321305
Verify( Interp_norms != NULL );
322306
Verify( Interp_light_applied != NULL );
323307
}
@@ -392,63 +376,8 @@ void model_set_thrust(int /*model_num*/, mst_info *mst)
392376
Interp_draw_distortion = mst->draw_distortion;
393377
}
394378

395-
bool splodeing = false;
396-
int splodeingtexture = -1;
397-
float splode_level = 0.0f;
398-
399379
float GEOMETRY_NOISE = 0.0f;
400380

401-
// Point list
402-
// +0 int id
403-
// +4 int size
404-
// +8 int n_verts
405-
// +12 int n_norms
406-
// +16 int offset from start of chunk to vertex data
407-
// +20 n_verts*char norm_counts
408-
// +offset vertex data. Each vertex n is a point followed by norm_counts[n] normals.
409-
void model_interp_splode_defpoints(ubyte * p, polymodel * /*pm*/, bsp_info * /*sm*/, float dist)
410-
{
411-
if(dist==0.0f)return;
412-
413-
if(dist<0.0f)dist*=-1.0f;
414-
415-
int n;
416-
int nverts = w(p+8);
417-
int offset = w(p+16);
418-
int nnorms = 0;
419-
420-
ubyte * normcount = p+20;
421-
vertex *dest = Interp_splode_points;
422-
vec3d *src = vp(p+offset);
423-
424-
for (n = 0; n < nverts; n++) {
425-
nnorms += normcount[n];
426-
}
427-
428-
model_allocate_interp_data(nverts, nnorms);
429-
430-
vec3d dir;
431-
432-
for (n=0; n<nverts; n++ ) {
433-
Interp_splode_verts[n] = *src;
434-
435-
src++;
436-
437-
vm_vec_avg_n(&dir, normcount[n], src);
438-
vm_vec_normalize(&dir);
439-
440-
for(int i=0; i<normcount[n]; i++)src++;
441-
442-
vm_vec_scale_add2(&Interp_splode_verts[n], &dir, dist);
443-
444-
g3_rotate_vertex(dest, &Interp_splode_verts[n]);
445-
446-
dest++;
447-
448-
}
449-
450-
}
451-
452381
// Point list
453382
// +0 int id
454383
// +4 int size
@@ -459,8 +388,6 @@ void model_interp_splode_defpoints(ubyte * p, polymodel * /*pm*/, bsp_info * /*s
459388
// +offset vertex data. Each vertex n is a point followed by norm_counts[n] normals.
460389
void model_interp_defpoints(ubyte * p, polymodel *pm, bsp_info *sm)
461390
{
462-
if(splodeing)model_interp_splode_defpoints(p, pm, sm, splode_level*model_radius);
463-
464391
uint i, n;
465392
uint nverts = uw(p+8);
466393
uint offset = uw(p+16);

code/ship/ship.cpp

Lines changed: 2 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,6 @@ static int Num_ship_subsystems_allocated = 0;
118118
static SCP_vector<ship_subsys*> Ship_subsystems;
119119
ship_subsys ship_subsys_free_list;
120120

121-
extern bool splodeing;
122-
extern float splode_level;
123-
extern int splodeingtexture;
124-
125121
// The minimum required fuel to engage afterburners
126122
static const float DEFAULT_MIN_AFTERBURNER_FUEL_TO_ENGAGE = 10.0f;
127123

@@ -1279,9 +1275,6 @@ void ship_info::clone(const ship_info& other)
12791275

12801276
draw_distortion = other.draw_distortion;
12811277

1282-
splodeing_texture = other.splodeing_texture;
1283-
strcpy_s(splodeing_texture_name, other.splodeing_texture_name);
1284-
12851278
replacement_textures = other.replacement_textures;
12861279

12871280
armor_type_idx = other.armor_type_idx;
@@ -1634,9 +1627,6 @@ void ship_info::move(ship_info&& other)
16341627

16351628
draw_distortion = other.draw_distortion;
16361629

1637-
splodeing_texture = other.splodeing_texture;
1638-
std::swap(splodeing_texture_name, other.splodeing_texture_name);
1639-
16401630
std::swap(replacement_textures, other.replacement_textures);
16411631

16421632
armor_type_idx = other.armor_type_idx;
@@ -2037,9 +2027,6 @@ ship_info::ship_info()
20372027

20382028
draw_distortion = true;
20392029

2040-
splodeing_texture = -1;
2041-
strcpy_s(splodeing_texture_name, "boom");
2042-
20432030
replacement_textures.clear();
20442031

20452032
armor_type_idx = -1;
@@ -7120,8 +7107,6 @@ void ship::clear()
71207107
next_corkscrew_fire = timestamp(0);
71217108

71227109
final_death_time = timestamp(-1);
7123-
death_time = timestamp(-1);
7124-
end_death_time = timestamp(-1);
71257110
really_final_death_time = timestamp(-1);
71267111
deathroll_rotvel = vmd_zero_vector;
71277112

@@ -9717,7 +9702,6 @@ static void ship_dying_frame(object *objp, int ship_num)
97179702
}
97189703

97199704
if ( timestamp_elapsed(shipp->final_death_time)) {
9720-
shipp->death_time = shipp->final_death_time;
97219705
shipp->final_death_time = timestamp(-1); // never time out again
97229706

97239707
// play ship explosion sound effect, pick appropriate explosion sound
@@ -9780,8 +9764,6 @@ static void ship_dying_frame(object *objp, int ship_num)
97809764
shipfx_large_blowup_init(shipp);
97819765
// need to timeout immediately to keep physics in sync
97829766
shipp->really_final_death_time = timestamp(0);
9783-
polymodel *pm = model_get(sip->model_num);
9784-
shipp->end_death_time = timestamp((int) pm->core_radius);
97859767
} else {
97869768
// else, just a single big fireball
97879769
float big_rad;
@@ -9816,7 +9798,8 @@ static void ship_dying_frame(object *objp, int ship_num)
98169798
// ship, so instead of just taking this code out, since we might need
98179799
// it in the future, I disabled it. You can reenable it by changing
98189800
// the commenting on the following two lines.
9819-
shipp->end_death_time = shipp->really_final_death_time = timestamp( fl2i(explosion_life*1000.0f)/5 ); // Wait till 30% of vclip time before breaking the ship up.
9801+
shipp->really_final_death_time = timestamp( fl2i(explosion_life*1000.0f)/5 ); // Wait till 30% of vclip time before breaking the ship up.
9802+
//sp->really_final_death_time = timestamp(0); // Make ship break apart the instant the explosion starts
98209803
}
98219804

98229805
shipp->flags.set(Ship_Flags::Exploded);
@@ -19273,12 +19256,6 @@ void ship_page_in_textures(int ship_index)
1927319256
if ( !generic_bitmap_load(&sip->thruster_tertiary_glow_info.afterburn) )
1927419257
bm_page_in_texture(sip->thruster_tertiary_glow_info.afterburn.bitmap_id);
1927519258

19276-
// splodeing bitmap
19277-
if ( VALID_FNAME(sip->splodeing_texture_name) ) {
19278-
sip->splodeing_texture = bm_load(sip->splodeing_texture_name);
19279-
bm_page_in_texture(sip->splodeing_texture);
19280-
}
19281-
1928219259
// thruster/particle bitmaps
1928319260
for (i = 0; i < (int)sip->normal_thruster_particles.size(); i++) {
1928419261
generic_anim_load(&sip->normal_thruster_particles[i].thruster_bitmap);
@@ -19330,9 +19307,6 @@ void ship_page_out_textures(int ship_index, bool release)
1933019307
PAGE_OUT_TEXTURE(sip->thruster_tertiary_glow_info.normal.bitmap_id);
1933119308
PAGE_OUT_TEXTURE(sip->thruster_tertiary_glow_info.afterburn.bitmap_id);
1933219309

19333-
// slodeing bitmap
19334-
PAGE_OUT_TEXTURE(sip->splodeing_texture);
19335-
1933619310
// thruster/particle bitmaps
1933719311
for (i = 0; i < (int)sip->normal_thruster_particles.size(); i++)
1933819312
PAGE_OUT_TEXTURE(sip->normal_thruster_particles[i].thruster_bitmap.first_frame);

code/ship/ship.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -587,8 +587,6 @@ class ship
587587
// END PACK
588588

589589
int final_death_time; // Time until big fireball starts
590-
int death_time; // Time until big fireball starts
591-
int end_death_time; // Time until big fireball starts
592590
int really_final_death_time; // Time until ship breaks up and disappears
593591
vec3d deathroll_rotvel; // Desired death rotational velocity
594592

@@ -1429,9 +1427,6 @@ class ship_info
14291427

14301428
bool draw_distortion;
14311429

1432-
int splodeing_texture;
1433-
char splodeing_texture_name[MAX_FILENAME_LEN];
1434-
14351430
// Goober5000
14361431
SCP_vector<texture_replace> replacement_textures;
14371432

code/ship/shiphit.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1747,7 +1747,7 @@ void ship_generic_kill_stuff( object *objp, float percent_killed )
17471747
delta_time = 2;
17481748
}
17491749

1750-
sp->death_time = sp->final_death_time = timestamp(delta_time); // Give him 3 secs to explode
1750+
sp->final_death_time = timestamp(delta_time); // Give him 3 secs to explode
17511751

17521752
//SUSHI: What are the chances of an instant explosion? Check the ship type (objecttypes.tbl) as well as the ship (ships.tbl)
17531753
float skipChance;

0 commit comments

Comments
 (0)