home · contact · privacy
Server: Force FOV on every actor, but update it on movement only.
[plomrogue] / src / server / map_object_actions.c
index 978683292af5b76ab902e8cb5f3525b540bd9d1c..6c92d07577eaade92234e042b2d64beb0d3c572e 100644 (file)
@@ -9,6 +9,7 @@
 #include "../common/rexit.h" /* exit_err() */
 #include "../common/try_malloc.h" /* try_malloc() */
 #include "../common/yx_uint8.h" /* struct yx_uint8 */
+#include "field_of_view.h" /* build_fov_map() */
 #include "map_objects.h" /* structs MapObj, MapObjDef, get_player(),
                           * set_object_position(), own_map_object(),
                           * get_map_object_def()
@@ -262,6 +263,8 @@ extern void actor_move(struct MapObj * mo)
     if (passable)
     {
         set_object_position(mo, target);
+        free(mo->fov_map);
+        mo->fov_map = build_fov_map(mo);
     }
     if (mo == get_player())
     {