 |
Crossfire Server, Trunk
1.75.0
|
#define TIMER_ERR_OBJ
NULL object, or no EVENT_TIMER handler.
#define TIMER_MODE_SECONDS
Timer is in seconds.
object * object_find_by_type_subtype(const object *who, int type, int subtype)
Find object in inventory.
#define MAX_TIMERS
Maximum number of timers.
@ EVENT_CONNECTOR
Lauwenmark: an invisible object holding a plugin event hook.
int cftimer_find_free_id(void)
Finds a free ID for a new timer.
void cftimer_init(void)
Initialize timers.
long delay
Either server ticks before trigger, or trigger time.
tag_t count
Unique object number for this object.
cftimer timers_table[MAX_TIMERS]
The actual timers.
object * object_find_by_tag_global(tag_t i)
Returns the object which has the count-variable equal to the argument.
int events_execute_object_event(object *op, int eventcode, object *activator, object *third, const char *message, int fix)
Execute an event on the specified object.
#define TIMER_MODE_CYCLES
Timer is in server cycles.
#define TIMER_ERR_ID
Invalid timer id.
#define TIMER_ERR_NONE
No error.
int cftimer_create(int id, long delay, object *ob, int mode)
Creates a new timer.
void cftimer_process_timers(void)
Processes all timers.
tag_t ob_tag
Object associated to the timer.
#define TIMER_ERR_MODE
Invalid timer mode.
uint32_t tag_t
Object tag, unique during the whole game.
long seconds(void)
Return wall clock time in seconds.
#define TIMER_MODE_DEAD
Used to mark a timer as unused in the list.
#define EVENT_TIMER
Timer connected triggered it.
int cftimer_destroy(int id)
Destroys an existing timer.
static void cftimer_process_event(tag_t ob_tag)
Triggers the EVENT_TIMER of the given object.