Commit e55aafd5 authored by AL's avatar AL

fixed skill execution after enemy death

parent 36e68ba0
......@@ -50,6 +50,7 @@ void ActionBox::PullNewSkills()
}
}
skillsActivatedThisTurn = 0u;
sh.DiscardPending(); //prevents execution of skills, activated the previous turn
}
void ActionBox::UnlockSkills()
......
......@@ -114,7 +114,6 @@ private:
CombatTimers timers;
TurnAnnouncer turnAnnouncer;
//CombatEventManager cem;
std::vector<char>keysForActionBoxes; //needs a lot of twerking
std::unique_ptr<PlayerManager>playMan;
......
......@@ -38,3 +38,11 @@ void SkillHandler::PendSkill(Skill* s)
if(pendingSkills.empty())s->OnPend();
pendingSkills.push(s);
}
void SkillHandler::DiscardPending()
{
while (!pendingSkills.empty())
{
pendingSkills.pop();
}
}
......@@ -7,6 +7,7 @@ class SkillHandler
public:
bool Update(float dt);
void PendSkill(Skill* s);
void DiscardPending();
private:
float curTime = 0.0f;
bool acted = false;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment