mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 19:37:02 +00:00
Update src/game/vmap/MapTree.cpp
This commit is contained in:
parent
ec4c59ef78
commit
7c827733f5
1 changed files with 2 additions and 4 deletions
|
|
@ -121,11 +121,9 @@ namespace VMAP
|
||||||
StaticMapTree::StaticMapTree(uint32 mapID, const std::string &basePath):
|
StaticMapTree::StaticMapTree(uint32 mapID, const std::string &basePath):
|
||||||
iMapID(mapID), iTreeValues(0), iBasePath(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.append("/");
|
iBasePath.append("/");
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
//=========================================================
|
//=========================================================
|
||||||
//! Make sure to call unloadMap() to unregister acquired model references before destroying
|
//! Make sure to call unloadMap() to unregister acquired model references before destroying
|
||||||
|
|
@ -235,7 +233,7 @@ namespace VMAP
|
||||||
bool StaticMapTree::CanLoadMap(const std::string &vmapPath, uint32 mapID, uint32 tileX, uint32 tileY)
|
bool StaticMapTree::CanLoadMap(const std::string &vmapPath, uint32 mapID, uint32 tileX, uint32 tileY)
|
||||||
{
|
{
|
||||||
std::string basePath = vmapPath;
|
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.append("/");
|
basePath.append("/");
|
||||||
std::string fullname = basePath + VMapManager2::getMapFileName(mapID);
|
std::string fullname = basePath + VMapManager2::getMapFileName(mapID);
|
||||||
bool success = true;
|
bool success = true;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue