Update VMap3 to "final" release (REEXTRACTION OF MAPS/VMAPS IS REQUIRED!) - thanks to Lynx3d (again)

- add magic-header to .vmtile files
- calculate waterlevels for non-flat surfaces in a more correct way
- make MSVC shut up about float-issues
- change logging around a bit (output function that the respective logentry comes from)
- remove remaining Stormlib leftovers
- set indoor/outdoor check to enabled by default (more blizzlike)

--HG--
branch : trunk
This commit is contained in:
click
2010-07-09 18:02:46 +02:00
parent 9182ab6ead
commit 45e2a65fad
11 changed files with 165 additions and 102 deletions

View File

@@ -1,19 +1,19 @@
/*
* Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2010 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <iostream>
@@ -57,7 +57,7 @@ namespace VMAP
Vector3 VMapManager2::convertPositionToInternalRep(float x, float y, float z) const
{
Vector3 pos;
const float mid = 0.5 * 64.0 * 533.33333333f;
const float mid = 0.5f * 64.0f * 533.33333333f;
pos.x = mid - x;
pos.y = mid - y;
pos.z = z;
@@ -70,7 +70,7 @@ namespace VMAP
Vector3 VMapManager2::convertPositionToMangosRep(float x, float y, float z) const
{
Vector3 pos;
const float mid = 0.5 * 64.0 * 533.33333333f;
const float mid = 0.5f * 64.0f * 533.33333333f;
pos.x = mid - x;
pos.y = mid - y;
pos.z = z;
@@ -301,11 +301,11 @@ namespace VMAP
WorldModel *worldmodel = new WorldModel();
if (!worldmodel->readFile(basepath + filename + ".vmo"))
{
sLog.outError("VMapManager2: could not load '%s%s.vmo'!", basepath.c_str(), filename.c_str());
sLog.outError("VMapManager2: could not load '%s%s.vmo'", basepath.c_str(), filename.c_str());
delete worldmodel;
return NULL;
}
sLog.outDebug("VMapManager2: loading file '%s%s'.", basepath.c_str(), filename.c_str());
sLog.outDebug("VMapManager2: loading file '%s%s'", basepath.c_str(), filename.c_str());
model = iLoadedModelFiles.insert(std::pair<std::string, ManagedModel>(filename, ManagedModel())).first;
model->second.setModel(worldmodel);
}
@@ -318,7 +318,7 @@ namespace VMAP
ModelFileMap::iterator model = iLoadedModelFiles.find(filename);
if (model == iLoadedModelFiles.end())
{
sLog.outError("VMapManager2: trying to unload non-loaded file '%s'!", filename.c_str());
sLog.outError("VMapManager2: trying to unload non-loaded file '%s'", filename.c_str());
return;
}
if( model->second.decRefCount() == 0)