瀏覽代碼

CGKeys::wasMyColorVisited: fix to not change playerKeyMap on client

Arseniy Shestakov 9 年之前
父節點
當前提交
94bb5b9901
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      lib/mapObjects/CQuest.cpp

+ 1 - 1
lib/mapObjects/CQuest.cpp

@@ -780,7 +780,7 @@ void CGKeys::setPropertyDer (ui8 what, ui32 val) //101-108 - enable key for play
 
 bool CGKeys::wasMyColorVisited (PlayerColor player) const
 {
-	if (vstd::contains(playerKeyMap[player], subID)) //creates set if it's not there
+	if(playerKeyMap.count(player) && vstd::contains(playerKeyMap[player], subID))
 		return true;
 	else
 		return false;