Difference for server/time.c from version 1.86 to 1.87


version 1.86 version 1.87
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_time_c =   * static char *rcsid_time_c =
  *    "$Id: time.c,v 1.86 2006/02/07 07:54:46 mwedel Exp $";   *    "$Id: time.c,v 1.87 2006/03/18 15:05:37 ryo_saeba Exp $";
  */   */
   
 /*  /*
Line 37
 
Line 37
 #include <sproto.h>  #include <sproto.h>
 #endif  #endif
   
 /* The following removes doors.  The functions check to see if similar   /** The following removes doors.  The functions check to see if similar
  * doors are next to the one that is being removed, and if so, set it   * doors are next to the one that is being removed, and if so, set it
  * so those will be removed shortly (in a cascade like fashion.)   * so those will be removed shortly (in a cascade like fashion.)
  */   */
Line 62
 
Line 62
   free_object(op);    free_object(op);
 }  }
   
   /**
    * Same as remove_door but for locked doors.
    */
 void remove_door2(object *op) {  void remove_door2(object *op) {
   int i;    int i;
   object *tmp;    object *tmp;
Line 83
 
Line 86
   free_object(op);    free_object(op);
 }  }
   
 /* Will generate a monster according to content  /** Will generate a monster according to content
  * of generator.   * of generator.
  */   */
 void generate_monster_inv(object *gen) {  void generate_monster_inv(object *gen) {
Line 365
 
Line 368
     } /* gate is going up */      } /* gate is going up */
 }  }
   
 /*  hp      : how long door is open/closed  /**  hp      : how long door is open/closed
  *  maxhp   : initial value for hp   *  maxhp   : initial value for hp
  *  sp      : 1 = open, 0 = close   *  sp      : 1 = open, 0 = close
  */   */
Line 388
 
Line 391
   }    }
 }  }
   
 /*  slaying:    name of the thing the detector is to look for  /**  slaying:    name of the thing the detector is to look for
  * speed:      frequency of 'glances'   * speed:      frequency of 'glances'
  * connected:  connected value of detector   * connected:  connected value of detector
  *  sp:         1 if detection sets buttons   *  sp:         1 if detection sets buttons
  *              -1 if detection unsets buttons   *              -1 if detection unsets buttons
  */   */
   
 void move_detector(object *op)   void move_detector(object *op)
 {  {
     object *tmp;      object *tmp;
Line 488
 
Line 490
 }  }
   
   
 /* stop_item() returns a pointer to the stopped object.  The stopped object  /** stop_item() returns a pointer to the stopped object.  The stopped object
  * may or may not have been removed from maps or inventories.  It will not   * may or may not have been removed from maps or inventories.  It will not
  * have been merged with other items.   * have been merged with other items.
  *   *
Line 528
 
Line 530
     }      }
 }  }
   
 /* fix_stopped_item() - put stopped item where stop_item() had found it.  /** fix_stopped_item() - put stopped item where stop_item() had found it.
  * Inserts item into the old map, or merges it if it already is on the map.   * Inserts item into the old map, or merges it if it already is on the map.
  *   *
  * 'map' must be the value of op->map before stop_item() was called.   * 'map' must be the value of op->map before stop_item() was called.
Line 574
 
Line 576
     } else      } else
  op->slaying = NULL;   op->slaying = NULL;
   
     /* Reset these to zero, so that CAN_MERGE will work properly */      /* Reset these to zero, so that can_merge will work properly */
     op->spellarg = NULL;      op->spellarg = NULL;
     op->stats.sp = 0;      op->stats.sp = 0;
     op->stats.hp = 0;      op->stats.hp = 0;
Line 586
 
