Difference for common/object.c from version 1.21 to 1.22


version 1.21 version 1.22
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_object_c =   * static char *rcsid_object_c =
  *   "$Id: object.c,v 1.21 2001/04/07 06:04:24 mardahl Exp $";   *   "$Id: object.c,v 1.22 2001/04/28 05:54:32 mwedel Exp $";
  */   */
   
 /*  /*
Line 742
 
Line 742
  */   */
   
 void update_object(object *op) {  void update_object(object *op) {
     object *tmp, *player;      object *player;
   
     if(op->env!=NULL) {      if(op->env!=NULL) {
  tmp=is_player_inv(op->env);   /* Animation is currently handled by client, so nothing
  /* If we are in ericserver mode, I think we should send an update   * to do in this case.
  * or something.  Ideally, client should handle animations on its  
  * own.  
  */   */
  return;   return;
     }      }
Line 756
 
Line 754
     /* Can be null if the player has quit but window still exists. */      /* Can be null if the player has quit but window still exists. */
     if (op->map->map != NULL) {      if (op->map->map != NULL) {
  player=update_position (op->map, op->x, op->y);   player=update_position (op->map, op->x, op->y);
  /*  
  * insert_ob_in_map calls update_ob.  insert_ob_in_map is called with   /* Special check here.  If a player is on this space, and the
  * the player object anytime he moves - as such, we compare the object   * player is not the object that has changed, and the object is
  * being updated against the player object so that we don't send   * not normally animated (ie, buttons) and not invisible, mark this
  * unnecessary update commands.  Also, the client doesn't do anything   * space to be updated.
  * with the players face anyways.  
  * As a note - we assume that we get here because the face has changed -  
  * this might not always be the case, but seems to be a good amount of  
  * the time, and its easier to do this than track down all the places in  
  * the code that changes the face.  
  *  
  * Add a check so that if the item that is changing is hidden from  
  * the player (ie, below the floor), we don't send an update to the  
  * player.  
  * If update_look has been set, that is going to send all the stuff  
  * anyways, so no reason to send an update for it  
  */   */
    if (player && player!=op &&  op->speed < MIN_ACTIVE_SPEED && !op->invisible) {
    player->contr->socket.update_look=1;
    }
   
 #if 0  #if 0
  if (player && player!=op && !player->contr->socket.update_look) {   if (player && player!=op && !player->contr->socket.update_look) {


Legend:
line(s) removed in v.1.21 
line(s) changed
 line(s) added in v.1.22

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