Skip to content

Commit 5732183

Browse files
committed
rename debris spark timestamps, per Asteroth
1 parent 611de4d commit 5732183

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

code/debris/debris.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -268,9 +268,9 @@ void debris_process_post(object * obj, float frame_time)
268268
return; // If arc_frequency <= 0, this piece has no arcs on it
269269
}
270270

271-
if ( !timestamp_elapsed(db->fire_timeout) && timestamp_elapsed(db->next_fireball)) {
271+
if ( !timestamp_elapsed(db->arc_timeout) && timestamp_elapsed(db->arc_next_time)) {
272272

273-
db->next_fireball = _timestamp_rand(db->arc_frequency,db->arc_frequency*2 );
273+
db->arc_next_time = _timestamp_rand(db->arc_frequency,db->arc_frequency*2 );
274274
db->arc_frequency += 100;
275275

276276
if (db->is_hull) {
@@ -600,7 +600,7 @@ object *debris_create_only(int parent_objnum, int parent_ship_class, int alt_typ
600600
db->ship_info_index = parent_ship_class;
601601
db->team = team;
602602
db->ambient_sound = (sip == nullptr) ? gamesnd_id(-1) : sip->debris_ambient_sound;
603-
db->fire_timeout = TIMESTAMP::never(); // if not changed, timestamp_elapsed() will return false
603+
db->arc_timeout = TIMESTAMP::never(); // if not changed, timestamp_elapsed() will return false
604604
db->time_started = Missiontime;
605605
db->species = (sip == nullptr) ? -1 : sip->species;
606606
db->parent_alt_name = alt_type_index;
@@ -621,7 +621,7 @@ object *debris_create_only(int parent_objnum, int parent_ship_class, int alt_typ
621621
db->arc_frequency = 0;
622622
}
623623

624-
db->next_fireball = _timestamp_rand(500,2000); //start one 1/2 - 2 secs later
624+
db->arc_next_time = _timestamp_rand(500,2000); //start one 1/2 - 2 secs later
625625

626626
flagset<Object::Object_Flags> default_flags;
627627
default_flags.set(Object::Object_Flags::Renders);
@@ -682,12 +682,12 @@ object *debris_create_only(int parent_objnum, int parent_ship_class, int alt_typ
682682
// limit the amount of time that fireballs appear
683683
// let fireball length be linked to radius of ship. Range is .33 radius => 3.33 radius seconds.
684684
if (spark_timeout >= 0) {
685-
db->fire_timeout = _timestamp(spark_timeout);
685+
db->arc_timeout = _timestamp(spark_timeout);
686686
} else if (parent_objnum >= 0) {
687687
float t = 1000*Objects[parent_objnum].radius/3 + (fl2i(1000*3*Objects[parent_objnum].radius) == 0 ? 0 : Random::next(fl2i(1000*3*Objects[parent_objnum].radius)));
688-
db->fire_timeout = _timestamp(fl2i(t)); // fireballs last from 5 - 30 seconds
688+
db->arc_timeout = _timestamp(fl2i(t)); // fireballs last from 5 - 30 seconds
689689
} else {
690-
db->fire_timeout = TIMESTAMP::immediate();
690+
db->arc_timeout = TIMESTAMP::immediate();
691691
}
692692

693693
if (parent_objnum >= 0 && Objects[parent_objnum].radius >= MIN_RADIUS_FOR_PERSISTENT_DEBRIS) {

code/debris/debris.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,10 @@ typedef struct debris {
4949
int model_num; // What model this uses
5050
int model_instance_num; // What model instance this uses - needed for arcs
5151
int submodel_num; // What submodel this uses
52-
TIMESTAMP next_fireball; // When to start a fireball
52+
TIMESTAMP arc_next_time; // When the next damage/emp arc will be created.
5353
bool is_hull; // indicates whether this is a collideable, destructable piece of debris from the model, or just a generic debris fragment
5454
int species; // What species this is from. -1 if don't care.
55-
TIMESTAMP fire_timeout; // timestamp that holds time for fireballs to stop appearing
55+
TIMESTAMP arc_timeout; // timestamp that holds time for arcs to stop appearing
5656
TIMESTAMP sound_delay; // timestamp to signal when sound should start
5757
fix time_started; // time when debris was created
5858

0 commit comments

Comments
 (0)