Skip to content

Commit ea1a370

Browse files
authored
Merge pull request #7084 from Goober5000/initialize_fields
initialize some fields
2 parents 897429e + cd2ff46 commit ea1a370

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

code/particle/particle.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ namespace particle
2929

3030
struct ParticleSubeffectHandle {
3131
ParticleEffectHandle handle;
32-
size_t subeffect;
32+
size_t subeffect = 0;
3333

3434
const ParticleEffect& getParticleEffect() const;
3535
};

code/ship/ship.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1302,6 +1302,7 @@ void ship_info::clone(const ship_info& other)
13021302
autoaim_lost_snd = other.autoaim_lost_snd;
13031303

13041304
aims_at_flight_cursor = other.aims_at_flight_cursor;
1305+
aims_at_flight_cursor_secondary = other.aims_at_flight_cursor_secondary;
13051306
flight_cursor_aim_extent = other.flight_cursor_aim_extent;
13061307

13071308
topdown_offset_def = other.topdown_offset_def;
@@ -1656,6 +1657,7 @@ void ship_info::move(ship_info&& other)
16561657
autoaim_lost_snd = other.autoaim_lost_snd;
16571658

16581659
aims_at_flight_cursor = other.aims_at_flight_cursor;
1660+
aims_at_flight_cursor_secondary = other.aims_at_flight_cursor_secondary;
16591661
flight_cursor_aim_extent = other.flight_cursor_aim_extent;
16601662

16611663
topdown_offset_def = other.topdown_offset_def;
@@ -2058,6 +2060,7 @@ ship_info::ship_info()
20582060
autoaim_lost_snd = gamesnd_id();
20592061

20602062
aims_at_flight_cursor = false;
2063+
aims_at_flight_cursor_secondary = false;
20612064
flight_cursor_aim_extent = -1.0f;
20622065

20632066
topdown_offset_def = false;
@@ -3766,6 +3769,7 @@ static void parse_ship_values(ship_info* sip, const bool is_template, const bool
37663769
} else if (sip->aims_at_flight_cursor && sip->flight_cursor_aim_extent < 0.0f) {
37673770
error_display(0, "Ship %s needs to have an +Extent defined if $Aims at Flight Cursor is true.", sip->name);
37683771
sip->aims_at_flight_cursor = false;
3772+
sip->aims_at_flight_cursor_secondary = false;
37693773
}
37703774
}
37713775

0 commit comments

Comments
 (0)