On Wed, 8 Jan 1997, Daniel Koepke wrote: - On Wed, 8 Jan 1997, Wyatt Bode wrote: - > In my version of CircleMUD, I was attempting to create two seperate - > planes of being: the "real" world and the "spirit" world. Each world - > would have it's own people and objects, and a person in one would not be - > able to see anything in the other unless they had a spell active which - > allowed that. My question is, how to best implement this? I was - > thinking of going with a seperate "contents" and "people" linked list - > for the worlds. Can anyone think of a better way, or could anyone share - > how they may have done this? Any advice would be most appreciated. - > Thanks!!! - - Flag people in the spirit plane with PLR_SPIRIT, then when going - through lists choose who to show and who not to depending upon - whether they PLR_SPIRIT?... Just a thought. That would probably be the easiest way. This is actually VERY easy, now that I think of it. I wrote some code a long time ago that set up a 200x200 overhead world map you could move around in and connect zones to. Since all terrain of the same type used the very same, I had to make a similar change so that players who were in the same room but had different x-y coordinates wouldn't see or hear each other. Same for objects. All I did was make two new macros in utils.h, and add them to the CAN_SEE and CAN_SEE_OBJ macros (MORT_CAN_SEE and MORT_CAN_SEE_OBJ in your case, unless you don't even want imms to see into the other plane). Your macros would probably look something like this: #PLANE_OK(sub, obj) ((PLR_FLAGGED((sub), PLR_SPIRIT) && \ PLR_FLAGGED((obj), PLR_SPIRIT)) || (PLR_FLAGGED((sub), PLR_REAL) && \ PLR_FLAGGED((obj), PLR_REAL) || IS_AFFECTED((sub), AFF_DUAL_PLANE)) One small problem though. Mobs don't have player flags, so this won't work as is. I suppose you could either make them AFF flags, or add a new bitvector in the char_data structure that will be common to mobs and players. Sam +-----------------------------------------------------------+ | Ensure that you have read the CircleMUD Mailing List FAQ: | | http://cspo.queensu.ca/~fletcher/Circle/list_faq.html | +-----------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/18/00 PST