home · contact · privacy
Add to TODO.
[plomrogue] / src / server / thing_actions.c
index ec713ae5bd02dc2e9dac915c48066e154812b151..9befd76234bc1efba1f2c9edf0c047d99eb7946c 100644 (file)
@@ -12,7 +12,8 @@
 #include "field_of_view.h" /* build_fov_map() */
 #include "hardcoded_strings.h" /* s */
 #include "things.h" /* Thing, ThingType, get_player(), own_thing(),
-                     * set_thing_position(), get_thing_type()
+                     * set_thing_position(), get_thing_type(),
+                     * free_things_in_memory()
                      */
 #include "map.h" /* is_passable() */
 #include "yx_uint8.h" /* mv_yx_in_dir(), yx_uint8_cmp() */
@@ -151,6 +152,8 @@ static void actor_hits_actor(struct Thing * hitter, struct Thing * hitted)
             hitted->fov_map = NULL;
             free(hitted->mem_map);
             hitted->mem_map = NULL;
+            free_things_in_memory(hitted->t_mem);
+            hitted->t_mem = NULL;
         }
         update_log(" It dies.");
     }