mirror of
https://github.com/vcmi/vcmi.git
synced 2024-11-24 08:32:34 +02:00
Process attack/attacked animation before dealing damage to units
This commit is contained in:
parent
61ed22f553
commit
792ea2f06f
@ -748,11 +748,14 @@ void ApplyFirstClientNetPackVisitor::visitBattleStackMoved(BattleStackMoved & pa
|
||||
void ApplyFirstClientNetPackVisitor::visitBattleAttack(BattleAttack & pack)
|
||||
{
|
||||
callBattleInterfaceIfPresentForBothSides(cl, &IBattleEventsReceiver::battleAttack, &pack);
|
||||
|
||||
// battleStacksAttacked should be excuted before BattleAttack.applyGs() to play animation before damaging unit
|
||||
// so this has to be here instead of ApplyClientNetPackVisitor::visitBattleAttack()
|
||||
callBattleInterfaceIfPresentForBothSides(cl, &IBattleEventsReceiver::battleStacksAttacked, pack.bsa, pack.shot());
|
||||
}
|
||||
|
||||
void ApplyClientNetPackVisitor::visitBattleAttack(BattleAttack & pack)
|
||||
{
|
||||
callBattleInterfaceIfPresentForBothSides(cl, &IBattleEventsReceiver::battleStacksAttacked, pack.bsa, pack.shot());
|
||||
}
|
||||
|
||||
void ApplyFirstClientNetPackVisitor::visitStartAction(StartAction & pack)
|
||||
|
Loading…
Reference in New Issue
Block a user