home
·
contact
·
privacy
projects
/
plomrogue
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Maps are always squares, therefore define only their edge lengths.
[plomrogue]
/
src
/
server
/
map_objects.c
diff --git
a/src/server/map_objects.c
b/src/server/map_objects.c
index ac36394ae9f5169bc37dcac87181d197a6ef634d..fa20c170455172d6c5bf6be501b9106bff7a1c81 100644
(file)
--- a/
src/server/map_objects.c
+++ b/
src/server/map_objects.c
@@
-59,8
+59,8
@@
static void add_map_object(uint8_t type)
for (pos.y = pos.x = 0; 0 == is_passable(pos); i++)
{
exit_err(UINT16_MAX == i, err);
for (pos.y = pos.x = 0; 0 == is_passable(pos); i++)
{
exit_err(UINT16_MAX == i, err);
- pos.y = rrand() % world.map.
size.y
;
- pos.x = rrand() % world.map.
size.x
;
+ pos.y = rrand() % world.map.
length
;
+ pos.x = rrand() % world.map.
length
;
}
struct MapObj * mo_ptr;
uint8_t clear = 1;
}
struct MapObj * mo_ptr;
uint8_t clear = 1;
@@
-117,6
+117,7
@@
extern void free_map_objects(struct MapObj * mo_start)
}
free_map_objects(mo_start->owns);
free_map_objects(mo_start->next);
}
free_map_objects(mo_start->owns);
free_map_objects(mo_start->next);
+ free(mo_start->fov_map);
free(mo_start);
if (mo_start == world.map_objs) /* So add_map_objects()' NULL-delimited */
{ /* map object iteration loop does not */
free(mo_start);
if (mo_start == world.map_objs) /* So add_map_objects()' NULL-delimited */
{ /* map object iteration loop does not */