mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-23 22:37:55 +02:00
Allow sending requests to move across multiple tiles at once
This commit is contained in:
@@ -59,7 +59,17 @@ void ApplyGhNetPackVisitor::visitDismissHero(DismissHero & pack)
|
||||
void ApplyGhNetPackVisitor::visitMoveHero(MoveHero & pack)
|
||||
{
|
||||
gh.throwIfWrongOwner(&pack, pack.hid);
|
||||
result = gh.moveHero(pack.hid, pack.dest, 0, pack.transit, pack.player);
|
||||
|
||||
for (auto const & dest : pack.path)
|
||||
{
|
||||
if (!gh.moveHero(pack.hid, dest, 0, pack.transit, pack.player))
|
||||
{
|
||||
result = false;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
result = true;
|
||||
}
|
||||
|
||||
void ApplyGhNetPackVisitor::visitCastleTeleportHero(CastleTeleportHero & pack)
|
||||
|
||||
Reference in New Issue
Block a user