diff options
author | raczman <none@none> | 2009-06-15 09:07:51 +0200 |
---|---|---|
committer | raczman <none@none> | 2009-06-15 09:07:51 +0200 |
commit | 19225e8880b12bf3b72743ea253a94b52635a212 (patch) | |
tree | 6ad5d22134939c7bed0aa1d95d68f354241a5654 /src/game/World.cpp | |
parent | 98c8b762b7de97f89ce072e6bd8ace2b832d0742 (diff) |
Added basic support for multithreaded map updates using openmp standard.
Windows users need to install Platform SDK to use this feature,
linux users have everything they need in gcc.
Number of threads used to update world is set by confiuration file,
and can be changed dynamically without restarting core.
Thanks to megamage and Jeniczek for testing and helping out with this.
--HG--
branch : trunk
Diffstat (limited to 'src/game/World.cpp')
-rw-r--r-- | src/game/World.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/game/World.cpp b/src/game/World.cpp index c0f815e8888..fb8d78fe0af 100644 --- a/src/game/World.cpp +++ b/src/game/World.cpp @@ -1029,6 +1029,7 @@ void World::LoadConfigSettings(bool reload) m_configs[CONFIG_SHOW_KICK_IN_WORLD] = sConfig.GetBoolDefault("ShowKickInWorld", false); m_configs[CONFIG_INTERVAL_LOG_UPDATE] = sConfig.GetIntDefault("RecordUpdateTimeDiffInterval", 60000); m_configs[CONFIG_MIN_LOG_UPDATE] = sConfig.GetIntDefault("MinRecordUpdateTimeDiff", 10); + m_configs[CONFIG_NUMTHREADS] = sConfig.GetIntDefault("MapUpdate.Threads",1); std::string forbiddenmaps = sConfig.GetStringDefault("ForbiddenMaps", ""); char * forbiddenMaps = new char[forbiddenmaps.length() + 1]; @@ -1596,8 +1597,10 @@ void World::Update(time_t diff) sBattleGroundMgr.Update(diff); RecordTimeDiff("UpdateBattleGroundMgr"); + sOutdoorPvPMgr.Update(diff); RecordTimeDiff("UpdateOutdoorPvPMgr"); + } RecordTimeDiff(NULL); |