mirror of
https://github.com/vcmi/vcmi.git
synced 2025-08-10 22:31:40 +02:00
Fix rare crash if player selects maximum movement speed and moves hero
across event that grants enough XP to level up
This commit is contained in:
@@ -70,6 +70,15 @@ void ApplyGhNetPackVisitor::visitMoveHero(MoveHero & pack)
|
|||||||
result = false;
|
result = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// player got some query he has to reply to first for example, from triggered event
|
||||||
|
// ignore remaining path (if any), but handle this as success - since at least part of path was legal & was applied
|
||||||
|
auto query = gh.queries->topQuery(pack.player);
|
||||||
|
if (query && query->blocksPack(&pack))
|
||||||
|
{
|
||||||
|
result = true;
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
result = true;
|
result = true;
|
||||||
|
Reference in New Issue
Block a user