Crossfire Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Coding question about apartments: interaction with random maps?
- To:
- Subject: Re: Coding question about apartments: interaction with random maps?
- From: Peter Mardahl <>
- Date: Wed, 07 Jun 2000 14:56:45 -0700
- In-Reply-To: Your message of "Wed, 07 Jun 2000 14:07:19 CDT." <>
>
> > DAMN was the author of the apartment code, apparently.
>
> No, I just fixed some bugs in it a while back. I never touched any of
> the random map code.
>
>
> > My question is about the code on line 271 of main.c.
>
> I just updated my copy from cvs, and main.c line 271 is:
>
> if (EXIT_PATH(exit_ob)) {
> which simply queries whether the exit leads to a different map. Or
> does the EXIT_PATH macro have some other meaning for random maps that
> I'm not aware of?
Yes, I meant the whole IF.
> If you mean the various other tests inside that if, that was one of
> the bugs I fixed. Because of the way map filenames are used as
> identifiers and are calculated from settings and map names, it was
> necessary to specifically check for the case of an exit leading from
> an apartment to an apartment, both of which have a default map as well
> as a personal map. (see Pocket Reality)
>
>
> > Newly generated random maps always seem to go through the
> > apartment code for some reason.
> >
> > Was this intended?
It just goes through that IF, which was marked as pertaining
to apartments, which confused me.
> Not by me. I never played with the random maps much, and it's been a
> while since I even looked at the apartment code. As I mentioned
> above, there is some correlation, in that they're not normal maps, but
> there are enough differences that perhaps they should be more cleanly
> seperated. If this were C++, one might even be tempted to make
> apartments and random maps seperate sub-classes of maps.
Yeah, I think it would be cleaner.
PeterM