UFO: Alien Invasion
|
#include "../../../../client.h"
#include "../../../cl_localentity.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, dbuffer *msg, eventTiming_t *eventTiming) |
Decides if following events should be delayed. If the projectile has a speed value assigned, the delay is relative to the distance the projectile flies. There are other fire definition related options that might delay the execution of further events. More... | |
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. More... | |
void | CL_ActorDoShoot (const eventRegister_t *self, dbuffer *msg) |
Shoot with weapon. More... | |
void CL_ActorDoShoot | ( | const eventRegister_t * | self, |
dbuffer * | msg | ||
) |
Shoot with weapon.
Definition at line 140 of file e_event_actorshoot.cpp.
References le_s::as, CL_ActorGetMuzzle(), Com_DPrintf(), Com_Error(), DEBUG_CLIENT, ERR_DROP, ET_ACTORHIDDEN, fireDef_s::fireAttenuation, FIRESH_GetFiredef(), fireDef_s::fireSound, 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_IsSelected, LE_NotFoundError, le_s::left, le_s::model1, NET_ReadFormat(), R_AnimAppend(), R_AnimChange(), RDF_IRGOGGLES, refdef, rendererData_t::rendererFlags, RF_IRGOGGLESSHOT, le_s::right, S_LoadAndPlaySample(), 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, |
dbuffer * | msg, | ||
eventTiming_t * | eventTiming | ||
) |
Decides if following events should be delayed. If the projectile has a speed value assigned, the delay is relative to the distance the projectile flies. There are other fire definition related options that might delay the execution of further events.
Definition at line 36 of file e_event_actorshoot.cpp.
References CL_GetNextTime(), CL_OutsideMap(), cls, fireDef_s::delayBetweenShots, FIRESH_GetFiredef(), eventTiming_s::impactTime, INVSH_GetItemByIDX(), client_static_s::isOurRound(), NET_ReadFormat(), eventTiming_s::nextTime, eventTiming_s::parsedDeath, SF_BOUNCED, eventTiming_s::shootTime, fireDef_s::speed, UNIT_SIZE, and VectorDist.
|
static |
Calculates the muzzle for the current weapon the actor is shooting with.
[in] | actor | The actor that is shooting. Might not be nullptr |
[out] | muzzle | The muzzle vector to spawn the particle at. Might not be nullptr . 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 88 of file e_event_actorshoot.cpp.
References le_s::angles, le_s::as, cls, Com_Error(), Item::def(), ERR_DROP, animState_s::frame, le_s::getLeftHandItem(), le_s::getRightHandItem(), GLMatrixAssemble(), GLMatrixMultiply(), objDef_s::id, objDef_s::idx, IS_SHOT_RIGHT, le_s::model1, client_static_s::modelPool, model_s::name, le_s::origin, R_GetTagIndexByName(), and R_GetTagMatrix().
Referenced by CL_ActorDoShoot().