Skip to content

Commit

Permalink
Make sure AIs do not disregard a research topic an ally is researching
Browse files Browse the repository at this point in the history
in fixed alliance no-sharing mode.
  • Loading branch information
perim committed Apr 30, 2013
1 parent 8713039 commit 4551c63
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/qtscriptfuncs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1286,7 +1286,7 @@ static QScriptValue js_pursueResearch(QScriptContext *context, QScriptEngine *en
bool started = false;
for (int i = 0; i < game.maxPlayers; i++)
{
if (aiCheckAlliances(player, i) || i == player)
if (i == player || (aiCheckAlliances(player, i) && alliancesSharedResearch(game.alliance)))
{
int bits = asPlayerResList[i][cur->index].ResearchStatus;
started = started || (bits & STARTED_RESEARCH) || (bits & STARTED_RESEARCH_PENDING)
Expand Down

0 comments on commit 4551c63

Please sign in to comment.