49typedef struct evTimes_s {
89 cl.eventsBlocked = block;
97 return cl.eventsBlocked;
118 return eventData->
eventCheck(eventData, event->msg);
141 if (stepList ==
nullptr)
144 stepList = stepList->
next;
248 eventTime = eventData->
timeCallback(eventData, msg, eventTiming);
char * CL_GetConfigString(int index)
void GAME_NotifyEvent(event_t eventType)
Shared game type headers.
le_t * LE_GetNextInUse(le_t *lastLE)
Iterate through the entities that are in use.
bool LE_IsLivingActor(const le_t *le)
Checks whether the given le is a living actor (but might be hidden).
memPool_t * cl_genericPool
Primary header for client.
void Com_DPrintf(int level, const char *fmt,...)
A Com_Printf that only shows up if the "developer" cvar is set.
void Com_Error(int code, const char *fmt,...)
void Com_Printf(const char *const fmt,...)
ScheduleEventPtr Schedule_Event(int when, event_func *func, event_check_func *check, event_clean_func *clean, void *data)
Schedules an event to run on or after the given time, and when its check function returns true.
int CL_FilterEventQueue(event_filter *filter)
Filters every event in the queue using the given function. Keeps all events for which the function re...
SharedPtr< scheduleEvent_t > ScheduleEventPtr
void event_func(int now, void *data)
bool event_check_func(int now, void *data)
const eventRegister_t * CL_GetEvent(const event_t eType)
cvar_t * cl_log_battlescape_events
static void CL_NotifyBattlescapeEventDelay(int now, void *data, int delay)
If we delayed the battlescape events due to event locking (e.g. le is locked or camera is locked),...
void CL_BlockBattlescapeEvents(bool block)
Adds the ability to block battlescape event execution until something other is finished....
static bool CL_AreBattlescapeEventsBlocked(void)
static bool CL_CheckBattlescapeEvent(int now, void *data)
Checks if a given battlescape event is ok to run now. Uses the check_func pointer in the event struct...
static void CL_LogEvent(const eventRegister_t *eventData)
event_t CL_ParseEvent(dbuffer *msg)
Called in case a svc_event was send via the network buffer.
int CL_ClearBattlescapeEvents(void)
static int CL_GetEventTime(const event_t eType, dbuffer *msg, eventTiming_t *eventTiming)
Calculates the time the event should get executed. If two events return the same time,...
static bool CL_FilterBattlescapeEvents(int when, event_func *func, event_check_func *check, void *data)
static void CL_FreeBattlescapeEvent(void *data)
static bool CL_DelayBattlescapeEvent(int now, void *data)
Checks if a given battlescape event should get delayed.
static void CL_ExecuteBattlescapeEvent(int now, void *data)
int FS_Printf(qFILE *f, const char *msg,...)
Can print chunks for 1024 chars into a file.
int FS_OpenFile(const char *filename, qFILE *file, filemode_t mode)
Finds and opens the file in the search path.
#define Mem_PoolAllocType(type, pool)
int NET_ReadByte(dbuffer *buf)
Reads a byte from the netchannel.
event_t
Possible event values.
QGL_EXTERN GLsizei const GLvoid * data
void Com_MakeTimestamp(char *ts, const size_t tslen)
Creates a timestamp with date and time at the specified location.
This is a cvar definition. Cvars can be user modified and used in our menus e.g.
Struct that defines one particular event with all its callbacks and data.
void(* eventCallback)(const struct eventRegister_s *self, dbuffer *msg)
Callback that is executing the event.
bool(* eventCheck)(const struct eventRegister_s *self, const dbuffer *msg)
Called to determine if this event is ok to run at this point. Should check any conflicts with other o...
const char * name
the name of this event (e.g. for logs)
int(* timeCallback)(const struct eventRegister_s *self, dbuffer *msg, eventTiming_t *eventTiming)
Callback that is returning the time that is needed to execute this event.
CL_ParseEvent timers and vars.
event_delay_func * delay
Called when the check failed and we have to delay events in the queue.
event_notify_delay_func * notifyDelay
void * notifyDelayUserData