58 gi.WriteString(sound);
68 gi.QueueWriteString(sound);
80 gi.WriteByte(ent.
dir);
94 gi.WriteByte(attacker);
118 gi.WriteShort(reservedTUs.
shot);
134 gi.WriteByte(containerId);
150 gi.WriteShort(itemAmount);
184 gi.WriteByte(amount);
185 gi.WriteByte(ammo->
idx);
206 gi.WriteByte(shootType);
207 gi.WriteGPos(ent.
pos);
239 gi.WriteByte(firstShoot);
240 gi.WriteShort(fd->
obj->idx);
269 gi.WriteByte(firstShoot ? 1 : 0);
270 gi.WriteShort(fd->
obj->idx);
273 gi.WriteByte(shootType);
278 gi.WriteDir(trace->
plane.normal);
299 gi.QueueWriteByte(tus);
300 gi.QueueWriteByte(step);
307 gi.QueueWriteByte(step);
314 gi.QueueWriteByte(tus);
315 gi.QueueWriteByte(step);
322 gi.QueueWriteByte(step);
337 gi.WriteByte(levelFlags);
386 gi.WriteByte(ent.
TU);
387 gi.WriteShort(ent.
HP);
403 gi.WriteByte(bodyPart);
417 gi.WriteByte(
level.activeTeam);
426 gi.WriteByte(invDef->
id);
443 gi.WriteShort(dt * 1000);
444 gi.WriteShort(fd->
obj->idx);
448 gi.WritePos(position);
449 gi.WritePos(velocity);
518 gi.WriteGPos(ent.
pos);
548 gi.WriteByte(ent.
dir);
567 gi.WriteGPos(ent.
pos);
583 gi.WriteGPos(check.
pos);
584 gi.WriteByte(check.
dir);
598 gi.Error(
"invalid body and/or head model indices");
650 gi.WriteByte(ent.
dir);
657 gi.WriteByte(player.getNum());
658 gi.WriteByte(player.getTeam());
665 gi.WriteByte(teamplay);
672 gi.WriteByte(player.getTeam());
673 gi.WriteByte(activeTeam);
693 gi.WriteString(sound);
701 gi.WriteString(sound);
708 gi.AddEvent(playerMask, eType, entnum);
716 const Edict* ent =
gi.GetEventEdict();
718 gi.WriteGPos(ent->
pos);
void getCenter(vec3_t center) const
Calculates the center of the bounding box.
unsigned int getHead() const
unsigned int getBody() const
camera_edict_data_t camera
Item * getRightHandItem() const
actorSizeEnum_t fieldSize
Item * getLeftHandItem() const
Player & getPlayer() const
actorHands_t getHand() const
const objDef_t * getWeapon() const
item instance data, with linked list capability
const objDef_t * ammoDef(void) const
const objDef_t * def(void) const
int G_ActorCalculateMaxTU(const Edict *ent)
playermask_t G_TeamToPM(int team)
Generates the player bit mask for a given team.
playermask_t G_VisToPM(teammask_t teamMask)
Converts vis mask to player mask.
Interface for g_client.cpp.
Edict * G_EdictsGetByNum(const int num)
Get an entity by it's number.
functions to handle the storage and lifecycle of all edicts in the game module.
void G_EventSendParticle(playermask_t playerMask, const Edict &ent)
void G_EventSendEdict(const Edict &ent)
Send the bounding box info to the client.
void G_EventStartShoot(const Edict &ent, teammask_t teamMask, shoot_types_t shootType, const pos3_t at)
Start the shooting event.
void G_EventReactionFireChange(const Edict &ent)
void G_EventInventoryDelete(const Edict &ent, playermask_t playerMask, const containerIndex_t containerId, int x, int y)
Tell the client to remove the item from the container.
void G_EventEndRoundAnnounce(const Player &player)
void G_EventSpawnFootstepSound(const Edict &ent, const char *sound)
void G_EventDoorOpen(const Edict &door)
void G_EventActorStats(const Edict &ent, playermask_t playerMask)
void G_EventAdd(playermask_t playerMask, int eType, int entnum)
void G_EventActorTurn(const Edict &ent)
Send the turn event for the given entity.
void G_EventDestroyEdict(const Edict &ent)
Unregister an edict at the client.
void G_EventActorAppear(playermask_t playerMask, const Actor &check, const Edict *ent)
void G_EventSetClientAction(const Edict &ent)
Informs the client that an interaction with the world is possible.
void G_EventReactionFireRemoveTarget(const Edict &shooter, const Edict &target, int step)
void G_EventInventoryAmmo(const Edict &ent, const objDef_t *ammo, int amount, shoot_types_t shootType)
Change the amount of available ammo for the given entity.
void G_EventMoveCameraTo(playermask_t playerMask, const pos3_t pos)
Centers the view for all clients that are seeing the given edict on the world position of the edict.
void G_EventActorDie(const Edict &ent, bool attacker)
Announce the actor die event for the clients that are seeing the actor.
void G_EventThrow(teammask_t teamMask, const fireDef_t *fd, float dt, byte flags, const vec3_t position, const vec3_t velocity)
void G_EventEndShoot(const Edict &ent, teammask_t teamMask)
Ends the shooting event.
void G_EventShootHidden(teammask_t teamMask, const fireDef_t *fd, bool firstShoot, const vec3_t impact, int flags, const Edict *targetEdict)
Start the shooting event for hidden actors.
void G_EventAddBrushModel(playermask_t playerMask, const Edict &ent)
void G_EventCenterView(const Edict &ent)
Centers the view for all clients that are seeing the given edict on the world position of the edict.
void G_EventInventoryAdd(const Edict &ent, playermask_t playerMask, int itemAmount)
Tell the client to add the item from the container.
void G_EventStart(const Player &player, bool teamplay)
void G_EventCameraAppear(playermask_t playerMask, const Edict &ent)
Send an appear event to the client.
void G_EventCenterViewAt(playermask_t playerMask, const pos3_t pos)
Centers the view for all clients that are seeing the given edict on the world position of the edict.
void G_EventActorFall(const Edict &ent)
void G_EventEdictPerish(playermask_t playerMask, const Edict &ent)
Send disappear event.
void G_EventSpawnSound(playermask_t playerMask, const Edict &ent, const vec3_t origin, const char *sound)
Spawns a sound (that will be spatialized on the client side).
void G_EventEndRound(void)
End of turn event for the current active team.
void G_EventActorSendReservations(const Edict &ent)
Will inform the player about the real TU reservation.
void G_EventPerish(const Edict &ent)
Send an event to all clients that are seeing the given edict, that it just has disappeared.
void G_EventReset(const Player &player, int activeTeam)
void G_EventSendState(playermask_t playerMask, const Edict &ent)
void G_EventActorRevitalise(const Edict &ent)
Announce the actor revitalize event for the clients that are seeing the actor.
void G_EventDoorClose(const Edict &door)
void G_EventActorWound(const Edict &ent, const int bodyPart)
Send info about an actor's wounds to the client.
void G_EventInventoryReload(const Edict &ent, playermask_t playerMask, const Item *item, const invDef_t *invDef, const Item *ic)
void G_EventReactionFireTargetUpdate(const Edict &shooter, const Edict &target, int tus, int step)
void G_EventResetClientAction(const Edict &ent)
Reset the client actions for the given entity.
void G_EventParticleSpawn(playermask_t playerMask, const char *name, int levelFlags, const vec3_t s, const vec3_t v, const vec3_t a)
Spawn a new particle for the client.
void G_EventActorStateChange(playermask_t playerMask, const Edict &ent)
void G_EventShoot(const Edict &ent, teammask_t teamMask, const fireDef_t *fd, bool firstShoot, shoot_types_t shootType, int flags, const trace_t *trace, const vec3_t from, const vec3_t impact)
Do the shooting.
void G_EventActorAdd(playermask_t playerMask, const Edict &ent, const bool instant)
void G_EventReactionFireAbortShot(const Edict &shooter, const Edict &target, int step)
void G_EventReactionFireAddTarget(const Edict &shooter, const Edict &target, int tus, int step)
void G_EventEdictAppear(playermask_t playerMask, const Edict &ent)
Send an appear event to the client.
void G_EventModelExplode(const Edict &ent, const char *sound)
void G_EventModelExplodeTriggered(const Edict &ent, const char *sound)
#define G_PlayerToPM(player)
unsigned int playermask_t
void G_SendInventory(playermask_t playerMask, const Edict &ent)
Sends whole inventory through the network buffer.
Local definitions for game module.
#define G_IsBreakable(ent)
#define FL_CLIENTACTION
Edict flag to indicate, that the edict can be used in the context of a client action.
#define SKIP_LOCAL_ENTITY
@ EV_ACTOR_REACTIONFIRECHANGE
@ EV_ACTOR_REACTIONFIRETARGETUPDATE
@ EV_ACTOR_REACTIONFIREABORTSHOT
@ EV_MODEL_EXPLODE_TRIGGERED
@ EV_ACTOR_REACTIONFIREADDTARGET
@ EV_ACTOR_RESERVATIONCHANGE
@ EV_ACTOR_REACTIONFIREREMOVETARGET
#define IS_SHOT_RIGHT(x)
Determine whether the selected shoot type is for the item in the right hand, either shooting or react...
int32_t shoot_types_t
Available shoot types - also see the ST_ constants.
QGL_EXTERN int GLboolean GLfloat * v
QGL_EXTERN GLuint GLsizei GLsizei GLint GLenum GLchar * name
chrReservations_t reservedTus
const teamDef_t * teamDef
How many TUs (and of what type) did a player reserve for a unit?
int skills[SKILL_NUM_TYPES]
this is a fire definition for our weapons/ammo
const struct objDef_s * obj
weaponFireDefIndex_t weapFdsIdx
inventory definition for our menus
Defines all attributes of objects used in the inventory.
int woundLevel[BODYPART_MAXTYPE]
int treatmentLevel[BODYPART_MAXTYPE]
#define VectorAdd(a, b, dest)