mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-24 03:47:18 +02:00
Fixed #343
This commit is contained in:
parent
a975c54f86
commit
8f88cb19a8
@ -259,6 +259,12 @@ DLL_EXPORT void RemoveBonus::applyGs( CGameState *gs )
|
||||
DLL_EXPORT void RemoveObject::applyGs( CGameState *gs )
|
||||
{
|
||||
CGObjectInstance *obj = gs->map->objects[id];
|
||||
//unblock tiles
|
||||
if(obj->defInfo)
|
||||
{
|
||||
gs->map->removeBlockVisTiles(obj);
|
||||
}
|
||||
|
||||
if(obj->ID==HEROI_TYPE)
|
||||
{
|
||||
CGHeroInstance *h = static_cast<CGHeroInstance*>(obj);
|
||||
@ -285,13 +291,7 @@ DLL_EXPORT void RemoveObject::applyGs( CGameState *gs )
|
||||
CGCreature *cre = static_cast<CGCreature*>(obj);
|
||||
gs->map->monsters[cre->identifier]->pos = int3 (-1,-1,-1); //use nonexistent monster for quest :>
|
||||
}
|
||||
gs->map->objects[id] = NULL;
|
||||
|
||||
//unblock tiles
|
||||
if(obj->defInfo)
|
||||
{
|
||||
gs->map->removeBlockVisTiles(obj);
|
||||
}
|
||||
gs->map->objects[id] = NULL;
|
||||
}
|
||||
|
||||
static int getDir(int3 src, int3 dst)
|
||||
|
Loading…
x
Reference in New Issue
Block a user