B14001 - Stinking clouds in bonesfiles

Incorporate a fix from <Someone> that resets the timestamp on
stinking clouds left in bones files.  This does allow the cloud's ttl to
restart.  Extended it to reset the player_inside flag.

Then noticed that the only placed that called in_out_region was domove().
Added calls when changing levels (which causes player_inside to be set
correctly if the cloud covers the location where the player starts on the
bones level), teleporting, and inside hurtle_step.  There are still other
places that fail to call in_out_region, which others may choose to tackle.

I split out the remaining stinking cloud bug reported in the same e-mail
into a separate betabug.  That one probably cannot be addressed without
changing the level file format to track the creator.
This commit is contained in:
cohrs
2002-10-16 06:30:36 +00:00
parent bb732e194a
commit cb38d0882d
7 changed files with 14 additions and 4 deletions

View File

@@ -657,8 +657,9 @@ skip_lots:
}
void
rest_regions(fd)
rest_regions(fd, ghostly)
int fd;
boolean ghostly; /* If a bones file restore */
{
int i, j;
unsigned n;
@@ -667,7 +668,8 @@ int fd;
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)
@@ -715,6 +717,7 @@ int fd;
mread(fd, (genericptr_t) &regions[i]->leave_f, sizeof (short));
mread(fd, (genericptr_t) &regions[i]->inside_f, sizeof (short));
mread(fd, (genericptr_t) &regions[i]->player_inside, sizeof (boolean));
if (ghostly) regions[i]->player_inside = FALSE; /* old player */
mread(fd, (genericptr_t) &regions[i]->n_monst, sizeof (short));
if (regions[i]->n_monst > 0)
regions[i]->monsters =