Re: [CODE] Glist

From: John Evans (
Date: 01/27/97

On Mon, 27 Jan 1997, Aragorn wrote:

> How true ;) But there remains one more thing. Only mob-spec-procs are called
> once in a while (from mobact.c) Thats why only mobs have that SPEC flag.
> Rooms and objects are not called because of (i think) performance reasons.
> Running through all rooms and objects every tic could get quite cpu-intensive.
> A solution to this is to make a linked-list with all rooms to call and one
> for all objects to call. So brush off that editor and start coding ;)

	Been working on getting the rooms to be more interactive than just
sitting there and letting people walk through them. The reason that ONLY
mobs have spec_procs that are not triggered by user input is because the
heartbeat will call mobile_activity() (in mobact.c).
	mobile_activity() will then go through all characters (mobs and
players) and check for a SPEC flag. If it finds it, the it will do the
spec_proc. After this, it continues on to do the needed things with other
flags for the mobs.
	At this point, it skips over any character that does not have the
IS_NPC flag. This means the players, or a mob without that flag. Here's
where you can stick in an else statement, and have it scan the rooms that
those characters are in for SPEC flags.
	This will not slow down the system appreciable because there are
(most days) less players than there are mobiles. Check to see if the room
that the player is in has a SPEC flag, and if it does, call the spec_proc
for that room.

	This, of course, requires that a SPEC flag be added to the room's
database, but that isn't all that hard to do. I haven't gotten to that
point in my coding yet, so I could be in for a BIG surprise. :)

Any thoughts, advice, tips or tricks on this topic?
I'd especially like to hear from someone that has attempted this in the

John Evans   [RPGs, SCA, MUDs and Search Engines]      [Slanted Reality]

| Ensure that you have read the CircleMUD Mailing List FAQ: |
|   |

This archive was generated by hypermail 2b30 : 12/18/00 PST