Home

[Package Index | Mudlib Index | Effect Index]

File /std/basic/virtual_quit_control.c

This method handles problems where players log out in places which are virtually controlled. It does the effort to put them back in, but does it in a way that is recursive. So if they are on a horse in a terrain it will work properly.

Written by Pinkfish

Started Wed Sep 22 18:24:40 PDT 1999

Example

inherit "/std/basic/virtual_quit_control";

void player_quitting(object player, object place) {
   string pos;

   pos = check_start_pos(environment(place));
   // Doesn't need to last long since we save immediately.
   player->add_property(START_PLACE, pos, 10);
   ::player_quitting(player, environment(place));
} /* player_quitting() */

// Move the player to the right spot when they login.
void event_enter(object player) {
   player->move(player->query_property(START_PLACE));
} /* move_player_to_real_location() */

Method index

  • find_start_coord(object, object)
    This method is called on the quit handler when a player quits.
  • find_start_pos(object, object)
    This method is called on the quit handler when a player quits.

Protected Functions

These are functions that only objects inheriting the class can access.

    find_start_coord
    int * find_start_coord(object player,
                           object place)
    

    This method is called on the quit handler when a player quits.
    • Parameters:
      player - the player
      place - the place they quit from
    • Returns:
      the last position (if that needs to be saved).
    find_start_pos
    string find_start_pos(object player,
                          object place)
    

    This method is called on the quit handler when a player quits.
    • Parameters:
      player - the player
      place - the place they quit from
    • Returns:
      the last position (if that needs to be saved).
Valid HTML 4.01 Transitional
Valid CSS!
Read More