Merge lp://staging/~widelands-dev/widelands/bug-1811030-desync-ai into lp://staging/widelands
Proposed by
Notabilis
Status: | Merged | ||||
---|---|---|---|---|---|
Merged at revision: | 8957 | ||||
Proposed branch: | lp://staging/~widelands-dev/widelands/bug-1811030-desync-ai | ||||
Merge into: | lp://staging/widelands | ||||
Diff against target: |
40 lines (+5/-5) 1 file modified
src/ai/defaultai_seafaring.cc (+5/-5) |
||||
To merge this branch: | bzr merge lp://staging/~widelands-dev/widelands/bug-1811030-desync-ai | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Klaus Halfmann | compile test | Approve | |
Review via email: mp+361689@code.staging.launchpad.net |
Commit message
Replacing logic_rand() with std::rand() in seafaring code of AI.
Should fix desyncs while network gaming.
Description of the change
Calls of logic_rand() have to be done on all participants of a network game. Since the AI code is only executed on the host, calling logic_rand() leads to different random numbers on the participants computers later on, resulting in desynchronized games.
To post a comment you must log in.
Continuous integration builds have changed state:
Travis build 4391. State: errored. Details: https:/ /travis- ci.org/ widelands/ widelands/ builds/ 478537625. /ci.appveyor. com/project/ widelands- dev/widelands/ build/_ widelands_ dev_widelands_ bug_1811030_ desync_ ai-4182.
Appveyor build 4182. State: success. Details: https:/