home · contact · privacy
Server: Optimize thing position calculation.
[plomrogue] / server / new_thing.py
index 84bc5917d15ec5abc385fd080579088e0c357504..5c48177307d26fef4edf6f0092c353aab624ff5d 100644 (file)
@@ -16,6 +16,7 @@ def new_Thing(_type, pos=(0, 0)):
     thing["T_TYPE"] = _type
     thing["T_POSY"] = pos[0]
     thing["T_POSX"] = pos[1]
+    thing["pos"] = thing["T_POSY"] * world_db["MAP_LENGTH"] + thing["T_POSX"]
     if world_db["WORLD_ACTIVE"] and thing["T_LIFEPOINTS"]:
         build_fov_map(thing)
     return thing