* Allow spells to trigger ItemCombatSpells if spell is melee/ranged damage based. Original patch by freegajnja

* Tabs to spaces.

--HG--
branch : trunk
This commit is contained in:
krz committed 2009-06-23 04:47:46 +02:00
1 parent 4a93373c06
commit dd52461d40
4 files changed
+65 -24

No files matched your search

+8 -9
View File
@@ -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());