mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-12 02:28:11 +02:00
* one more fix for r1145
This commit is contained in:
parent
226a8a8102
commit
543e3c6431
@ -1286,7 +1286,7 @@ int CGTownInstance::getSightRadious() const //returns sight distance
|
||||
if (subID == 2) //tower
|
||||
{
|
||||
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
|
||||
return 20;
|
||||
}
|
||||
|
@ -190,13 +190,11 @@ void IGameCallback::getAllowed(std::vector<CArtifact*> &out, int flags)
|
||||
getAllowedArts(out,&CArtHandler::relics);
|
||||
}
|
||||
|
||||
std::pair<ui16, ui16> IGameCallback::getMapSize()
|
||||
int3 IGameCallback::getMapSize()
|
||||
{
|
||||
std::pair<ui16, ui16> dimensions;
|
||||
dimensions.first = gs->map->width;
|
||||
dimensions.second = gs->map->height;
|
||||
return dimensions;
|
||||
return int3(gs->map->width, gs->map->height, gs->map->twoLevel + 1);
|
||||
}
|
||||
|
||||
inline TerrainTile * IGameCallback::getTile( int3 pos )
|
||||
{
|
||||
if(!gs->map->isInTheMap(pos))
|
||||
|
@ -58,7 +58,7 @@ public:
|
||||
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 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);
|
||||
|
||||
//do sth
|
||||
|
Loading…
Reference in New Issue
Block a user