Difference for server/timers.c from version 1.8 to 1.9


version 1.8 version 1.9
Line 3
 
Line 3
 #include <sproto.h>  #include <sproto.h>
 #endif  #endif
   
 static void cftimer_process_event(object* ob);  static void cftimer_process_event(tag_t ob_tag);
   
 /*****************************************************************************/  /*****************************************************************************/
 /* Processes all timers.                                                     */  /* Processes all timers.                                                     */
Line 20
 
Line 20
             {              {
             /* Call object timer event */              /* Call object timer event */
                 timers_table[i].mode = TIMER_MODE_DEAD;                  timers_table[i].mode = TIMER_MODE_DEAD;
                 cftimer_process_event(timers_table[i].ob);                  cftimer_process_event(timers_table[i].ob_tag);
             }              }
         }          }
         else if (timers_table[i].mode == TIMER_MODE_SECONDS)          else if (timers_table[i].mode == TIMER_MODE_SECONDS)
Line 29
 
Line 29
             {              {
             /* Call object timer event */              /* Call object timer event */
                 timers_table[i].mode = TIMER_MODE_DEAD;                  timers_table[i].mode = TIMER_MODE_DEAD;
                 cftimer_process_event(timers_table[i].ob);                  cftimer_process_event(timers_table[i].ob_tag);
             }              }
         }          }
     }      }
Line 38
 
Line 38
 /*****************************************************************************/  /*****************************************************************************/
 /* Triggers the EVENT_TIMER of the given object                              */  /* Triggers the EVENT_TIMER of the given object                              */
 /*****************************************************************************/  /*****************************************************************************/
 static void cftimer_process_event(object* ob)  static void cftimer_process_event(tag_t ob_tag)
 {  {
       object* ob = find_object(ob_tag);
       if ( ob )
     execute_event(ob, EVENT_TIMER,NULL,NULL,NULL,SCRIPT_FIX_ALL);      execute_event(ob, EVENT_TIMER,NULL,NULL,NULL,SCRIPT_FIX_ALL);
 }  }
   
Line 68
 
Line 70
         return TIMER_ERR_MODE;          return TIMER_ERR_MODE;
     if (ob == NULL)      if (ob == NULL)
         return TIMER_ERR_OBJ;          return TIMER_ERR_OBJ;
     if (find_event(ob, EVENT_TIMER) == NULL)      if (find_obj_by_type_subtype(ob, EVENT_CONNECTOR, EVENT_TIMER) == NULL)
         return TIMER_ERR_OBJ;          return TIMER_ERR_OBJ;
     timers_table[id].mode = mode;      timers_table[id].mode = mode;
     timers_table[id].ob   = ob;      timers_table[id].ob_tag = ob->count;
     if (mode == TIMER_MODE_CYCLES)      if (mode == TIMER_MODE_CYCLES)
         timers_table[id].delay = delay;          timers_table[id].delay = delay;
     else      else
Line 115
 
Line 117
     return TIMER_ERR_ID;      return TIMER_ERR_ID;
 }  }
   
   void cftimer_init()
   {
       memset(&timers_table[0], 0, sizeof(cftimer) * MAX_TIMERS);
   }


Legend:
line(s) removed in v.1.8 
line(s) changed
 line(s) added in v.1.9

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