Remove the per dungeon level door limit
Number of doors in a room-and-corridor style level was fixed at 120; now the doors-array is dynamically allocated when needed. Breaks saves and bones.
This commit is contained in:
+5
-1
@@ -1068,7 +1068,11 @@ getlev(NHFILE* nhfp, int pid, xint8 lev)
|
||||
mread(nhfp->fd, (genericptr_t)&g.updest, sizeof(dest_area));
|
||||
mread(nhfp->fd, (genericptr_t)&g.dndest, sizeof(dest_area));
|
||||
mread(nhfp->fd, (genericptr_t)&g.level.flags, sizeof(g.level.flags));
|
||||
mread(nhfp->fd, (genericptr_t)g.doors, sizeof(g.doors));
|
||||
if (g.doors)
|
||||
free(g.doors);
|
||||
mread(nhfp->fd, (genericptr_t) &g.doors_alloc, sizeof (g.doors_alloc));
|
||||
g.doors = (coord *) alloc(g.doors_alloc * sizeof (coord));
|
||||
mread(nhfp->fd, (genericptr_t) g.doors, g.doors_alloc * sizeof (coord));
|
||||
}
|
||||
rest_rooms(nhfp); /* No joke :-) */
|
||||
if (g.nroom)
|
||||
|
||||
Reference in New Issue
Block a user