From c5aff25a94c8bb69da52a16c76775ed5a43218ce Mon Sep 17 00:00:00 2001 From: SoftCoder Date: Fri, 27 May 2016 21:31:39 -0700 Subject: [PATCH] - comment one thread safety check as it was not required --- source/glest_game/ai/path_finder.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/glest_game/ai/path_finder.cpp b/source/glest_game/ai/path_finder.cpp index 84a724294..7056d4189 100644 --- a/source/glest_game/ai/path_finder.cpp +++ b/source/glest_game/ai/path_finder.cpp @@ -330,10 +330,10 @@ TravelState PathFinder::findPath(Unit *unit, const Vec2i &finalPos, bool *wasStu int factionIndex = unit->getFactionIndex(); FactionState &faction = factions.getFactionState(factionIndex); - if(Thread::isCurrentThreadMainThread() == false) { - throw megaglest_runtime_error("#2 Invalid access to FactionState random from outside main thread current id = " + - intToStr(Thread::getCurrentThreadId()) + " main = " + intToStr(Thread::getMainThreadId())); - } + //if(Thread::isCurrentThreadMainThread() == false) { + // throw megaglest_runtime_error("#2 Invalid access to FactionState random from outside main thread current id = " + + // intToStr(Thread::getCurrentThreadId()) + " main = " + intToStr(Thread::getMainThreadId())); + //} int tryRadius = faction.random.randRange(1,2); //int tryRadius = faction.random.IRandomX(1,2);