Reasonably easy to do.. in char_to_room, find this part..

    ch->next_in_room    = pRoomIndex->people;
    pRoomIndex->people  = ch;

That's where it adds the person to the room list.  Basically you just need
to find the end of the list and put them there instead of the front, similar
to this:

ch->next_in_room = NULL;
if (!pRoomIndex->people)
  pRoomIndex->people = ch;
else
{
  CHAR_DATA *tmpch = pRoomIndex->people;
  while (tmpch->next_in_room); // find the last char in the room
  tmpch->next_in_room = ch; // make ch the next one
}

----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Thursday, January 02, 2003 10:03 PM
Subject: Moving characters into rooms...


> Currently when a monster enters a room it is set at the to of the list.
> Lets say you were trying to cast a spell at the first monster, and only
> monster that was in the room, (and you weren't in combat yet), suddenly
the
> same type of monster type comes in, and you cast the spell - it would hit
the
> monster that just came in. What I want to do is make the monster appear
under
> the current monster so you don't target the new one.
> If you do not understand what I'm talking about I'll try to explain it
again.
> I'm not sure how to do this, but I think its something with char to room,
but
> I do not fully understand it.
> Thanks


Reply via email to