Difference for server/main.c from version 1.112 to 1.113


version 1.112 version 1.113
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_main_c =   * static char *rcsid_main_c =
  *    "$Id: main.c,v 1.112 2006/02/08 06:53:24 mwedel Exp $";   *    "$Id: main.c,v 1.113 2006/03/18 15:05:37 ryo_saeba Exp $";
  */   */
   
 /*  /*
Line 150
 
Line 150
   }    }
 }  }
   
 /* Really, there is no reason to crypt the passwords  any system.  But easier  /**
    * Really, there is no reason to crypt the passwords  any system.  But easier
  * to just leave this enabled for backward compatibility.  Put the   * to just leave this enabled for backward compatibility.  Put the
  * simple case at top - no encryption - makes it easier to read.   * simple case at top - no encryption - makes it easier to read.
  */   */
Line 181
 
Line 182
   return !strcmp(crypt_string(typed,crypted),crypted);    return !strcmp(crypt_string(typed,crypted),crypted);
 }  }
   
 /* This is a basic little function to put the player back to his  /**
    * This is a basic little function to put the player back to his
  * savebed.  We do some error checking - its possible that the   * savebed.  We do some error checking - its possible that the
  * savebed map may no longer exist, so we make sure the player   * savebed map may no longer exist, so we make sure the player
  * goes someplace.   * goes someplace.
Line 217
 
Line 219
     free_object(tmp);      free_object(tmp);
 }  }
   
 /* All this really is is a glorified remove_object that also updates  /**
    * All this really is is a glorified remove_object that also updates
  * the counts on the map if needed.   * the counts on the map if needed.
  */   */
 void leave_map(object *op)  void leave_map(object *op)
Line 235
 
Line 238
     }      }
 }  }
   
 /*  /**
  *  enter_map():  Moves the player and pets from current map (if any) to   *  enter_map():  Moves the player and pets from current map (if any) to
  * new map.  map, x, y must be set.  map is the map we are moving the   * new map.  map, x, y must be set.  map is the map we are moving the
  * player to - it could be the map he just came from if the load failed for   * player to - it could be the map he just came from if the load failed for
Line 360
 
Line 363
     swap_below_max (newmap->path);      swap_below_max (newmap->path);
   
     if( op->type == PLAYER)      if( op->type == PLAYER)
         MapNewmapCmd( op->contr);          map_newmap_cmd(op->contr);
 }  }
   
 void set_map_timeout(mapstruct *oldmap)  void set_map_timeout(mapstruct *oldmap)
Line 385
 
Line 388
 }  }
   
   
 /* clean_path takes a path and replaces all / with _  /**
    * clean_path takes a path and replaces all / with _
  * We do a strcpy so that we do not change the original string.   * We do a strcpy so that we do not change the original string.
  */   */
 char *clean_path(const char *file)  char *clean_path(const char *file)
Line 401
 
Line 405
 }  }
   
   
 /* unclean_path takes a path and replaces all _ with /  /**
    * unclean_path takes a path and replaces all _ with /
  * This basically undoes clean path.   * This basically undoes clean path.
  * We do a strcpy so that we do not change the original string.   * We do a strcpy so that we do not change the original string.
  * We are smart enough to start after the last / in case we   * We are smart enough to start after the last / in case we
Line 426
 
Line 431
 }  }
   
   
 /* The player is trying to enter a randomly generated map.  In this case, generate the  /**
    * The player is trying to enter a randomly generated map.  In this case, generate the
  * random map as needed.   * random map as needed.
  */   */
   
Line 487
 
Line 493
     }      }
 }  }
   
 /* The player is trying to enter a non-randomly generated template map.  In this  /**
    * The player is trying to enter a non-randomly generated template map.  In this
  * case, use a map file for a template   * case, use a map file for a template
  */   */
   
Line 568
 
Line 575
 }  }
   
   
 /* The player is trying to enter a randomly generated template map.  In this  /**
    * The player is trying to enter a randomly generated template map.  In this
  * case, generate the map as needed.   * case, generate the map as needed.
  */   */
   
Line 633
 
Line 641
 }  }
   
   
 /* Code to enter/detect a character entering a unique map.  /**
    * Code to enter/detect a character entering a unique map.
  */   */
 static void enter_unique_map(object *op, object *exit_ob)  static void enter_unique_map(object *op, object *exit_ob)
 {  {
Line 704
 
Line 713
 }  }
   
   
 /* Tries to move 'op' to exit_ob.  op is the character or monster that is  /**
    * Tries to move 'op' to exit_ob.  op is the character or monster that is
  * using the exit, where exit_ob is the exit object (boat, door, teleporter,   * using the exit, where exit_ob is the exit object (boat, door, teleporter,
  * etc.)  if exit_ob is null, then op->contr->maplevel contains that map to   * etc.)  if exit_ob is null, then op->contr->maplevel contains that map to
  * move the object to.  This is used when loading the player.   * move the object to.  This is used when loading the player.
Line 868
 
Line 878
     }      }
 }  }
   
 /*  /**
  * process_active_maps(): Works like process_events(), but it only   * process_active_maps(): Works like process_events(), but it only
  * processes maps which a player is on.   * processes maps which a player is on.
  * It will check that it isn't called too often, and abort   * It will check that it isn't called too often, and abort
  * if time since last call is less than MAX_TIME.   * if time since last call is less than MAX_TIME.
  *  
  */   */
   
 void process_active_maps(void) {  void process_active_maps(void) {
Line 893
 
Line 902
     }      }
 }  }
   
 /* process_players1 and process_players2 do all the player related stuff.  /**
    * process_players1 and process_players2 do all the player related stuff.
  * I moved it out of process events and process_map.  This was to some   * I moved it out of process events and process_map.  This was to some
  * extent for debugging as well as to get a better idea of the time used   * extent for debugging as well as to get a better idea of the time used
  * by the various functions.  process_players1() does the processing before   * by the various functions.  process_players1() does the processing before
Line 1161
 
Line 1171
   write_todclock(); /* lets just write the clock here */    write_todclock(); /* lets just write the clock here */
 }  }
   
 /* clean up everything before exiting */  /** clean up everything before exiting */
 void cleanup(void)  void cleanup(void)
 {  {
     LOG(llevDebug,"Cleanup called.  freeing data.\n");      LOG(llevDebug,"Cleanup called.  freeing data.\n");
Line 1262
 
Line 1272
 #endif  #endif
 }  }
   
 /*  /**
  *  do_specials() is a collection of functions to call from time to time.   *  do_specials() is a collection of functions to call from time to time.
  * Modified 2000-1-14 MSW to use the global pticks count to determine how   * Modified 2000-1-14 MSW to use the global pticks count to determine how
  * often to do things.  This will allow us to spred them out more often.   * often to do things.  This will allow us to spred them out more often.


Legend:
line(s) removed in v.1.112 
line(s) changed
 line(s) added in v.1.113

File made using version 1.98 of cvs2html by leaf at 2011-07-21 17:35