home
·
contact
·
privacy
projects
/
plomrogue
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add auto-mapping / map memory.
[plomrogue]
/
src
/
server
/
thing_actions.c
diff --git
a/src/server/thing_actions.c
b/src/server/thing_actions.c
index bcf9e455f4d382d538633f75681f77b6d76d7b3d..40a44ba17ce71dd4ed51a8ae29137b9618edce95 100644
(file)
--- a/
src/server/thing_actions.c
+++ b/
src/server/thing_actions.c
@@
-142,8
+142,16
@@
static void actor_hits_actor(struct Thing * hitter, struct Thing * hitted)
if (player == hitted)
{
update_log(" You die.");
if (player == hitted)
{
update_log(" You die.");
+ memset(hitted->fov_map, ' ', world.map.length * world.map.length);
return;
}
return;
}
+ else
+ {
+ free(hitted->fov_map);
+ hitted->fov_map = NULL;
+ free(hitted->mem_map);
+ hitted->mem_map = NULL;
+ }
update_log(" It dies.");
}
}
update_log(" It dies.");
}
}
@@
-266,8
+274,7
@@
extern void actor_move(struct Thing * t)
if (passable)
{
set_thing_position(t, target);
if (passable)
{
set_thing_position(t, target);
- free(t->fov_map);
- t->fov_map = build_fov_map(t);
+ build_fov_map(t);
}
if (t == get_player())
{
}
if (t == get_player())
{