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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user