Fixed crash bug with snares and possibly in other places.
This commit is contained in:
@@ -202,6 +202,7 @@ void reset_game_state() {
|
||||
incense_hours_remaining = 0;
|
||||
incense_burning = false;
|
||||
blessing_speed_active = false;
|
||||
blessing_resident_active = false;
|
||||
|
||||
// Reset inventory using the registry system
|
||||
reset_inventory();
|
||||
@@ -978,7 +979,12 @@ bool load_game_state() {
|
||||
|
||||
bandits.insert_last(b);
|
||||
// Start looping sound for loaded bandit
|
||||
b.sound_handle = play_1d_with_volume_step(b.alert_sound, x, b.position, true, BANDIT_SOUND_VOLUME_STEP);
|
||||
int[] areaStarts;
|
||||
int[] areaEnds;
|
||||
get_active_audio_areas(areaStarts, areaEnds);
|
||||
if (areaStarts.length() == 0 || range_overlaps_active_areas(b.position, b.position, areaStarts, areaEnds)) {
|
||||
b.sound_handle = play_1d_with_volume_step(b.alert_sound, x, b.position, true, BANDIT_SOUND_VOLUME_STEP);
|
||||
}
|
||||
}
|
||||
|
||||
string[] mountainData = get_string_list_or_split(saveData, "mountains_data");
|
||||
|
||||
Reference in New Issue
Block a user