Random tribe selection always gives the same result

Bug #1302635 reported by wl-zocker
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
widelands
Fix Released
Medium
Shevonar

Bug Description

Tested with r6910 on Win7.
- Close Widelands (if open) and restart it.
- Start a new singleplayer game with eight players and windcondition "endless game (no fog)".
- Check the tribes of the eight players.

Expected result: They tribes should be different everytime I try it.
Actual result: When I have restarted Widelands (when you do it twice without restarting, you get different results), I do always get the same tribe distribution (for me, it is AAEEAEBB (A = Atlanteans, E = Empire, B = Barbarians)).

This means, when I only start one game per session (what I normally do) and choose all tribes to be random (because I do not want to decide), I am always Atlantean, which is not the sense of the random tribe selection.

Related branches

Revision history for this message
Shevonar (shevonar) wrote :

I guess I didn't properly (if at all) seed the rand function. Should be easy to fix. I can take care of this.

Changed in widelands:
assignee: nobody → Shevonar (shevonar)
Revision history for this message
Hans Joachim Desserud (hjd) wrote :

Confirmed in r6914.

Indeed it use the same "random" selection after restarting Widelands.

(I wonder whether bug 1089731 which was reported earlier could be related to this.)

Changed in widelands:
importance: Undecided → Medium
milestone: none → build19-rc1
status: New → Triaged
Revision history for this message
Shevonar (shevonar) wrote :

Yes, I guess bug 1089731 has the same underlying reason.

Shevonar (shevonar)
Changed in widelands:
status: Triaged → In Progress
Shevonar (shevonar)
Changed in widelands:
status: In Progress → Fix Committed
GunChleoc (gunchleoc)
Changed in widelands:
status: Fix Committed → Fix Released
Revision history for this message
GunChleoc (gunchleoc) wrote :

Fixed in build19-rc1.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.