#include "../../../../client.h"
#include "../../../cl_localentity.h"
#include "../../../cl_actor.h"
#include "../../../cl_particle.h"
#include "../../../../renderer/r_mesh.h"
#include "../../../../renderer/r_mesh_anim.h"
#include "e_event_actorshoot.h"
Go to the source code of this file.
Functions | |
int | CL_ActorDoShootTime (const eventRegister_t *self, struct dbuffer *msg, const int dt) |
static void | CL_ActorGetMuzzle (const le_t *actor, vec3_t muzzle, shoot_types_t shootType) |
Calculates the muzzle for the current weapon the actor is shooting with. | |
void | CL_ActorDoShoot (const eventRegister_t *self, struct dbuffer *msg) |
Shoot with weapon. |
Definition in file e_event_actorshoot.c.
void CL_ActorDoShoot | ( | const eventRegister_t * | self, | |
struct dbuffer * | msg | |||
) |
Shoot with weapon.
Definition at line 150 of file e_event_actorshoot.c.
References le_s::as, CL_ActorGetMuzzle(), Com_DPrintf(), Com_Error(), DEBUG_CLIENT, ERR_DROP, ET_ACTORHIDDEN, fireDef_s::fireAttenuation, FIRESH_GetFiredef(), fireDef_s::fireSound, model_s::flags, INVSH_GetItemByIDX(), fireDef_s::irgoggles, IS_SHOT_HEADGEAR, IS_SHOT_LEFT, IS_SHOT_RIGHT, LE_AddProjectile(), LE_Get(), LE_GetAnim(), LE_IsActor(), LE_IsDead, LE_NotFoundError, le_s::left, le_s::model1, NET_ReadFormat(), R_AnimAppend(), R_AnimChange(), RDF_IRGOGGLES, refdef, rendererData_t::rendererFlags, le_s::right, S_LoadSample(), S_PlaySample(), SF_BOUNCED, SKIP_LOCAL_ENTITY, SND_VOLUME_WEAPONS, fireDef_s::soundOnce, le_s::state, and le_s::type.
int CL_ActorDoShootTime | ( | const eventRegister_t * | self, | |
struct dbuffer * | msg, | |||
const int | dt | |||
) |
Definition at line 33 of file e_event_actorshoot.c.
References cl, CL_OutsideMap(), cls, fireDef_s::delayBetweenShots, FIRESH_GetFiredef(), impactTime, INVSH_GetItemByIDX(), NET_ReadFormat(), nextTime, SF_BOUNCED, shootTime, fireDef_s::speed, client_static_s::team, UNIT_SIZE, and VectorDist.
static void CL_ActorGetMuzzle | ( | const le_t * | actor, | |
vec3_t | muzzle, | |||
shoot_types_t | shootType | |||
) | [static] |
Calculates the muzzle for the current weapon the actor is shooting with.
[in] | actor | The actor that is shooting. Might not be NULL |
[out] | muzzle | The muzzle vector to spawn the particle at. Might not be NULL . This is not modified if there is no tag for the muzzle found for the weapon or item the actor has in the hand (also see the given shoot type) |
[in] | shootType | The shoot type to determine which tag of the actor should be used to resolve the world coordinates. Also used to determine which item (or better which hand) should be used to resolve the actor's item. |
Definition at line 90 of file e_event_actorshoot.c.
References le_s::angles, cls, Com_Error(), ERR_DROP, GLMatrixAssemble(), GLMatrixMultiply(), objDef_s::id, objDef_s::idx, IS_SHOT_RIGHT, invList_s::item, LEFT, le_s::model1, client_static_s::modelPool, model_s::name, le_s::origin, R_GetTagMatrix(), RIGHT, and item_s::t.
Referenced by CL_ActorDoShoot().