25 #include "../../client.h"
26 #include "../cl_localentity.h"
93 #define E(x) x, STRINGIFY(x)
94 {
E(
EV_NULL),
"",
nullptr,
nullptr,
nullptr},
160 if (events[
i].
type == eType)
189 if (step > list->
steps) {
194 for (
int i = 0;
i < list->
steps;
i++) {
205 if (nextTime < eventTiming->nextTime) {
222 const size_t length = strlen(sound) - 1;
223 if (sound[length] !=
'+')
231 for (i = 0; i < 99; i++)
237 Q_strcat(sound, size,
"%02i", rand() % i + 1);
void CL_EndRoundAnnounce(const eventRegister_t *self, dbuffer *msg)
Announces that a player ends his turn.
void CL_ActorReactionFireAddTarget(const eventRegister_t *self, dbuffer *msg)
Network event function for reaction fire target handling. Responsible for updating the HUD with the i...
void CL_ActorRevitalised(const eventRegister_t *self, dbuffer *msg)
Revitalizes a stunned actor (all that is needed is the local entity state set).
void CL_AddEdict(const eventRegister_t *self, dbuffer *msg)
Adds server side edicts to the client for displaying them.
int FS_CheckFile(const char *fmt,...)
Just returns the filelength and -1 if the file wasn't found.
void CL_ActorDoMove(const eventRegister_t *self, dbuffer *msg)
Moves actor.
void CL_Reset(const eventRegister_t *self, dbuffer *msg)
QGL_EXTERN GLint GLenum type
void CL_ActorDoThrow(const eventRegister_t *self, dbuffer *msg)
Throw item with actor.
int CL_ParticleAppearTime(const struct eventRegister_s *self, dbuffer *msg, eventTiming_t *eventTiming)
int CL_InvAddTime(const struct eventRegister_s *self, dbuffer *msg, eventTiming_t *eventTiming)
Decides if following events should be delayed.
void CL_ParseResults(const eventRegister_t *self, dbuffer *msg)
Reads mission result data from server.
void CL_ActorReactionFireChange(const eventRegister_t *self, dbuffer *msg)
Network event function for reaction fire mode changes. Responsible for updating the HUD with the info...
void CL_ParticleAppear(const eventRegister_t *self, dbuffer *msg)
Let a particle appear for the client.
void CL_ActorDoTurn(const eventRegister_t *self, dbuffer *msg)
Turns actor.
void CL_InvDel(const eventRegister_t *self, dbuffer *msg)
void CL_ActorDie(const eventRegister_t *self, dbuffer *msg)
Kills an actor (all that is needed is the local entity state set to STATE_DEAD).
void CL_ActorWound(const eventRegister_t *self, dbuffer *msg)
Parses the actor wound stats that come from the netchannel.
int CL_ActorShootHiddenTime(const eventRegister_t *self, dbuffer *msg, eventTiming_t *eventTiming)
Decides if following events should be delayed.
int CL_GetNextTime(const eventRegister_t *event, eventTiming_t *eventTiming, int nextTime)
void CL_ActorStats(const eventRegister_t *self, dbuffer *msg)
Parses the actor stats that comes from the netchannel.
bool LE_IsLocked(int entnum)
Checks if a given le_t structure is locked, i.e., used by another event at this time.
void CL_InvReload(const eventRegister_t *self, dbuffer *msg)
void CL_DoorOpen(const eventRegister_t *self, dbuffer *msg)
Callback for EV_DOOR_OPEN event - rotates the inline model and recalc routing.
int CL_ActorReactionFireRemoveTargetTime(const eventRegister_t *self, dbuffer *msg, eventTiming_t *eventTiming)
int NET_PeekShort(const dbuffer *buf)
Peeks into a buffer without changing it to get a short int.
void CL_ActorAppear(const eventRegister_t *self, dbuffer *msg)
void CL_ActorShootHidden(const eventRegister_t *self, dbuffer *msg)
Shoot with weapon but don't bother with animations - actor is hidden.
void CL_ActorDoShoot(const eventRegister_t *self, dbuffer *msg)
Shoot with weapon.
void Com_Printf(const char *const fmt,...)
int CL_EntAppearTime(const struct eventRegister_s *self, dbuffer *msg, eventTiming_t *eventTiming)
static bool CL_CheckDefault(const eventRegister_t *self, const dbuffer *msg)
A default check function that assumes the entnum is the first short in msg.
int CL_ExplodeTime(const struct eventRegister_s *self, dbuffer *msg, eventTiming_t *eventTiming)
Decides when the explode event should get executed. This in the impact time.
void CL_ActorReservationChange(const eventRegister_t *self, dbuffer *msg)
Network event function for TU reservation. Responsible for updating the HUD with the information that...
void CL_InvAdd(const eventRegister_t *self, dbuffer *msg)
int CL_ParseResultsTime(const struct eventRegister_s *self, dbuffer *msg, eventTiming_t *eventTiming)
CL_ParseEvent timers and vars.
void CL_ActorAdd(const eventRegister_t *self, dbuffer *msg)
Adds an hidden actor to the list of le's.
void Com_Error(int code, const char *fmt,...)
int CL_ActorDoMoveTime(const eventRegister_t *self, dbuffer *msg, eventTiming_t *eventTiming)
Decides if following events should be delayed. The delay is the amount of time the actor needs to wal...
int CL_ActorStartShootTime(const eventRegister_t *self, dbuffer *msg, eventTiming_t *eventTiming)
Decides if following events should be delayed.
void CL_ParticleSpawnEvent(const eventRegister_t *self, dbuffer *msg)
Let a particle spawn for the client.
const char * CL_ConvertSoundFromEvent(char *sound, size_t size)
Some sound strings may end on a '+' to indicate to use a random sound which can be identified by repl...
QGL_EXTERN GLuint GLsizei GLsizei * length
void CL_ActorReactionFireTargetUpdate(const eventRegister_t *self, dbuffer *msg)
Network event function for reaction fire target handling. Responsible for updating the HUD with the i...
int CL_ParticleSpawnEventTime(const struct eventRegister_s *self, dbuffer *msg, eventTiming_t *eventTiming)
void CL_InvAmmo(const eventRegister_t *self, dbuffer *msg)
const eventRegister_t * CL_GetEvent(const event_t eType)
event_t
Possible event values.
void CL_AddBrushModel(const eventRegister_t *self, dbuffer *msg)
Register local entities for SOLID_BSP models like func_breakable or func_door.
void CL_ActorStateChange(const eventRegister_t *self, dbuffer *msg)
int CL_ActorReactionFireAbortShotTime(const eventRegister_t *self, dbuffer *msg, eventTiming_t *eventTiming)
int CL_ActorAppearTime(const eventRegister_t *self, dbuffer *msg, eventTiming_t *eventTiming)
Decides if following events should be delayed.
void Com_DPrintf(int level, const char *fmt,...)
A Com_Printf that only shows up if the "developer" cvar is set.
void CL_CenterView(const eventRegister_t *self, dbuffer *msg)
Struct that defines one particular event with all its callbacks and data.
int CL_GetStepTime(const eventTiming_t *eventTiming, const le_t *le, int step)
Calculates the time when the given step was executed in the event chain.
void CL_DoorClose(const eventRegister_t *self, dbuffer *msg)
Callback for EV_DOOR_CLOSE event - rotates the inline model and recalc routing.
int CL_ActorDoShootTime(const eventRegister_t *self, dbuffer *msg, eventTiming_t *eventTiming)
Decides if following events should be delayed. If the projectile has a speed value assigned...
CASSERT(lengthof(events)==EV_NUM_EVENTS)
void CL_ActorReactionFireRemoveTarget(const eventRegister_t *self, dbuffer *msg)
Network event function for reaction fire target handling. Responsible for updating the HUD with the i...
void CL_CameraAppear(const eventRegister_t *self, dbuffer *msg)
Adds a camera edicts to the client for displaying them.
int CL_ActorEndShootTime(const eventRegister_t *self, dbuffer *msg, eventTiming_t *eventTiming)
Decides if following events should be delayed.
int CL_ActorReactionFireAddTargetTime(const eventRegister_t *self, dbuffer *msg, eventTiming_t *eventTiming)
void CL_ActorStartShoot(const eventRegister_t *self, dbuffer *msg)
Starts shooting with actor.
void CL_Explode(const eventRegister_t *self, dbuffer *msg)
const eventRegister_t events[]
List of functions to register nodes.
int CL_ActorDoThrowTime(const eventRegister_t *self, dbuffer *msg, eventTiming_t *eventTiming)
Decides if following events should be delayed.
void CL_ActorResetClientAction(const eventRegister_t *self, dbuffer *msg)
When no trigger is touched, the client actions are reset.
const char * name
the name of this event (e.g. for logs)
int CL_ActorDieTime(const struct eventRegister_s *self, dbuffer *msg, eventTiming_t *eventTiming)
Some events will be delayed if they are executed in the context of a dying actor. That's why we set t...
void CL_EntAppear(const eventRegister_t *self, dbuffer *msg)
Let an entity appear - like an item on the ground that just got visible.
void CL_ActorClientAction(const eventRegister_t *self, dbuffer *msg)
Reads the entity number for client interaction.
void Q_strcat(char *dest, size_t destsize, const char *format,...)
Safely (without overflowing the destination buffer) concatenates two strings.
int CL_InvDelTime(const struct eventRegister_s *self, dbuffer *msg, eventTiming_t *eventTiming)
Decides if following events should be delayed.
void CL_EntPerish(const eventRegister_t *self, dbuffer *msg)
Called whenever an entity disappears from view.
void CL_EntDestroy(const eventRegister_t *self, dbuffer *msg)
Called whenever an entity is destroyed in the server.
int CL_ActorReactionFireTargetUpdateTime(const eventRegister_t *self, dbuffer *msg, eventTiming_t *eventTiming)
void CL_ActorReactionFireAbortShot(const eventRegister_t *self, dbuffer *msg)
Network event function for reaction fire target handling. Responsible for updating the HUD with the i...
int CL_SoundEventTime(const struct eventRegister_s *self, dbuffer *msg, eventTiming_t *eventTiming)
void CL_DoEndRound(const eventRegister_t *self, dbuffer *msg)
Performs end-of-turn processing.
void CL_MoveView(const eventRegister_t *self, dbuffer *msg)
void CL_SoundEvent(const eventRegister_t *self, dbuffer *msg)
Play a sound on the client side.
void CL_ActorEndShoot(const eventRegister_t *self, dbuffer *msg)
Ends shooting with actor.
int CL_InvReloadTime(const eventRegister_t *self, dbuffer *msg, eventTiming_t *eventTiming)
void CL_StartGame(const eventRegister_t *self, dbuffer *msg)
Activates the map render screen (ca_active)