diff --git a/code/model/modelinterp.cpp b/code/model/modelinterp.cpp index 1b200060457..61e2fb51d61 100644 --- a/code/model/modelinterp.cpp +++ b/code/model/modelinterp.cpp @@ -137,8 +137,6 @@ struct interp_vertex { static uint Num_interp_verts_allocated = 0; vec3d **Interp_verts = NULL; static vertex *Interp_points = NULL; -static vertex *Interp_splode_points = NULL; -vec3d *Interp_splode_verts = NULL; static uint Interp_num_verts = 0; 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() Interp_points = nullptr; } - if (Interp_splode_points != nullptr) { - vm_free(Interp_splode_points); - Interp_splode_points = nullptr; - } - - if (Interp_splode_verts != nullptr) { - vm_free(Interp_splode_verts); - Interp_splode_verts = nullptr; - } - if (Interp_norms != nullptr) { vm_free(Interp_norms); Interp_norms = nullptr; @@ -273,8 +261,6 @@ void model_allocate_interp_data(uint n_verts, uint n_norms) Interp_verts = (vec3d**) vm_malloc( n_verts * sizeof(vec3d *) ); Interp_points = (vertex*) vm_realloc( Interp_points, n_verts * sizeof(vertex) ); - Interp_splode_points = (vertex*) vm_realloc( Interp_splode_points, n_verts * sizeof(vertex) ); - Interp_splode_verts = (vec3d*) vm_realloc( Interp_splode_verts, n_verts * sizeof(vec3d) ); Num_interp_verts_allocated = n_verts; @@ -315,9 +301,7 @@ void model_allocate_interp_data(uint n_verts, uint n_norms) // check that everything is still usable (works in release and debug builds) Verify( Interp_points != NULL ); - Verify( Interp_splode_points != NULL ); Verify( Interp_verts != NULL ); - Verify( Interp_splode_verts != NULL ); Verify( Interp_norms != NULL ); Verify( Interp_light_applied != NULL ); } @@ -392,63 +376,8 @@ void model_set_thrust(int /*model_num*/, mst_info *mst) Interp_draw_distortion = mst->draw_distortion; } -bool splodeing = false; -int splodeingtexture = -1; -float splode_level = 0.0f; - float GEOMETRY_NOISE = 0.0f; -// Point list -// +0 int id -// +4 int size -// +8 int n_verts -// +12 int n_norms -// +16 int offset from start of chunk to vertex data -// +20 n_verts*char norm_counts -// +offset vertex data. Each vertex n is a point followed by norm_counts[n] normals. -void model_interp_splode_defpoints(ubyte * p, polymodel * /*pm*/, bsp_info * /*sm*/, float dist) -{ - if(dist==0.0f)return; - - if(dist<0.0f)dist*=-1.0f; - - int n; - int nverts = w(p+8); - int offset = w(p+16); - int nnorms = 0; - - ubyte * normcount = p+20; - vertex *dest = Interp_splode_points; - vec3d *src = vp(p+offset); - - for (n = 0; n < nverts; n++) { - nnorms += normcount[n]; - } - - model_allocate_interp_data(nverts, nnorms); - - vec3d dir; - - for (n=0; n Ship_subsystems; ship_subsys ship_subsys_free_list; -extern bool splodeing; -extern float splode_level; -extern int splodeingtexture; - // The minimum required fuel to engage afterburners static const float DEFAULT_MIN_AFTERBURNER_FUEL_TO_ENGAGE = 10.0f; @@ -1279,9 +1275,6 @@ void ship_info::clone(const ship_info& other) draw_distortion = other.draw_distortion; - splodeing_texture = other.splodeing_texture; - strcpy_s(splodeing_texture_name, other.splodeing_texture_name); - replacement_textures = other.replacement_textures; armor_type_idx = other.armor_type_idx; @@ -1634,9 +1627,6 @@ void ship_info::move(ship_info&& other) draw_distortion = other.draw_distortion; - splodeing_texture = other.splodeing_texture; - std::swap(splodeing_texture_name, other.splodeing_texture_name); - std::swap(replacement_textures, other.replacement_textures); armor_type_idx = other.armor_type_idx; @@ -2037,9 +2027,6 @@ ship_info::ship_info() draw_distortion = true; - splodeing_texture = -1; - strcpy_s(splodeing_texture_name, "boom"); - replacement_textures.clear(); armor_type_idx = -1; @@ -7120,8 +7107,6 @@ void ship::clear() next_corkscrew_fire = timestamp(0); final_death_time = timestamp(-1); - death_time = timestamp(-1); - end_death_time = timestamp(-1); really_final_death_time = timestamp(-1); deathroll_rotvel = vmd_zero_vector; @@ -9717,7 +9702,6 @@ static void ship_dying_frame(object *objp, int ship_num) } if ( timestamp_elapsed(shipp->final_death_time)) { - shipp->death_time = shipp->final_death_time; shipp->final_death_time = timestamp(-1); // never time out again // play ship explosion sound effect, pick appropriate explosion sound @@ -9780,8 +9764,6 @@ static void ship_dying_frame(object *objp, int ship_num) shipfx_large_blowup_init(shipp); // need to timeout immediately to keep physics in sync shipp->really_final_death_time = timestamp(0); - polymodel *pm = model_get(sip->model_num); - shipp->end_death_time = timestamp((int) pm->core_radius); } else { // else, just a single big fireball float big_rad; @@ -9816,7 +9798,8 @@ static void ship_dying_frame(object *objp, int ship_num) // ship, so instead of just taking this code out, since we might need // it in the future, I disabled it. You can reenable it by changing // the commenting on the following two lines. - 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. + shipp->really_final_death_time = timestamp( fl2i(explosion_life*1000.0f)/5 ); // Wait till 30% of vclip time before breaking the ship up. + //sp->really_final_death_time = timestamp(0); // Make ship break apart the instant the explosion starts } shipp->flags.set(Ship_Flags::Exploded); @@ -19273,12 +19256,6 @@ void ship_page_in_textures(int ship_index) if ( !generic_bitmap_load(&sip->thruster_tertiary_glow_info.afterburn) ) bm_page_in_texture(sip->thruster_tertiary_glow_info.afterburn.bitmap_id); - // splodeing bitmap - if ( VALID_FNAME(sip->splodeing_texture_name) ) { - sip->splodeing_texture = bm_load(sip->splodeing_texture_name); - bm_page_in_texture(sip->splodeing_texture); - } - // thruster/particle bitmaps for (i = 0; i < (int)sip->normal_thruster_particles.size(); i++) { generic_anim_load(&sip->normal_thruster_particles[i].thruster_bitmap); @@ -19330,9 +19307,6 @@ void ship_page_out_textures(int ship_index, bool release) PAGE_OUT_TEXTURE(sip->thruster_tertiary_glow_info.normal.bitmap_id); PAGE_OUT_TEXTURE(sip->thruster_tertiary_glow_info.afterburn.bitmap_id); - // slodeing bitmap - PAGE_OUT_TEXTURE(sip->splodeing_texture); - // thruster/particle bitmaps for (i = 0; i < (int)sip->normal_thruster_particles.size(); i++) PAGE_OUT_TEXTURE(sip->normal_thruster_particles[i].thruster_bitmap.first_frame); diff --git a/code/ship/ship.h b/code/ship/ship.h index c4e616027ff..bb10f77e8d0 100644 --- a/code/ship/ship.h +++ b/code/ship/ship.h @@ -587,8 +587,6 @@ class ship // END PACK int final_death_time; // Time until big fireball starts - int death_time; // Time until big fireball starts - int end_death_time; // Time until big fireball starts int really_final_death_time; // Time until ship breaks up and disappears vec3d deathroll_rotvel; // Desired death rotational velocity @@ -1429,9 +1427,6 @@ class ship_info bool draw_distortion; - int splodeing_texture; - char splodeing_texture_name[MAX_FILENAME_LEN]; - // Goober5000 SCP_vector replacement_textures; diff --git a/code/ship/shiphit.cpp b/code/ship/shiphit.cpp index 9006bb20333..033780f171a 100755 --- a/code/ship/shiphit.cpp +++ b/code/ship/shiphit.cpp @@ -1747,7 +1747,7 @@ void ship_generic_kill_stuff( object *objp, float percent_killed ) delta_time = 2; } - sp->death_time = sp->final_death_time = timestamp(delta_time); // Give him 3 secs to explode + sp->final_death_time = timestamp(delta_time); // Give him 3 secs to explode //SUSHI: What are the chances of an instant explosion? Check the ship type (objecttypes.tbl) as well as the ship (ships.tbl) float skipChance;