mirror of
https://github.com/vcmi/vcmi.git
synced 2025-02-03 13:01:33 +02:00
Move ghost creation to inner battle loop
This commit is contained in:
parent
42af83f0dd
commit
e3e27b9bfe
@ -5606,6 +5606,12 @@ void CGameHandler::runBattle()
|
|||||||
|
|
||||||
const BattleInfo & curB = *gs->curB;
|
const BattleInfo & curB = *gs->curB;
|
||||||
|
|
||||||
|
//stack loop
|
||||||
|
|
||||||
|
const CStack *next;
|
||||||
|
while(!battleResult.get() && (next = curB.getNextStack()) && next->willMove())
|
||||||
|
{
|
||||||
|
|
||||||
std::set <const CStack *> stacksToRemove;
|
std::set <const CStack *> stacksToRemove;
|
||||||
for(auto stack : curB.stacks)
|
for(auto stack : curB.stacks)
|
||||||
{
|
{
|
||||||
@ -5620,11 +5626,6 @@ void CGameHandler::runBattle()
|
|||||||
sendAndApply(&bsr);
|
sendAndApply(&bsr);
|
||||||
}
|
}
|
||||||
|
|
||||||
//stack loop
|
|
||||||
|
|
||||||
const CStack *next;
|
|
||||||
while(!battleResult.get() && (next = curB.getNextStack()) && next->willMove())
|
|
||||||
{
|
|
||||||
//check for bad morale => freeze
|
//check for bad morale => freeze
|
||||||
int nextStackMorale = next->MoraleVal();
|
int nextStackMorale = next->MoraleVal();
|
||||||
if( nextStackMorale < 0 &&
|
if( nextStackMorale < 0 &&
|
||||||
|
Loading…
x
Reference in New Issue
Block a user