1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-06 09:09:40 +02:00

small update

This commit is contained in:
mateuszb
2007-12-15 15:33:14 +00:00
parent c1a2a93a2d
commit e12976a9fe
2 changed files with 7 additions and 7 deletions

View File

@@ -160,14 +160,14 @@ bool CGObjectInstance::operator<(const CGObjectInstance & cmp) const //screen p
return true;
if(this->pos.y>cmp.pos.y)
return false;
if(defInfo->isOnDefList && !(cmp.defInfo->isOnDefList))
return true;
if(cmp.defInfo->isOnDefList && !(defInfo->isOnDefList))
return false;
if(!defInfo->isVisitable() && cmp.defInfo->isVisitable())
return true;
if(!cmp.defInfo->isVisitable() && defInfo->isVisitable())
return false;
if(defInfo->isOnDefList && !(cmp.defInfo->isOnDefList))
return true;
if(cmp.defInfo->isOnDefList && !(defInfo->isOnDefList))
return false;
if(this->pos.x<cmp.pos.x)
return true;
return false;

View File

@@ -1857,7 +1857,7 @@ std::string CMapHandler::getRandomizedDefName(CGDefInfo *di, CGObjectInstance *
}
}
}
int lvl = atoi(di->name.substr(7, 8).c_str())-1;
int lvl = atoi(di->name.substr(7, 8).c_str());
return creGenNames[fraction][lvl];
}
else
@@ -1874,7 +1874,7 @@ std::string CMapHandler::getRandomizedDefName(CGDefInfo *di, CGObjectInstance *
possibleTowns.push_back(8);
int fraction = possibleTowns[rand()%possibleTowns.size()];
int lvl = atoi(di->name.substr(7, 8).c_str())-1;
int lvl = atoi(di->name.substr(7, 8).c_str());
return creGenNames[fraction][lvl];
}
}
@@ -1966,7 +1966,7 @@ std::string CMapHandler::getRandomizedDefName(CGDefInfo *di, CGObjectInstance *
creGenNames[F_NUMBER-1].push_back(CGI->dobjinfo->objs[457].defName);
creGenNames[F_NUMBER-1].push_back(CGI->dobjinfo->objs[458].defName);
int faction = atoi(di->name.substr(7, 8).c_str())-1;
int faction = atoi(di->name.substr(7, 8).c_str());
int lvl = -1;
CCreGen3ObjInfo * ct = (CCreGen3ObjInfo*)obj->info;