Documentation sort of updated, food consumption also updated for residents.
This commit is contained in:
@@ -406,6 +406,8 @@ void update_time() {
|
||||
attempt_resident_collection();
|
||||
}
|
||||
|
||||
ensure_ambience_running();
|
||||
|
||||
// Proactive resident defense with slings
|
||||
attempt_resident_sling_defense();
|
||||
|
||||
@@ -533,6 +535,9 @@ void complete_crossfade() {
|
||||
}
|
||||
if (night_sound_handle != -1) p.update_sound_start_values(night_sound_handle, 0.0, 0.0, 1.0);
|
||||
is_daytime = false;
|
||||
if (night_sound_handle == -1 || !p.sound_is_active(night_sound_handle)) {
|
||||
update_ambience(false);
|
||||
}
|
||||
} else {
|
||||
// Destroy night sound, ensure day is at full volume
|
||||
if (night_sound_handle != -1) {
|
||||
@@ -541,6 +546,23 @@ void complete_crossfade() {
|
||||
}
|
||||
if (day_sound_handle != -1) p.update_sound_start_values(day_sound_handle, 0.0, 0.0, 1.0);
|
||||
is_daytime = true;
|
||||
if (day_sound_handle == -1 || !p.sound_is_active(day_sound_handle)) {
|
||||
update_ambience(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ensure_ambience_running() {
|
||||
if (crossfade_active) return;
|
||||
|
||||
if (is_daytime) {
|
||||
if (day_sound_handle == -1 || !p.sound_is_active(day_sound_handle)) {
|
||||
update_ambience(false);
|
||||
}
|
||||
} else {
|
||||
if (night_sound_handle == -1 || !p.sound_is_active(night_sound_handle)) {
|
||||
update_ambience(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user