45°38'N-13°47'E
Deity
I know this is C2C forum but I've imported most of the C2C code into AND2 dll and I need your opinion, if possible; and hopefully it might be useful for C2C too. Recently I've tried a MP game with my wife and we were getting frequent OOS problems. After some research, I think I've found the codelines responsible for this particular OOS. The problem was that when my capital was building a specific unit or building and inside the city screen I was adding something else to be built ON TOP of the current production (ctrl+click), the game was instantly going OOS. 100% repeatable. So I started looking at previous AND revisions where this problem wasn't present and i've found that the problem disappears if I delete the following lines in CvCityAI.cpp
I don't know if this is what's causing the OOS problem; it might be that I've missed some other part of the code I should have imported from C2C. But if I delete these lines, that specific OOS doesn't happen anymore. Any idea about it?
Code:
// Don't mess with plot assignments while the user is in the city screen as
// current assignments might be transitory
if ( isHuman() && gDLL->getInterfaceIFace()->isCityScreenUp() )
{
// Also assume when they leave the city screen they will leave a state
// they are happy with
AI_setAssignWorkDirty(false);
return;
}
I don't know if this is what's causing the OOS problem; it might be that I've missed some other part of the code I should have imported from C2C. But if I delete these lines, that specific OOS doesn't happen anymore. Any idea about it?