1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-29 00:41:38 +02:00

Support for Tavern on adv map.

This commit is contained in:
Michał W. Urbańczyk
2010-07-08 23:03:27 +00:00
parent 24b47ce006
commit 1e30045541
18 changed files with 185 additions and 141 deletions

View File

@ -893,7 +893,12 @@ CGTownInstance *CGameState::getTown(int objid)
{
if(objid<0 || objid>=map->objects.size())
return NULL;
return static_cast<CGTownInstance *>(map->objects[objid]);
CGObjectInstance *obj = map->objects[objid];
if(obj->ID != TOWNI_TYPE)
return NULL;
return static_cast<CGTownInstance *>(obj);
}
const CGTownInstance * CGameState::getTown( int objid ) const