mirror of
https://github.com/vcmi/vcmi.git
synced 2025-03-17 20:58:07 +02:00
Fix crash
Reinstated 2 lines who's removal caused a crash at the end of a turn in which a hero is killed.
This commit is contained in:
parent
af02664afe
commit
4ff7516a58
@ -1197,7 +1197,9 @@ void RemoveObject::applyGs(CGameState *gs)
|
||||
{
|
||||
auto * beatenHero = dynamic_cast<CGHeroInstance *>(obj);
|
||||
assert(beatenHero);
|
||||
PlayerState* p = gs->getPlayerState(beatenHero->tempOwner);
|
||||
gs->map->heroesOnMap -= beatenHero;
|
||||
p->removeOwnedObject(beatenHero);
|
||||
|
||||
auto * siegeNode = beatenHero->whereShouldBeAttachedOnSiege(gs);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user