From c53d722aa29ff3a39d881de7d6ef86b79deffe48 Mon Sep 17 00:00:00 2001 From: Subv Date: Tue, 14 Feb 2012 18:19:40 -0500 Subject: Core/Collision: Models with flag MOD_M2 (mostly trees, among some other objects) should not be taken into account for LoS checks, this check does not apply to gameobjects (yet) closes #3495 Signed-off-by: Subv --- src/server/collision/Maps/MapTree.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/server/collision/Maps/MapTree.cpp') diff --git a/src/server/collision/Maps/MapTree.cpp b/src/server/collision/Maps/MapTree.cpp index fda0535e8a7..c839f3f4ffa 100644 --- a/src/server/collision/Maps/MapTree.cpp +++ b/src/server/collision/Maps/MapTree.cpp @@ -309,7 +309,7 @@ namespace VMAP #endif if (!iIsTiled && ModelSpawn::readFromFile(rf, spawn)) { - WorldModel* model = vm->acquireModelInstance(iBasePath, spawn.name); + WorldModel* model = vm->acquireModelInstance(iBasePath, spawn.name, spawn.flags); sLog->outDebug(LOG_FILTER_MAPS, "StaticMapTree::InitMap() : loading %s", spawn.name.c_str()); if (model) { @@ -380,7 +380,7 @@ namespace VMAP if (result) { // acquire model instance - WorldModel* model = vm->acquireModelInstance(iBasePath, spawn.name); + WorldModel* model = vm->acquireModelInstance(iBasePath, spawn.name, spawn.flags); if (!model) sLog->outError("StaticMapTree::LoadMapTile() : could not acquire WorldModel pointer [%u, %u]", tileX, tileY); -- cgit v1.2.3 From bfc657defe13706096f4654ccdb12ee078b92867 Mon Sep 17 00:00:00 2001 From: leak Date: Wed, 15 Feb 2012 16:42:05 +0100 Subject: Core/VMaps: Logic fail in path cleanup --- src/server/collision/Maps/MapTree.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/server/collision/Maps/MapTree.cpp') diff --git a/src/server/collision/Maps/MapTree.cpp b/src/server/collision/Maps/MapTree.cpp index c839f3f4ffa..f94f9bbf52b 100644 --- a/src/server/collision/Maps/MapTree.cpp +++ b/src/server/collision/Maps/MapTree.cpp @@ -127,7 +127,7 @@ namespace VMAP StaticMapTree::StaticMapTree(uint32 mapID, const std::string &basePath): iMapID(mapID), iTreeValues(0), iBasePath(basePath) { - if (iBasePath.length() > 0 && (iBasePath[iBasePath.length()-1] != '/' || iBasePath[iBasePath.length()-1] != '\\')) + if (iBasePath.length() > 0 && iBasePath[iBasePath.length()-1] != '/' && iBasePath[iBasePath.length()-1] != '\\') { iBasePath.push_back('/'); } @@ -241,7 +241,7 @@ namespace VMAP bool StaticMapTree::CanLoadMap(const std::string &vmapPath, uint32 mapID, uint32 tileX, uint32 tileY) { std::string basePath = vmapPath; - if (basePath.length() > 0 && (basePath[basePath.length()-1] != '/' || basePath[basePath.length()-1] != '\\')) + if (basePath.length() > 0 && basePath[basePath.length()-1] != '/' && basePath[basePath.length()-1] != '\\') basePath.push_back('/'); std::string fullname = basePath + VMapManager2::getMapFileName(mapID); bool success = true; -- cgit v1.2.3