Core/Vmaps: Remove the ability to ignore individual maps from vmap LOS /
height checking. Also add a warning if vmap.enableHeight is disabled. You *MUST* have all LOS / height checking enabled to have a functional server. Original patch by: Vladimir --HG-- branch : trunk
This commit is contained in:
@@ -1149,17 +1149,20 @@ void World::LoadConfigSettings(bool reload)
|
||||
}
|
||||
|
||||
m_bool_configs[CONFIG_VMAP_INDOOR_CHECK] = sConfig.GetBoolDefault("vmap.enableIndoorCheck", 0);
|
||||
bool enableIndoor = sConfig.GetBoolDefault("vmap.enableIndoorCheck", true);
|
||||
bool enableLOS = sConfig.GetBoolDefault("vmap.enableLOS", true);
|
||||
bool enableHeight = sConfig.GetBoolDefault("vmap.enableHeight", true);
|
||||
std::string ignoreMapIds = sConfig.GetStringDefault("vmap.ignoreMapIds", "");
|
||||
bool enablePetLOS = sConfig.GetBoolDefault("vmap.petLOS", true);
|
||||
std::string ignoreSpellIds = sConfig.GetStringDefault("vmap.ignoreSpellIds", "");
|
||||
|
||||
if (!enableHeight)
|
||||
sLog.outError("VMap height checking disabled! Creatures movements and other various things WILL be broken! Expect no support.");
|
||||
|
||||
VMAP::VMapFactory::createOrGetVMapManager()->setEnableLineOfSightCalc(enableLOS);
|
||||
VMAP::VMapFactory::createOrGetVMapManager()->setEnableHeightCalc(enableHeight);
|
||||
VMAP::VMapFactory::createOrGetVMapManager()->preventMapsFromBeingUsed(ignoreMapIds.c_str());
|
||||
VMAP::VMapFactory::preventSpellsFromBeingTestedForLoS(ignoreSpellIds.c_str());
|
||||
sLog.outString("WORLD: VMap support included. LineOfSight:%i, getHeight:%i",enableLOS, enableHeight);
|
||||
sLog.outString("WORLD: VMap support included. LineOfSight:%i, getHeight:%i, indoorCheck:%i PetLOS:%i", enableLOS, enableHeight, enableIndoor, enablePetLOS);
|
||||
sLog.outString("WORLD: VMap data directory is: %svmaps",m_dataPath.c_str());
|
||||
sLog.outString("WORLD: VMap config keys are: vmap.enableLOS, vmap.enableHeight, vmap.ignoreMapIds, vmap.ignoreSpellIds");
|
||||
|
||||
m_int_configs[CONFIG_MAX_WHO] = sConfig.GetIntDefault("MaxWhoListReturns", 49);
|
||||
m_bool_configs[CONFIG_PET_LOS] = sConfig.GetBoolDefault("vmap.petLOS", true);
|
||||
|
||||
Reference in New Issue
Block a user