Difference for server/time.c from version 1.54 to 1.55


version 1.54 version 1.55
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_time_c =   * static char *rcsid_time_c =
  *    "$Id: time.c,v 1.54 2003/03/20 07:21:05 mwedel Exp $";   *    "$Id: time.c,v 1.55 2003/06/26 11:27:43 gros Exp $";
  */   */
   
 /*  /*
Line 576
 
Line 576
   
 static void stop_arrow (object *op)  static void stop_arrow (object *op)
 {  {
       event *evt;
     /* GROS: Handle for plugin stop event */      /* GROS: Handle for plugin stop event */
     if(op->event_hook[EVENT_STOP] != NULL)      if ((evt = find_event(op, EVENT_STOP)) != NULL)
     {      {
         CFParm CFP;          CFParm CFP;
         int k, l, m;          int k, l, m;
Line 593
 
Line 594
         CFP.Value[6] = &m;          CFP.Value[6] = &m;
         CFP.Value[7] = &m;          CFP.Value[7] = &m;
         CFP.Value[8] = &l;          CFP.Value[8] = &l;
         CFP.Value[9] = op->event_hook[k];          CFP.Value[9] = evt->hook;
         CFP.Value[10]= op->event_options[k];          CFP.Value[10]= evt->options;
         if (findPlugin(op->event_plugin[k])>=0)          if (findPlugin(evt->plugin)>=0)
             ((PlugList[findPlugin(op->event_plugin[k])].eventfunc) (&CFP));              ((PlugList[findPlugin(evt->plugin)].eventfunc) (&CFP));
     }      }
     if (op->inv) {      if (op->inv) {
  object *payload = op->inv;   object *payload = op->inv;
Line 822
 
Line 823
   
 void move_teleporter(object *op) {  void move_teleporter(object *op) {
     object *tmp, *head=op;      object *tmp, *head=op;
       event *evt;
     /* if this is a multipart teleporter, handle the other parts      /* if this is a multipart teleporter, handle the other parts
      * The check for speed isn't strictly needed - basically, if       * The check for speed isn't strictly needed - basically, if
      * there is an old multipart teleporter in which the other parts       * there is an old multipart teleporter in which the other parts
Line 844
 
Line 845
       if(op->above->type==PLAYER)        if(op->above->type==PLAYER)
       {        {
         /* GROS: Handle for plugin TRIGGER event */          /* GROS: Handle for plugin TRIGGER event */
         if(op->event_hook[EVENT_TRIGGER] != NULL)          if ((evt = find_event(op, EVENT_TRIGGER)) != NULL)
         {          {
           CFParm CFP;            CFParm CFP;
           CFParm* CFR;            CFParm* CFR;
Line 862
 
Line 863
           CFP.Value[6] = &m;            CFP.Value[6] = &m;
           CFP.Value[7] = &m;            CFP.Value[7] = &m;
           CFP.Value[8] = &l;            CFP.Value[8] = &l;
           CFP.Value[9] = op->event_hook[k];            CFP.Value[9] = evt->hook;
           CFP.Value[10]= op->event_options[k];            CFP.Value[10]= evt->options;
           if (findPlugin(op->event_plugin[k])>=0)            if (findPlugin(evt->plugin)>=0)
           {            {
             CFR = (PlugList[findPlugin(op->event_plugin[k])].eventfunc) (&CFP);              CFR = (PlugList[findPlugin(evt->plugin)].eventfunc) (&CFP);
             rtn_script = *(int *)(CFR->Value[0]);              rtn_script = *(int *)(CFR->Value[0]);
           }            }
           if (rtn_script!=0) return;            if (rtn_script!=0) return;
Line 885
 
Line 886
      return;       return;
  }   }
  /* GROS: Handle for plugin TRIGGER event */   /* GROS: Handle for plugin TRIGGER event */
  if(op->event_hook[EVENT_TRIGGER] != NULL)      if ((evt = find_event(op, EVENT_TRIGGER)) != NULL)
  {   {
  CFParm CFP;   CFParm CFP;
  CFParm* CFR;   CFParm* CFR;
Line 903
 
Line 904
  CFP.Value[6] = &m;   CFP.Value[6] = &m;
  CFP.Value[7] = &m;   CFP.Value[7] = &m;
  CFP.Value[8] = &l;   CFP.Value[8] = &l;
  CFP.Value[9] = op->event_hook[k];   CFP.Value[9] = evt->hook;
  CFP.Value[10]= op->event_options[k];   CFP.Value[10]= evt->options;
  if (findPlugin(op->event_plugin[k])>=0)   if (findPlugin(evt->plugin)>=0)
  {   {
  CFR = (PlugList[findPlugin(op->event_plugin[k])].eventfunc) (&CFP);   CFR = (PlugList[findPlugin(evt->plugin)].eventfunc) (&CFP);
  rtn_script = *(int *)(CFR->Value[0]);   rtn_script = *(int *)(CFR->Value[0]);
  }   }
  if (rtn_script!=0) return;   if (rtn_script!=0) return;
Line 918
 
Line 919
     {      {
  /* Random teleporter */   /* Random teleporter */
  /* GROS: Handle for plugin TRIGGER event */   /* GROS: Handle for plugin TRIGGER event */
  if(op->event_hook[EVENT_TRIGGER] != NULL)          if ((evt = find_event(op, EVENT_TRIGGER)) != NULL)
  {   {
  CFParm CFP;   CFParm CFP;
  CFParm* CFR;   CFParm* CFR;
Line 936
 
Line 937
  CFP.Value[6] = &m;   CFP.Value[6] = &m;
  CFP.Value[7] = &m;   CFP.Value[7] = &m;
  CFP.Value[8] = &l;   CFP.Value[8] = &l;
  CFP.Value[9] = op->event_hook[k];   CFP.Value[9] = evt->hook;
  CFP.Value[10]= op->event_options[k];   CFP.Value[10]= evt->options;
  if (findPlugin(op->event_plugin[k])>=0)   if (findPlugin(evt->plugin)>=0)
  {   {
  CFR = (PlugList[findPlugin(op->event_plugin[k])].eventfunc) (&CFP);   CFR = (PlugList[findPlugin(evt->plugin)].eventfunc) (&CFP);
  rtn_script = *(int *)(CFR->Value[0]);   rtn_script = *(int *)(CFR->Value[0]);
  }   }
  if (rtn_script!=0) return;   if (rtn_script!=0) return;
Line 959
 
Line 960
 void move_player_changer(object *op) {  void move_player_changer(object *op) {
   object *player;    object *player;
   object *walk;    object *walk;
     event *evt;
   char c;    char c;
    if(op->above!=NULL) {     if(op->above!=NULL) {
     if(EXIT_PATH(op)) {      if(EXIT_PATH(op)) {
       if(op->above->type==PLAYER) {        if(op->above->type==PLAYER) {
       /* GROS: Handle for plugin TRIGGER event */        /* GROS: Handle for plugin TRIGGER event */
       if(op->event_hook[EVENT_TRIGGER] != NULL)        if ((evt = find_event(op, EVENT_TRIGGER)) != NULL)
       {        {
         CFParm CFP;          CFParm CFP;
         CFParm* CFR;          CFParm* CFR;
Line 982
 
Line 984
         CFP.Value[6] = &m;          CFP.Value[6] = &m;
         CFP.Value[7] = &m;          CFP.Value[7] = &m;
         CFP.Value[8] = &l;          CFP.Value[8] = &l;
         CFP.Value[9] = op->event_hook[k];          CFP.Value[9] = evt->hook;
         CFP.Value[10]= op->event_options[k];          CFP.Value[10]= evt->options;
         if (findPlugin(op->event_plugin[k])>=0)          if (findPlugin(evt->plugin)>=0)
         {          {
           CFR = (PlugList[findPlugin(op->event_plugin[k])].eventfunc) (&CFP);            CFR = (PlugList[findPlugin(evt->plugin)].eventfunc) (&CFP);
           rtn_script = *(int *)(CFR->Value[0]);            rtn_script = *(int *)(CFR->Value[0]);
         }          }
         if (rtn_script!=0) return;          if (rtn_script!=0) return;
Line 1219
 
Line 1221
    
 int process_object(object *op) {  int process_object(object *op) {
   
     event *evt;
   
   if(QUERY_FLAG(op, FLAG_MONSTER))    if(QUERY_FLAG(op, FLAG_MONSTER))
     if(move_monster(op) || QUERY_FLAG(op, FLAG_FREED))       if(move_monster(op) || QUERY_FLAG(op, FLAG_FREED))
       return 1;        return 1;
Line 1253
 
Line 1257
     return 1;      return 1;
   }    }
   /* GROS: Handle for plugin time event */    /* GROS: Handle for plugin time event */
   if(op->event_hook[EVENT_TIME] != NULL)    if ((evt = find_event(op, EVENT_TIME)) != NULL)
   {    {
     CFParm CFP;      CFParm CFP;
     int k, l, m;      int k, l, m;
Line 1269
 
Line 1273
     CFP.Value[6] = &m;      CFP.Value[6] = &m;
     CFP.Value[7] = &m;      CFP.Value[7] = &m;
     CFP.Value[8] = &l;      CFP.Value[8] = &l;
     CFP.Value[9] = op->event_hook[k];      CFP.Value[9] = evt->hook;
     CFP.Value[10]= op->event_options[k];      CFP.Value[10]= evt->options;
     if (findPlugin(op->event_plugin[k])>=0)      if (findPlugin(evt->plugin)>=0)
         ((PlugList[findPlugin(op->event_plugin[k])].eventfunc) (&CFP));          ((PlugList[findPlugin(evt->plugin)].eventfunc) (&CFP));
   }    }
   switch(op->type) {    switch(op->type) {
   case ROD:    case ROD:


Legend:
line(s) removed in v.1.54 
line(s) changed
 line(s) added in v.1.55

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