Changed: Used INVALID_AI_INSTANCE in CUsedContinent::getInstanceForContinent
This commit is contained in:
parent
bb5dc2c471
commit
b6637fa6fe
4 changed files with 7 additions and 7 deletions
|
@ -577,10 +577,10 @@ NLMISC_COMMAND(createStaticAIInstance, "Create a new static AIInstance for a giv
|
||||||
CUsedContinent &uc = CUsedContinent::instance();
|
CUsedContinent &uc = CUsedContinent::instance();
|
||||||
|
|
||||||
const uint32 in = uc.getInstanceForContinent(args[0]);
|
const uint32 in = uc.getInstanceForContinent(args[0]);
|
||||||
if (in == ~0)
|
if (in == INVALID_AI_INSTANCE)
|
||||||
{
|
{
|
||||||
nlwarning("The continent '%s' is unknow or not active. Can't create instance, FATAL", args[0].c_str());
|
nlwarning("The continent '%s' is unknow or not active. Can't create instance, FATAL", args[0].c_str());
|
||||||
nlassert(in != ~0);
|
nlassert(in != INVALID_AI_INSTANCE);
|
||||||
// nlassertex(in != ~0, ("The continent '%s' is unknow or not active. Can't create instance, FATAL", args[0].c_str()));
|
// nlassertex(in != ~0, ("The continent '%s' is unknow or not active. Can't create instance, FATAL", args[0].c_str()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4176,7 +4176,7 @@ NLMISC_COMMAND(loadMap,"load a complete set of primitive files","<map name>")
|
||||||
// check that the continent is active
|
// check that the continent is active
|
||||||
CUsedContinent &uc = CUsedContinent::instance();
|
CUsedContinent &uc = CUsedContinent::instance();
|
||||||
uint32 in = uc.getInstanceForContinent(continentName);
|
uint32 in = uc.getInstanceForContinent(continentName);
|
||||||
if (in == ~0)
|
if (in == INVALID_AI_INSTANCE)
|
||||||
{
|
{
|
||||||
log.displayNL("loadMap : while loading map '%s', can't load primitive '%s' coz continent '%s' is not active",
|
log.displayNL("loadMap : while loading map '%s', can't load primitive '%s' coz continent '%s' is not active",
|
||||||
args[0].c_str(),
|
args[0].c_str(),
|
||||||
|
@ -4216,7 +4216,7 @@ NLMISC_COMMAND(unloadMap,"unload a complete set of primitive files","<map name>"
|
||||||
// check that the continent is active
|
// check that the continent is active
|
||||||
CUsedContinent &uc = CUsedContinent::instance();
|
CUsedContinent &uc = CUsedContinent::instance();
|
||||||
uint32 in = uc.getInstanceForContinent(continentName);
|
uint32 in = uc.getInstanceForContinent(continentName);
|
||||||
if (in == ~0)
|
if (in == INVALID_AI_INSTANCE)
|
||||||
{
|
{
|
||||||
log.displayNL("unloadMap : while loading map '%s', can't load primitive '%s' coz continent '%s' is not active",
|
log.displayNL("unloadMap : while loading map '%s', can't load primitive '%s' coz continent '%s' is not active",
|
||||||
args[0].c_str(),
|
args[0].c_str(),
|
||||||
|
|
|
@ -420,7 +420,7 @@ bool getAIInstanceFromGroupName(string& groupName, uint32& instanceNumber)
|
||||||
{
|
{
|
||||||
string continent = groupName.substr(0, groupName.find('@'));
|
string continent = groupName.substr(0, groupName.find('@'));
|
||||||
uint32 nr = CUsedContinent::instance().getInstanceForContinent(continent);
|
uint32 nr = CUsedContinent::instance().getInstanceForContinent(continent);
|
||||||
if (nr == ~0)
|
if (nr == INVALID_AI_INSTANCE)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -106,7 +106,7 @@ uint32 CUsedContinent::getInstanceForContinent(const std::string &continentName)
|
||||||
if (it != _Continents.end())
|
if (it != _Continents.end())
|
||||||
return it->ContinentInstance;
|
return it->ContinentInstance;
|
||||||
else
|
else
|
||||||
return ~0;
|
return INVALID_AI_INSTANCE;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32 CUsedContinent::getInstanceForContinent(CONTINENT::TContinent continentEnum) const
|
uint32 CUsedContinent::getInstanceForContinent(CONTINENT::TContinent continentEnum) const
|
||||||
|
@ -116,7 +116,7 @@ uint32 CUsedContinent::getInstanceForContinent(CONTINENT::TContinent continentEn
|
||||||
if (it != _Continents.end())
|
if (it != _Continents.end())
|
||||||
return it->ContinentInstance;
|
return it->ContinentInstance;
|
||||||
else
|
else
|
||||||
return ~0;
|
return INVALID_AI_INSTANCE;
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::string &CUsedContinent::getContinentForInstance(uint32 instanceNumber) const
|
const std::string &CUsedContinent::getContinentForInstance(uint32 instanceNumber) const
|
||||||
|
|
Loading…
Reference in a new issue