Merge lp:~widelands-dev/widelands/fix-random-tribe into lp:widelands
Proposed by
Shevonar
Status: | Merged |
---|---|
Merged at revision: | 6933 |
Proposed branch: | lp:~widelands-dev/widelands/fix-random-tribe |
Merge into: | lp:widelands |
Diff against target: |
13 lines (+3/-0) 1 file modified
src/wlapplication.cc (+3/-0) |
To merge this branch: | bzr merge lp:~widelands-dev/widelands/fix-random-tribe |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Tino | Approve | ||
SirVer | Needs Fixing | ||
Review via email: mp+214451@code.launchpad.net |
Description of the change
Proper seeding of std::rand function before selecting random tribe. I am not sure if the time function is available on Windows like this, therefore I would like Tino to test this before merging. Thanks :)
To post a comment you must log in.
A nit:
- Pull the srand initialization into wlapplication (i.e. our 'main' function equivalent) and only do it once. Should we ever want to inject a seed (for testing) it should only be done in one place and this should have the same effect in all your call sites.