mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-17 01:32:21 +02:00
* one more fix for r1145
This commit is contained in:
@ -1286,7 +1286,7 @@ int CGTownInstance::getSightRadious() const //returns sight distance
|
|||||||
if (subID == 2) //tower
|
if (subID == 2) //tower
|
||||||
{
|
{
|
||||||
if ((builtBuildings.find(17)) != builtBuildings.end()) //skyship
|
if ((builtBuildings.find(17)) != builtBuildings.end()) //skyship
|
||||||
return cb->getMapSize().first + cb->getMapSize().second;
|
return cb->getMapSize().x + cb->getMapSize().y;
|
||||||
else if ((builtBuildings.find(21)) != builtBuildings.end()) //lookout tower
|
else if ((builtBuildings.find(21)) != builtBuildings.end()) //lookout tower
|
||||||
return 20;
|
return 20;
|
||||||
}
|
}
|
||||||
|
@ -190,13 +190,11 @@ void IGameCallback::getAllowed(std::vector<CArtifact*> &out, int flags)
|
|||||||
getAllowedArts(out,&CArtHandler::relics);
|
getAllowedArts(out,&CArtHandler::relics);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::pair<ui16, ui16> IGameCallback::getMapSize()
|
int3 IGameCallback::getMapSize()
|
||||||
{
|
{
|
||||||
std::pair<ui16, ui16> dimensions;
|
return int3(gs->map->width, gs->map->height, gs->map->twoLevel + 1);
|
||||||
dimensions.first = gs->map->width;
|
|
||||||
dimensions.second = gs->map->height;
|
|
||||||
return dimensions;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
inline TerrainTile * IGameCallback::getTile( int3 pos )
|
inline TerrainTile * IGameCallback::getTile( int3 pos )
|
||||||
{
|
{
|
||||||
if(!gs->map->isInTheMap(pos))
|
if(!gs->map->isInTheMap(pos))
|
||||||
|
@ -58,7 +58,7 @@ public:
|
|||||||
virtual bool isAllowed(int type, int id); //type: 0 - spell; 1- artifact
|
virtual bool isAllowed(int type, int id); //type: 0 - spell; 1- artifact
|
||||||
virtual void getAllowedArts(std::vector<CArtifact*> &out, std::vector<CArtifact*> CArtHandler::*arts);
|
virtual void getAllowedArts(std::vector<CArtifact*> &out, std::vector<CArtifact*> CArtHandler::*arts);
|
||||||
virtual void getAllowed(std::vector<CArtifact*> &out, int flags); //flags: bitfield uses EartClass
|
virtual void getAllowed(std::vector<CArtifact*> &out, int flags); //flags: bitfield uses EartClass
|
||||||
virtual std::pair<ui16, ui16> getMapSize();
|
virtual int3 getMapSize(); //returns size of the map
|
||||||
virtual TerrainTile * getTile(int3 pos);
|
virtual TerrainTile * getTile(int3 pos);
|
||||||
|
|
||||||
//do sth
|
//do sth
|
||||||
|
Reference in New Issue
Block a user