From dd52461d4049cafb3ae281743b0740feb251bc5b Mon Sep 17 00:00:00 2001 From: krz Date: Tue, 23 Jun 2009 04:47:46 +0200 Subject: * Allow spells to trigger ItemCombatSpells if spell is melee/ranged damage based. Original patch by freegajnja * Tabs to spaces. --HG-- branch : trunk --- src/game/MapManager.cpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'src/game/MapManager.cpp') 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 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()); -- cgit v1.2.3