1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-27 22:49:25 +02:00

Add ChangeFormation netpack to avoid MP desyncs

Previous code was working fine for single client, but would cause desync in multiplayer. Fix issue 2460.
This commit is contained in:
Arseniy Shestakov
2016-09-08 19:29:15 +03:00
parent a109580b91
commit d06d07a39b
5 changed files with 33 additions and 3 deletions

View File

@@ -157,6 +157,11 @@ DLL_LINKAGE void UpdateCastleEvents::applyGs(CGameState *gs)
t->events = events;
}
DLL_LINKAGE void ChangeFormation::applyGs(CGameState *gs)
{
gs->getHero(hid)->setFormation(formation);
}
DLL_LINKAGE void HeroVisitCastle::applyGs( CGameState *gs )
{
CGHeroInstance *h = gs->getHero(hid);