Bug Fix for issue 464, multipling the secs you set to interrupt by the amount of unresolved stack actions. this extends you time giving you essentially X sec of interrupt offer for each stack action.
exsample, 3 unresolved stack actions. with interrupt set to 5 secs, will allot you 15 secs to decide the first action, then 10 secs to decide the 2nd action, then 5 secs to decide the last action. note: its multiplicative, this does not make each stack action into 15 sec interrupt. as they resolve "extraTime" gets recalculated.
This commit is contained in:
@@ -823,8 +823,17 @@ void ActionStack::Update(float dt)
|
||||
// game will wait for ever for the user to make a selection.
|
||||
if (options[Options::INTERRUPT_SECONDS].number > 0)
|
||||
{
|
||||
int extraTime = 0;
|
||||
//extraTime is a multiplier, it counts the number of unresolved stack actions
|
||||
//then is used to extend the time you have to interupt.
|
||||
//this prevents you from "running out of time" while deciding.
|
||||
//before this int was added, it was possible to run out of time if you had 10 stack actions
|
||||
//and set the timer to 4 secs. BUG FIX //http://code.google.com/p/wagic/issues/detail?id=464
|
||||
extraTime = count(NULL,NOT_RESOLVED,NULL);
|
||||
if(extraTime == 0)
|
||||
extraTime = 1;//we never want this int to be 0.
|
||||
if (timer < 0)
|
||||
timer = options[Options::INTERRUPT_SECONDS].number;
|
||||
timer = options[Options::INTERRUPT_SECONDS].number * extraTime;
|
||||
timer -= dt;
|
||||
if (timer < 0)
|
||||
cancelInterruptOffer();
|
||||
|
||||
Reference in New Issue
Block a user