mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 04:37:00 +00:00
[10596] Apply restrictions to vmap options.
After switch to new vmap version and later height check code chnages some vmap related options now outdated. * Option vmap.ignoreMapIds removed. You can't now diable vmaps use for selected maps. * Option vmap.enableHeight must be always enabled for normal work server and server at startup now pring error if it's diabled. Option still supported just for special work cases (debug, new clients testing, etc). Possible soon option vmap.ignoreSpellIds also will be removed, because like los ignore checks must be in spell code instead options.
This commit is contained in:
parent
926381824f
commit
304bd3d7b6
6 changed files with 8 additions and 52 deletions
|
|
@ -857,15 +857,17 @@ void World::LoadConfigSettings(bool reload)
|
|||
setConfig(CONFIG_BOOL_VMAP_INDOOR_CHECK, "vmap.enableIndoorCheck", true);
|
||||
bool enableLOS = sConfig.GetBoolDefault("vmap.enableLOS", false);
|
||||
bool enableHeight = sConfig.GetBoolDefault("vmap.enableHeight", false);
|
||||
std::string ignoreMapIds = sConfig.GetStringDefault("vmap.ignoreMapIds", "");
|
||||
std::string ignoreSpellIds = sConfig.GetStringDefault("vmap.ignoreSpellIds", "");
|
||||
|
||||
if (!enableHeight)
|
||||
sLog.outError("VMAP height use disabled! Creatures movements and other things will be in broken state.");
|
||||
|
||||
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",
|
||||
enableLOS, enableHeight, getConfig(CONFIG_BOOL_VMAP_INDOOR_CHECK) ? 1 : 0);
|
||||
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");
|
||||
}
|
||||
|
||||
/// Initialize the World
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue