diff options
author | QAston <none@none> | 2009-06-27 15:51:36 +0200 |
---|---|---|
committer | QAston <none@none> | 2009-06-27 15:51:36 +0200 |
commit | da3569402d73d9a5ad8c67adc4000e43f0e0f5f5 (patch) | |
tree | 60689b0a42df89fc5151e63090efef0db054393e /src/game/MapManager.cpp | |
parent | a74ae1873997342ab79ae5db12d6361d7865000f (diff) | |
parent | e92f3cf01fb618505f3600a9a291c33b12aa5e63 (diff) |
*Merge tc1 1591 - 1599, skip 1596
--HG--
branch : trunk
Diffstat (limited to 'src/game/MapManager.cpp')
-rw-r--r-- | src/game/MapManager.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/game/MapManager.cpp b/src/game/MapManager.cpp index 5fde20c55eb..fb93ba2e2f3 100644 --- a/src/game/MapManager.cpp +++ b/src/game/MapManager.cpp @@ -259,20 +259,19 @@ MapManager::Update(uint32 diff) MapMapType::iterator iter; std::vector<Map*> update_queue(i_maps.size()); int 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; + 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()); } #else for(MapMapType::iterator iter=i_maps.begin(); iter != i_maps.end(); ++iter) |