From e4c0060d8c5b4f2a2ed09a21c01ff38ee1a8670c Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Sat, 5 Sep 2015 06:01:10 +0200 Subject: [PATCH] Server: Fix determinism bug in thingproliferation. --- roguelike-server | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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"] -- 2.30.2