1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-09-16 09:26:28 +02:00

Correct placement of non-overlapping objects.

This commit is contained in:
DjWarmonger
2014-07-08 20:13:51 +02:00
parent 8a8cda950d
commit 22d26db694
6 changed files with 163 additions and 61 deletions

View File

@@ -241,13 +241,7 @@ int CGObjectInstance::getSightRadious() const
int3 CGObjectInstance::getVisitableOffset() const
{
for(int y = 0; y < appearance.getHeight(); y++)
for (int x = 0; x < appearance.getWidth(); x++)
if (appearance.isVisitableAt(x, y))
return int3(x,y,0);
//logGlobal->warnStream() << "Warning: getVisitableOffset called on non-visitable obj!";
return int3(0,0,0);
return appearance.getVisitableOffset();
}
void CGObjectInstance::giveDummyBonus(ObjectInstanceID heroID, ui8 duration) const