home · contact · privacy
Fix KeyError bug in actor_move.
authorChristian Heller <c.heller@plomlompom.de>
Tue, 10 Mar 2015 19:01:04 +0000 (20:01 +0100)
committerChristian Heller <c.heller@plomlompom.de>
Tue, 10 Mar 2015 19:01:04 +0000 (20:01 +0100)
roguelike-server

index 0461c5cf25a0f8a51ce09a325e2007f1c5b52a2f..0a44ee61a17af99ab597642ecb467a6ffbbe875b 100755 (executable)
@@ -626,6 +626,7 @@ def actor_move(t):
         if len(hitted):
             hit_id = hitted[0]
             if t == world_db["Things"][0]:
         if len(hitted):
             hit_id = hitted[0]
             if t == world_db["Things"][0]:
+                hitted_type = world_db["Things"][hit_id]["T_TYPE"]
                 hitted_name = world_db["ThingTypes"][hitted_type]["TT_NAME"]
                 strong_write(io_db["file_out"], "LOG You wound " + hitted +
                                                 ".\n")
                 hitted_name = world_db["ThingTypes"][hitted_type]["TT_NAME"]
                 strong_write(io_db["file_out"], "LOG You wound " + hitted +
                                                 ".\n")