SVN revision 11302 will have this fixed.
Had i quick play of the latest SVN revision in multiplayer, humans vs AI teams and the fix works.
Was not expecting such a quick resolution, thank you.
SVN revision 11302 will have this fixed.
Honestly it's kindof a severe issue from the perspective of cascading bugs it could cause.Had i quick play of the latest SVN revision in multiplayer, humans vs AI teams and the fix works.
Was not expecting such a quick resolution, thank you.
Thank you for reporting the bug, and it helped a lot that you had pinned down what causes the issue; we didn't even know there was an issue with team games, and it's been there for half a decade without us modders noticing.Was not expecting such a quick resolution, thank you.
Thank you for reporting the bug, and it helped a lot that you had pinned down what causes the issue; we didn't even know there was an issue with team games, and it's been there for half a decade without us modders noticing.
Floats and doubles are not the usual issue of OOS errors in Civ4. They are as deterministic as integers.I think I saw some floats being used in c++ files.
There are defines for them.
@MattCA could remove floats and doubles or at least convert them to integer types before being further processed if game is multiplayer.
So @Toffer90 was wrong in thinking, that floats cause OOS in multiplayer.Floats and doubles are not the usual issue of OOS errors in Civ4. They are as deterministic as integers.
The most common cause is using unsynchronized functions (like local player) or unsynchronized game state (that is usually UI state) from the synchronized code part or using functions that change the synchronized game state from unsynchronized code (that is mostly UI code but also includes any use of the synchronized random).
A lot of the caching is used from both synchronized and unsynchronized code and therefore can also easily cause an OOS if the result is different depending on a cache hit or miss (which it should not if it is exact caching but some bugs might cause differences there).
Anything from unsynchronized code that is supposed to change game state has to go through net messages, e.g. a button that should have a game effect like destroying or building something. That can sometimes be easy to miss if you don't know exactly which parts of the code are synchronized and which are not.
Apart from that any uninitialized variable or bad pointer access might go unnoticed in single player but causes OOS in multiplayer.
The main issue with OOS errors is that it is hard to pin them down. The game state has grown and not all of it is included in the number that is calculated from a lot of game state that is then compared between the computers to find out if the synchronized game state differs and if you don't catch it right away, it causes more and more changes and it becomes hard to find out the root difference in the OOS log.
They are not an issue because there is no cross platform. When you have multiple platforms there will not be the exact same processor instructions because of different compilers and their optimizers, sometimes not even the same instruction set. And floats are more susceptible to getting differences then because they are stored in a higher resolution in registers compared to memory so depending on what the compiler does you can get very small differences. But small differences break determinism and eventually lead to completely different game states.So @Toffer90 was wrong in thinking, that floats cause OOS in multiplayer.
I vaguely remember that they are synchronized for multiplayer, using the BUG options of the host (at least the game changing ones of those).BUG options is most likely culprit then, as most likely players have different BUG options.
I thought it could be one reason, not that it was the reason, there are much more likely reasons than that in any case, like having code use active player to change game state so that each player in a multiplayer match change a thing about themselves when only that thing should have been changed for one of the players.So @Toffer90 was wrong in thinking, that floats cause OOS in multiplayer.
It should be there, somewhere in python I think, using modNetMessages. It is quite some time since I last saw the code, but iI can't imagine anyone removed it.EDIT: On a fast search I did not find any code that seems to do that so maybe I remember that wrong (I might have looked at the wrong place though). It is a good idea to make sure all have the same setting in BUG anyway (at least any game state changing BUG options).
Ah, that code is not actually in the BUG part of the code where I looked but in the Afforess folder. It does look slightly wrong though.It should be there, somewhere in python I think, using modNetMessages. It is quite some time since I last saw the code, but iI can't imagine anyone removed it.
def changedHideAutomateHunt(option, value):
GC.getActivePlayer().setModderOption(ModderOptionTypes.MODDEROPTION_HIDE_AUTO_HUNT, value)
CyMessageControl().sendModNetMessage(MODDEROPTION_EVENT_ID, GC.getGame().getActivePlayer(), int(ModderOptionTypes.MODDEROPTION_HIDE_AUTO_HUNT), int(value), 0)