home · contact · privacy
Server: Minor refactoring, removal of unneeded is_passable().
[plomrogue] / src / server / thing_actions.c
index d12087692514d70569c297a4fee893ae3b2d76ce..9f1f5726a3d2f82c33539800b155decacaab6d07 100644 (file)
@@ -15,7 +15,7 @@
                      * set_thing_position(), get_thing_type(),
                      * free_things_in_memory()
                      */
-#include "map.h" /* mv_yx_in_dir_legal(), is_passable() */
+#include "map.h" /* mv_yx_in_dir_legal() */
 #include "yx_uint8.h" /* mv_yx_in_dir_wrap(), yx_uint8_cmp() */
 #include "world.h" /* global world */
 
@@ -278,7 +278,8 @@ extern void actor_move(struct Thing * t)
             }
         }
     }
-    uint8_t passable = legal_move && is_passable(target);
+    char target_cell = world.map.cells[target.y * world.map.length + target.x];
+    uint8_t passable = legal_move && '.' == target_cell;
     if (passable)
     {
         set_thing_position(t, target);