Skip to content

Commit c31c258

Browse files
authored
Allow +Debris Density: (#6775)
* Allow `+Debris Density:` Looks like when `+Debris Density` got added it never accounted for a colon like the other fields * comment
1 parent c307ef7 commit c31c258

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

code/ship/ship.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3470,7 +3470,8 @@ static void parse_ship_values(ship_info* sip, const bool is_template, const bool
34703470
sip->debris_gravity_const = sip->dying_gravity_const;
34713471
}
34723472

3473-
if (optional_string("+Debris Density"))
3473+
// when Debris Density was added in 23.2 it did not have a colon, so keep that backwards compatibility
3474+
if (optional_string("+Debris Density:") || optional_string("+Debris Density"))
34743475
stuff_float(&sip->debris_density);
34753476

34763477
gamesnd_id ambient_snd, collision_snd_light, collision_snd_heavy, explosion_snd;

0 commit comments

Comments
 (0)