renamed debug commands: light sources -> lightsources,
monpoly_control -> monpolycontrol
detect attempt to swap places with big pet through narrow opening
+stinking clouds in bones files do not get their ttl set reasonably
+stinking clouds in bones files may incorrectly set player_inside
Platform- and/or Interface-Specific Fixes
E NhRegion *FDECL(visible_region_at, (XCHAR_P,XCHAR_P));
E void FDECL(show_region, (NhRegion*, XCHAR_P, XCHAR_P));
E void FDECL(save_regions, (int,int));
-E void FDECL(rest_regions, (int));
+E void FDECL(rest_regions, (int,BOOLEAN_P));
E NhRegion* FDECL(create_gas_cloud, (XCHAR_P, XCHAR_P, int, int));
/* ### restore.c ### */
save_currentstate();
#endif
+ /* assume this will always return TRUE when changing level */
+ (void) in_out_region(u.ux, u.uy);
(void) pickup(1);
}
if (!isok(x,y)) {
You_feel("the spirits holding you back.");
return FALSE;
+ } else if (!in_out_region(x, y)) {
+ return FALSE;
}
if (!Passes_walls || !(may_pass = may_passwall(x, y))) {
}
void
-rest_regions(fd)
+rest_regions(fd, ghostly)
int fd;
+boolean ghostly; /* If a bones file restore */
{
int i, j;
unsigned n;
clear_regions(); /* Just for security */
mread(fd, (genericptr_t) &tmstamp, sizeof (tmstamp));
- tmstamp = (moves - tmstamp);
+ if (ghostly) tmstamp = 0;
+ else tmstamp = (moves - tmstamp);
mread(fd, (genericptr_t) &n_regions, sizeof (n_regions));
max_regions = n_regions;
if (n_regions > 0)
mread(fd, (genericptr_t) ®ions[i]->leave_f, sizeof (short));
mread(fd, (genericptr_t) ®ions[i]->inside_f, sizeof (short));
mread(fd, (genericptr_t) ®ions[i]->player_inside, sizeof (boolean));
+ if (ghostly) regions[i]->player_inside = FALSE; /* old player */
mread(fd, (genericptr_t) ®ions[i]->n_monst, sizeof (short));
if (regions[i]->n_monst > 0)
regions[i]->monsters =
}
restdamage(fd, ghostly);
- rest_regions(fd);
+ rest_regions(fd, ghostly);
if (ghostly) {
/* Now get rid of all the temp fruits... */
freefruitchn(oldfruit), oldfruit = 0;
if (!trapok && t_at(x, y)) return FALSE;
if (!goodpos(x, y, &youmonst)) return FALSE;
if (!tele_jump_ok(u.ux, u.uy, x, y)) return FALSE;
+ if (!in_out_region(x, y)) return FALSE;
return TRUE;
}