From 78cf927a29856e7fe3640ea28027e032d9f20a55 Mon Sep 17 00:00:00 2001 From: "Laurent Alonso(fr)" Date: Fri, 15 May 2020 08:35:47 +0200 Subject: [PATCH] special[timer]: try to avoid calling them two times in a row... --- src/game/boe.specials.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/game/boe.specials.cpp b/src/game/boe.specials.cpp index a2fb071c..10426b12 100644 --- a/src/game/boe.specials.cpp +++ b/src/game/boe.specials.cpp @@ -1847,7 +1847,12 @@ void special_increase_age(long length, bool queue) { if(univ.town->timers[i].time > 0) { short time = univ.town->timers[i].time; bool need_redraw = false; - for(unsigned long j = age_before + (time == 1); j <= current_age; j++) + // age_before is already done excepted the first time, + // so maybe j = age_before + ((age_before || time==1) ? 1 : 0) + // checkme: currently, in combat, current_pc_picked_in_spec_enc picks only the current character + // which seems bad, it seems better to alway pick the party in these cases: + // case eSpecCtx::TOWN_TIMER: case eSpecCtx::SCEN_TIMER: case eSpecCtx::PARTY_TIMER + for(unsigned long j = age_before + 1; j <= current_age; j++) if(j % time == 0) { if(queue) { univ.party.age = j; @@ -1864,7 +1869,7 @@ void special_increase_age(long length, bool queue) { if(univ.scenario.scenario_timers[i].time > 0) { short time = univ.scenario.scenario_timers[i].time; bool need_redraw = false; - for(unsigned long j = age_before + (time == 1); j <= current_age; j++) + for(unsigned long j = age_before + 1; j <= current_age; j++) if(j % time == 0) { if(queue) { univ.party.age = j;