UN Option / Diplomatic Victory Bug

Joined
Jun 7, 2008
Messages
6,149
Location
Just wonder...
I've found and solved a bug in AND, but it's the same in C2C; if you play with Diplomatic Victory off, you can use United Nations option to be able to build UN and AP anyway. Problem is that UN option also mistakenly re-enables Diplomatic victory; so if you check that option you can mistakenly get a diplomatic victory even if you've turned off diplomatic victory. The fix is quite easy; just change in CvGame.cpp under bool CvGame::canDoResolution(VoteSourceTypes eVoteSource, const VoteSelectionSubData& kData) const

from

Code:
if (kTeam.getVotes(kData.eVote, eVoteSource) >= getVoteRequired(kData.eVote, eVoteSource))

to

Code:
if (kTeam.getVotes(kData.eVote, eVoteSource) >= getVoteRequired(kData.eVote, eVoteSource) || (isOption(GAMEOPTION_UNITED_NATIONS)))
 
45°38'N-13°47'E;13033674 said:
I've found and solved a bug in AND, but it's the same in C2C; if you play with Diplomatic Victory off, you can use United Nations option to be able to build UN and AP anyway. Problem is that UN option also mistakenly re-enables Diplomatic victory; so if you check that option you can mistakenly get a diplomatic victory even if you've turned off diplomatic victory. The fix is quite easy; just change in CvGame.cpp under bool CvGame::canDoResolution(VoteSourceTypes eVoteSource, const VoteSelectionSubData& kData) const

from

Code:
if (kTeam.getVotes(kData.eVote, eVoteSource) >= getVoteRequired(kData.eVote, eVoteSource))

to

Code:
if (kTeam.getVotes(kData.eVote, eVoteSource) >= getVoteRequired(kData.eVote, eVoteSource) || (isOption(GAMEOPTION_UNITED_NATIONS)))

Thanks for the info and the fix:goodjob:
 
Back
Top Bottom