aboutsummaryrefslogtreecommitdiff
path: root/src/game/MapManager.cpp
diff options
context:
space:
mode:
authorkrz <none@none>2009-06-23 04:47:46 +0200
committerkrz <none@none>2009-06-23 04:47:46 +0200
commitdd52461d4049cafb3ae281743b0740feb251bc5b (patch)
tree97c387b08873fee7619f01f8e65af03129836d67 /src/game/MapManager.cpp
parent4a93373c0698a4b9b05f91bbedf1f1b8b9880238 (diff)
* Allow spells to trigger ItemCombatSpells if spell is melee/ranged damage based. Original patch by freegajnja
* Tabs to spaces. --HG-- branch : trunk
Diffstat (limited to 'src/game/MapManager.cpp')
-rw-r--r--src/game/MapManager.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/game/MapManager.cpp b/src/game/MapManager.cpp
index 5a66ab6cea8..d1f3824fc9d 100644
--- a/src/game/MapManager.cpp
+++ b/src/game/MapManager.cpp
@@ -252,22 +252,21 @@ MapManager::Update(time_t diff)
uint32 i=0;
MapMapType::iterator iter;
std::vector<Map*> update_queue(i_maps.size());
- omp_set_num_threads(sWorld.getConfig(CONFIG_NUMTHREADS));
- for(iter = i_maps.begin(), i=0;iter != i_maps.end(); ++iter, i++)
- update_queue[i]=iter->second;
+ omp_set_num_threads(sWorld.getConfig(CONFIG_NUMTHREADS));
+ for(iter = i_maps.begin(), i=0;iter != i_maps.end(); ++iter, i++)
+ update_queue[i]=iter->second;
/*
- gomp in gcc <4.4 version cannot parallelise loops using random access iterators
- so until gcc 4.4 isnt standard, we need the update_queue workaround
+ gomp in gcc <4.4 version cannot parallelise loops using random access iterators
+ so until gcc 4.4 isnt standard, we need the update_queue workaround
*/
#pragma omp parallel for schedule(dynamic) private(i) shared(update_queue)
for(int32 i = 0; i < i_maps.size(); ++i)
{
checkAndCorrectGridStatesArray(); // debugging code, should be deleted some day
- update_queue[i]->Update(i_timer.GetCurrent());
- sWorld.RecordTimeDiff("UpdateMap %u", update_queue[i]->GetId());
- // sLog.outError("This is thread %d out of %d threads,updating map %u",omp_get_thread_num(),omp_get_num_threads(),iter->second->GetId());
-
+ update_queue[i]->Update(i_timer.GetCurrent());
+ sWorld.RecordTimeDiff("UpdateMap %u", update_queue[i]->GetId());
+ // sLog.outError("This is thread %d out of %d threads,updating map %u",omp_get_thread_num(),omp_get_num_threads(),iter->second->GetId());
}
ObjectAccessor::Instance().Update(i_timer.GetCurrent());