From: Christian Heller Date: Sat, 5 Sep 2015 04:01:10 +0000 (+0200) Subject: Server: Fix determinism bug in thingproliferation. X-Git-Tag: tce~290 X-Git-Url: https://plomlompom.com/repos/%7B%7Bdb.prefix%7D%7D/static/%7B%7B%20web_path%20%7D%7D/%7B%7Bprefix%7D%7D/day?a=commitdiff_plain;h=e4c0060d8c5b4f2a2ed09a21c01ff38ee1a8670c;p=plomrogue Server: Fix determinism bug in thingproliferation. --- diff --git a/roguelike-server b/roguelike-server index 536ab76..94f540b 100755 --- a/roguelike-server +++ b/roguelike-server @@ -734,7 +734,7 @@ def thingproliferation(t, prol_map): prolscore = world_db["ThingTypes"][t["T_TYPE"]]["TT_PROLIFERATE"] if prolscore and (1 == prolscore or 1 == (rand.next() % prolscore)): candidates = [] - for dir in [directions_db[key] for key in directions_db]: + for dir in [directions_db[key] for key in sorted(directions_db.keys())]: mv_result = mv_yx_in_dir_legal(dir, t["T_POSY"], t["T_POSX"]) if mv_result[0] and ord('.') == prol_map[mv_result[1] * world_db["MAP_LENGTH"]