mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-15 00:05:02 +02:00
First version that compiles
This commit is contained in:
@ -206,8 +206,8 @@ void CGObjectInstance::setType(si32 ID, si32 subID)
|
||||
logGlobal->error("Unknown object type %d:%d at %s", ID, subID, visitablePos().toString());
|
||||
return;
|
||||
}
|
||||
if(!handler->getTemplates(tile.terType).empty())
|
||||
appearance = handler->getTemplates(tile.terType)[0];
|
||||
if(!handler->getTemplates(tile.terType->id).empty())
|
||||
appearance = handler->getTemplates(tile.terType->id)[0];
|
||||
else
|
||||
appearance = handler->getTemplates()[0]; // get at least some appearance since alternative is crash
|
||||
if (ID == Obj::HERO)
|
||||
@ -434,7 +434,7 @@ int3 IBoatGenerator::bestLocation() const
|
||||
{
|
||||
if(const TerrainTile *tile = IObjectInterface::cb->getTile(o->pos + offset, false)) //tile is in the map
|
||||
{
|
||||
if(tile->terType.isWater() && (!tile->blocked || tile->blockingObjects.front()->ID == Obj::BOAT)) //and is water and is not blocked or is blocked by boat
|
||||
if(tile->terType->isWater() && (!tile->blocked || tile->blockingObjects.front()->ID == Obj::BOAT)) //and is water and is not blocked or is blocked by boat
|
||||
return o->pos + offset;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user