mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-23 00:28:08 +02:00
Deactivate CAdvMapInt while quick combat is going. Fix issue 2354
If quick combat calculation take a while it's possible to give hero movement command before battle is finished. This will lead to client freeze or crash. To avoid this we must lock adventure interface until battle calculation is finished.
This commit is contained in:
@ -1707,6 +1707,18 @@ void CAdvMapInt::adjustActiveness(bool aiTurnStart)
|
||||
activate();
|
||||
}
|
||||
|
||||
void CAdvMapInt::quickCombatLock()
|
||||
{
|
||||
if(!duringAITurn)
|
||||
deactivate();
|
||||
}
|
||||
|
||||
void CAdvMapInt::quickCombatUnlock()
|
||||
{
|
||||
if(!duringAITurn)
|
||||
activate();
|
||||
}
|
||||
|
||||
void CAdvMapInt::changeMode(EAdvMapMode newMode, float newScale /* = 0.4f */)
|
||||
{
|
||||
if (mode != newMode)
|
||||
|
Reference in New Issue
Block a user