#include "../common/rexit.h" /* exit_trouble() */
#include "../common/try_malloc.h" /* try_malloc() */
#include "cleanup.h" /* unset_cleanup_flag() */
-#include "field_of_view.h" /* build_fov_map() */
+#include "field_of_view.h" /* build_fov_map(), update_map_memory() */
#include "hardcoded_strings.h" /* s */
#include "init.h" /* remake_world() */
#include "map.h" /* remake_map() */
* actor_use(), actor_pickup(), actor_drop()
*/
#include "things.h" /* Thing, ThingType, add_thing(), get_thing(), own_thing(),
- * free_things(), add_thing_to_memory_map(),get_thing_type()
+ * free_things(), add_thing_to_memory_map(),get_thing_type(),
+ * get_player()
*/
#include "world.h" /* world */
if (!tt &&
( !strcmp(tok0, s[S_CMD_TT_CONSUM]) || !strcmp(tok0, s[S_CMD_TT_SYMB])
|| !strcmp(tok0, s[S_CMD_TT_STARTN]) || !strcmp(tok0, s[S_CMD_TT_NAME])
- || !strcmp(tok0, s[S_CMD_TT_CORPS]) || !strcmp(tok0, s[S_CMD_TT_HP])))
+ || !strcmp(tok0, s[S_CMD_TT_CORPS]) || !strcmp(tok0, s[S_CMD_TT_HP])
+ || !strcmp(tok0, s[S_CMD_TT_PROL])))
{
return err_line(1, "No thing type defined to manipulate yet.");
}
|| parse_val(tok0,tok1,s[S_CMD_TT_HP],'8',(char *) &tt->lifepoints)
|| parse_val(tok0,tok1,s[S_CMD_TT_STARTN],'8',(char *) &tt->start_n)
|| parse_val(tok0,tok1,s[S_CMD_TT_SYMB],'c',(char *) &tt->char_on_map)
+ || parse_val(tok0,tok1,s[S_CMD_TT_PROL],'8',(char *) &tt->proliferate)
|| parse_val(tok0,tok1,s[S_CMD_TT_NAME],'s',(char *) &tt->name));
else if (parse_val(tok0, tok1, s[S_CMD_TT_CORPS],'8',(char *)&id))
{
if (world.exists && t->lifepoints)
{
build_fov_map(t);
+ if (t == get_player())
+ {
+ update_map_memory(t);
+ }
}
}
return 1;
if (!t && !err_line(!world.thing_types, err))
{
t = add_thing(id, world.thing_types->id, 0, 0);
- if (world.exists && t->lifepoints)
- {
- build_fov_map(t);
- }
}
}
else
if (ti->lifepoints)
{
build_fov_map(ti);
+ if (ti == get_player())
+ {
+ update_map_memory(ti);
+ }
}
}
world.exists = 1;