Don't store inactive timers in the saved game

Thanks to @fosnola for spotting this.
This commit is contained in:
2023-01-21 10:28:16 -05:00
parent a430abbd50
commit dc716fa5e6
3 changed files with 8 additions and 0 deletions

View File

@@ -790,6 +790,7 @@ void cParty::writeTo(cTagFile& file) const {
}
// TODO: Why is each timer on its own page, anyway? It clearly doesn't need to be!
for(unsigned int i = 0; i < party_event_timers.size(); i++) {
if(!party_event_timers[i].is_valid()) continue;
auto& timer_page = file.add();
timer_page["TIMER"] << party_event_timers[i].time << int(party_event_timers[i].node_type) << party_event_timers[i].node;
}