Line 588
     return op;      return op;
 }  }
   
 /* stop_arrow() - what to do when a non-living flying object  /** stop_arrow() - what to do when a non-living flying object
  * has to stop. Sept 96 - I added in thrown object code in   * has to stop. Sept 96 - I added in thrown object code in
  * here too. -b.t.   * here too. -b.t.
  *   *
Line 612
 
Line 614
     }      }
 }  }
   
 /* Move an arrow along its course.  op is the arrow or thrown object.  /** Move an arrow along its course.  op is the arrow or thrown object.
  */   */
   
 void move_arrow(object *op) {  void move_arrow(object *op) {
Line 795
 
Line 797
     insert_ob_in_map (op, m, op,0);      insert_ob_in_map (op, m, op,0);
 }  }
   
 /* This routine doesnt seem to work for "inanimate" objects that  /** This routine doesnt seem to work for "inanimate" objects that
  * are being carried, ie a held torch leaps from your hands!.    * are being carried, ie a held torch leaps from your hands!.
  * Modified this routine to allow held objects. b.t. */   * Modified this routine to allow held objects. b.t. */
   
 void change_object(object *op) { /* Doesn`t handle linked objs yet */  static void change_object(object *op) { /* Doesn`t handle linked objs yet */
   object *tmp,*env,*pl;    object *tmp,*env,*pl;
   int i,j;    int i,j;
   
Line 897
 
Line 899
 }  }
   
   
 /*  This object will teleport someone to a different map  /**  This object will teleport someone to a different map
     and will also apply changes to the player from its inventory.    *  and will also apply changes to the player from its inventory.
     This was invented for giving classes, but there's no reason it    *  This was invented for giving classes, but there's no reason it
     can't be generalized.    *  can't be generalized.
 */  */
   
 void move_player_changer(object *op) {  void move_player_changer(object *op) {
     object *player;      object *player;
     object *walk;      object *walk;
Line 942
 
Line 943
     }      }
 }  }
   
 /* firewalls fire other spells.  /**
    * firewalls fire other spells.
  * The direction of the wall is stored in op->stats.sp.   * The direction of the wall is stored in op->stats.sp.
  * walls can have hp, so they can be torn down.   * walls can have hp, so they can be torn down.
  */   */
Line 964
 
Line 966
 }  }
   
   
 /*  move_player_mover:  this function takes a "player mover" as an  /**
    * move_player_mover:  this function takes a "player mover" as an
  * argument, and performs the function of a player mover, which is:   * argument, and performs the function of a player mover, which is:
  *   *
  * a player mover finds any players that are sitting on it.  It   * a player mover finds any players that are sitting on it.  It
Line 1045
 
Line 1048
     }      }
 }  }
   
 /*  /**
  * Will duplicate a specified object placed on top of it.   * Will duplicate a specified object placed on top of it.
  * connected: what will trigger it.   * connected: what will trigger it.
  * level: multiplier.  0 to destroy.   * level: multiplier.  0 to destroy.
Line 1073
 
Line 1076
     }      }
 }  }
   
 /* move_creator (by peterm)   /**
    * move_creator (by peterm)
  * it has the creator object create it's other_arch right on top of it.   * it has the creator object create it's other_arch right on top of it.
  * connected:  what will trigger it   * connected:  what will trigger it
  * hp:  how many times it may create before stopping   * hp:  how many times it may create before stopping
Line 1086
 
Line 1090
  * more concern with large objects, most notably a part being placed   * more concern with large objects, most notably a part being placed
  * outside of the map which would cause the server to crash   * outside of the map which would cause the server to crash
 */  */
   
 void move_creator(object *creator) {  void move_creator(object *creator) {
     object *new_ob;      object *new_ob;
   
Line 1136
 
Line 1139
     }      }
 }  }
   
 /* move_marker --peterm@soda.csua.berkeley.edu  /**
    when moved, a marker will search for a player sitting above   * move_marker --peterm@soda.csua.berkeley.edu
    it, and insert an invisible, weightless force into him   * when moved, a marker will search for a player sitting above
    with a specific code as the slaying field.   * it, and insert an invisible, weightless force into him
    At that time, it writes the contents of its own message   * with a specific code as the slaying field.
    field to the player.  The marker will decrement hp to   * At that time, it writes the contents of its own message
    0 and then delete itself every time it grants a mark.   * field to the player.  The marker will decrement hp to
    unless hp was zero to start with, in which case it is infinite.*/   * 0 and then delete itself every time it grants a mark.
    * unless hp was zero to start with, in which case it is infinite.*/
 void move_marker(object *op) {  void move_marker(object *op) {
     object *tmp,*tmp2;      object *tmp,*tmp2;
      


Legend:
line(s) removed in v.1.86 
line(s) changed
 line(s) added in v.1.87

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