diff options
author | QAston <none@none> | 2009-05-15 18:00:50 +0200 |
---|---|---|
committer | QAston <none@none> | 2009-05-15 18:00:50 +0200 |
commit | a796012723dd2410a150264a4f32f00bc570ef76 (patch) | |
tree | d55cada7db3c9c752815c79d9d164069acd99edc /src/game/Map.cpp | |
parent | ae461a4158d6376e28e7bc53d3f7ad5690a5064e (diff) | |
parent | ad92f5e210b7a2c0584cdabd30560fe723d160be (diff) |
*Merge some fixes from tc1
--HG--
branch : trunk
Diffstat (limited to 'src/game/Map.cpp')
-rw-r--r-- | src/game/Map.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/game/Map.cpp b/src/game/Map.cpp index 3884f39f5a4..140904bfb19 100644 --- a/src/game/Map.cpp +++ b/src/game/Map.cpp @@ -120,7 +120,7 @@ void Map::LoadVMap(int gx,int gy) } } -void Map::LoadMap(int gx,int gy) +void Map::LoadMap(int gx,int gy, bool reload) { if( i_InstanceId != 0 ) { @@ -138,6 +138,9 @@ void Map::LoadMap(int gx,int gy) return; } + if(GridMaps[gx][gy] && !reload) + return; + //map already load, delete it before reloading (Is it necessary? Do we really need the ability the reload maps during runtime?) if(GridMaps[gx][gy]) { @@ -2503,7 +2506,7 @@ void InstanceMap::CreateInstanceData(bool load) { Field* fields = result->Fetch(); const char* data = fields[0].GetString(); - if(data) + if(data && data != "") { sLog.outDebug("Loading instance data for `%s` with id %u", objmgr.GetScriptName(i_script_id), i_InstanceId); i_data->Load(data); |