UFO: Alien Invasion
|
Actor related routines. More...
#include "../client.h"
#include "cl_actor.h"
#include "../cgame/cl_game.h"
#include "cl_hud.h"
#include "cl_parse.h"
#include "cl_particle.h"
#include "cl_view.h"
#include "../cl_screen.h"
#include "../ui/ui_main.h"
#include "../ui/ui_popup.h"
#include "../ui/node/ui_node_container.h"
#include "../renderer/r_entity.h"
#include "../renderer/r_mesh.h"
#include "../../common/routing.h"
#include "../../common/grid.h"
Go to the source code of this file.
Macros | |
#define | GRENADE_PARTITIONS 20 |
#define | BoxOffset(aSize, target) (target[0]=(aSize-1)*(UNIT_SIZE+BOX_DELTA_WIDTH), target[1]=(aSize-1)*(UNIT_SIZE+BOX_DELTA_LENGTH), target[2]=0) |
Functions | |
void | MSG_Write_PA (player_action_t playerAction, int entnum,...) |
Writes player action with its data. More... | |
void | CL_ActorSetFireDef (le_t *actor, const fireDef_t *fd) |
int | CL_ActorMoveMode (const le_t *le) |
Decide how the actor will walk, taking into account autostanding. More... | |
int | CL_ActorGetNumber (const le_t *le) |
Returns the number of the actor in the teamlist. More... | |
le_t * | CL_ActorGetFromCharacter (const character_t *chr) |
Returns the local entity information for a character in the team list. More... | |
character_t * | CL_ActorGetChr (const le_t *le) |
Returns the character information for an actor in the teamlist. More... | |
const fireDef_t * | CL_ActorGetReactionFireFireDef (const le_t *shooter) |
bool | CL_ActorIsReactionFireOutOfRange (const le_t *shooter, const le_t *target) |
int | CL_ActorReservedTUs (const le_t *le, const reservation_types_t type) |
Returns the amount of reserved TUs for a certain type. More... | |
int | CL_ActorUsableTUs (const le_t *le) |
Returns the amount of usable (overall-reserved) TUs for an actor. More... | |
void | CL_ActorReserveTUs (const le_t *le, const reservation_types_t type, const int tus) |
Replace the reserved TUs for a certain type. More... | |
float | CL_ActorInjuryModifier (const le_t *le, const modifier_types_t type) |
Returns the actor injury modifier of the specified type. More... | |
int | CL_ActorTimeForFireDef (const le_t *le, const fireDef_t *fd, bool reaction) |
Find the TUs needed for the given fireDef taking into account the actor wound penalties. More... | |
void | CL_ActorAddToTeamList (le_t *le) |
Adds the actor to the team list. More... | |
void | CL_ActorCleanup (le_t *le) |
void | CL_ActorRemoveFromTeamList (le_t *le) |
Removes an actor (from your team) from the team list. More... | |
bool | CL_ActorSelect (le_t *le) |
Selects an actor. More... | |
bool | CL_ActorSelectList (int num) |
Selects an actor from a list. More... | |
bool | CL_ActorSelectNext (void) |
selects the next actor More... | |
bool | CL_ActorSelectPrev (void) |
selects the previous actor More... | |
static void | CL_BuildForbiddenList (void) |
Builds a list of locations that cannot be moved to (client side). More... | |
void | CL_ActorConditionalMoveCalc (le_t *le) |
Recalculate forbidden list, available moves and actor's move length for the current selected actor. More... | |
le_t * | CL_ActorGetClosest (const vec3_t origin, int team) |
Returns the actor that is closest to the given origin. More... | |
int | CL_ActorCheckAction (const le_t *le) |
Checks that an action is valid. More... | |
static byte | CL_ActorMoveLength (const le_t *le, const pos3_t to) |
Get the real move length (depends on crouch-state of the current actor). More... | |
void | CL_ActorResetMoveLength (le_t *le) |
Recalculates the currently selected Actor's move length. More... | |
static bool | CL_ActorTraceMove (const pos3_t to) |
Draws the way to walk when confirm actions is activated. More... | |
static void | CL_ActorMaximumMove (const pos3_t to, const le_t *le, pos3_t pos) |
Return the last position we can walk to with a defined amount of TUs. More... | |
void | CL_ActorSetMode (le_t *actor, actorModes_t actorMode) |
void | CL_ActorStartMove (le_t *le, const pos3_t to) |
Starts moving actor. More... | |
void | CL_ActorShoot (const le_t *le, const pos3_t at) |
Shoot with actor. More... | |
int | CL_ActorGetContainerForReload (Item **ammoItem, const Inventory *inv, const objDef_t *weapon) |
Searches the clip with the least TU usage to put it into the weapon. More... | |
void | CL_ActorReload (le_t *le, containerIndex_t containerID) |
Reload weapon with actor. More... | |
void | CL_ActorInvMove (const le_t *le, containerIndex_t fromContainer, int fromX, int fromY, containerIndex_t toContainer, int toX, int toY) |
Sends an inventory move event to the server. More... | |
static void | CL_ActorUse (const le_t *le) |
Uses the current selected entity in the battlescape. Can e.g. open the selected door. More... | |
static void | CL_ActorUse_f (void) |
Hud callback to use the current selected entity. More... | |
bool | CL_ActorFireModeActivated (const actorModes_t mode) |
Checks whether we are in fire mode or node. More... | |
void | CL_ActorTurnMouse (void) |
Turns the actor around without moving. More... | |
static void | CL_ActorStandCrouch_f (void) |
Stands or crouches actor. More... | |
static void | CL_ActorUseHeadgear_f (void) |
Toggles the headgear for the current selected player. More... | |
static void | CL_ActorMoveMouse (void) |
handle select or action clicking in either move mode More... | |
void | CL_ActorSelectMouse (void) |
Selects an actor using the mouse. More... | |
void | CL_ActorActionMouse (void) |
initiates action with mouse. More... | |
void | CL_GetWorldCoordsUnderMouse (vec3_t groundIntersection, vec3_t upperTracePoint, vec3_t lowerTracePoint) |
Get battlescape cell position under mouse cursor. More... | |
bool | CL_ActorMouseTrace (void) |
Battlescape cursor positioning. More... | |
void | CL_InitBattlescapeMouseDragging (void) |
Scroll battlescape touchscreen-style, by clicking and dragging away. More... | |
void | CL_BattlescapeMouseDragging (void) |
Scroll battlescape touchscreen-style, by clicking and dragging away. More... | |
static bool | CL_AddActorWeapon (int objID) |
Checks whether a weapon should be added to the entity's hand. More... | |
bool | CL_AddActor (le_t *le, entity_t *ent) |
Adds an actor to the render entities with all it's models and items. More... | |
static void | CL_TargetingRadius (const vec3_t center, const float radius) |
Show weapon radius. More... | |
static void | CL_TargetingStraight (const pos3_t fromPos, actorSizeEnum_t fromActorSize, const pos3_t toPos) |
Draws line to target. More... | |
static void | CL_TargetingGrenade (const pos3_t fromPos, actorSizeEnum_t fromActorSize, const pos3_t toPos) |
Shows targeting for a grenade. More... | |
static void | CL_AddTargetingBox (pos3_t pos, bool pendBox) |
create a targeting box at the given position More... | |
void | CL_ActorTargetAlign_f (void) |
Targets to the ground when holding the assigned button. More... | |
void | CL_AddTargeting (void) |
Adds a target cursor when we render the world. More... | |
static bool | CL_AddPathingBox (pos3_t pos, bool addUnreachableCells) |
create a targeting box at the given position More... | |
void | CL_AddPathing (void) |
Adds a pathing marker to the current floor when we render the world. More... | |
void | CL_AddActorPathing (void) |
Adds an actor pathing marker to the current floor when we render the world. More... | |
void | CL_ActorPlaySound (const le_t *le, actorSound_t soundType) |
Plays various sounds on actor action. More... | |
static void | CL_AddArrow (vec3_t from, vec3_t to, float red, float green, float blue) |
create an arrow between from and to with the specified color ratios More... | |
void | CL_DisplayFloorArrows (void) |
Useful for debugging pathfinding. More... | |
void | CL_DisplayObstructionArrows (void) |
Useful for debugging pathfinding. More... | |
static void | CL_ActorNext_f (void) |
Switch to the next living soldier. More... | |
static void | CL_ActorPrev_f (void) |
Switch to the previous living soldier. More... | |
static void | CL_ActorSelect_f (void) |
Selects a soldier while we are on battlescape. More... | |
static void | CL_ActorUpdate_f (void) |
Update the skin of the current soldier. More... | |
static bool | CL_ActorVis (const le_t *le, const le_t *check) |
static void | CL_NextAlienVisibleFromActor_f (void) |
Cycles between visible (to selected actor) aliens. More... | |
static void | CL_NextAlien_f (void) |
Cycles between visible aliens. More... | |
static void | CL_PrevAlien_f (void) |
Cycles between visible aliens in reverse direction. More... | |
static void | CL_ActorConfirmAction (le_t *le) |
static void | CL_ActorConfirmAction_f (void) |
Executes "pending" actions such as walking and firing. More... | |
void | ACTOR_InitStartup (void) |
Variables | |
static cvar_t * | confirm_actions |
Confirm actions in tactical mode - valid values are 0, 1 and 2. More... | |
static cvar_t * | cl_autostand |
Player preference: should the server make guys stand for long walks, to save TU. More... | |
static cvar_t * | cl_showactors |
le_t * | selActor |
pos3_t | truePos |
pos3_t | mousePos |
static vec3_t | mouseDraggingPos |
static int | mousePosTargettingAlign = 0 |
If you want to change the z level of targeting and shooting, use this value. Negative and positive offsets are possible. More... | |
static le_t * | mouseActor |
static le_t * | interactEntity |
static pos3_t | mouseLastPos |
static forbiddenList_t | forbiddenList |
A list of locations that cannot be moved to. More... | |
static const vec3_t | halfBoxSize = { BOX_DELTA_WIDTH, BOX_DELTA_LENGTH, BOX_DELTA_HEIGHT } |
field marker box More... | |
static const vec3_t | boxShift = { PLAYER_WIDTH, PLAYER_WIDTH, UNIT_HEIGHT / 2 - DIST_EPSILON } |
Actor related routines.
Definition in file cl_actor.cpp.
#define BoxOffset | ( | aSize, | |
target | |||
) | (target[0]=(aSize-1)*(UNIT_SIZE+BOX_DELTA_WIDTH), target[1]=(aSize-1)*(UNIT_SIZE+BOX_DELTA_LENGTH), target[2]=0) |
Definition at line 1826 of file cl_actor.cpp.
#define GRENADE_PARTITIONS 20 |
Definition at line 1729 of file cl_actor.cpp.
Referenced by CL_TargetingGrenade().
Definition at line 2522 of file cl_actor.cpp.
References CL_ActorConfirmAction_f(), CL_ActorNext_f(), CL_ActorPrev_f(), CL_ActorSelect_f(), CL_ActorStandCrouch_f(), CL_ActorUpdate_f(), CL_ActorUse_f(), CL_ActorUseHeadgear_f(), CL_NextAlien_f(), CL_NextAlienVisibleFromActor_f(), CL_PrevAlien_f(), Cmd_AddCommand(), CVAR_ARCHIVE, Cvar_Get(), CVAR_USERINFO, and N_.
Referenced by CL_InitLocal().
initiates action with mouse.
Definition at line 1266 of file cl_actor.cpp.
References le_s::actorMode, CL_ActorFireModeActivated(), CL_ActorSetMode(), IN_GetMouseSpace, M_MOVE, and MS_WORLD.
Referenced by CL_ActionUp_f(), and CL_ActorTurnMouse().
Adds the actor to the team list.
le | Pointer to local entity struct |
Definition at line 362 of file cl_actor.cpp.
References cl, CL_ActorGetNumber(), CL_ActorSelectList(), cls, Com_Printf(), LE_IsDead, lengthof, clientBattleScape_s::numTeamList, clientBattleScape_s::pnum, le_s::pnum, client_static_s::team, le_s::team, clientBattleScape_s::teamList, and UI_ExecuteConfunc().
Referenced by CL_ActorAppear(), and CL_ActorRevitalised().
Checks that an action is valid.
[in] | le | Pointer to actor for which we check an action. |
Definition at line 713 of file cl_actor.cpp.
References _, cls, HUD_DisplayMessage(), le_s::isMoving(), and client_static_s::isOurRound().
Referenced by CL_ActorReload(), CL_ActorShoot(), CL_ActorStandCrouch_f(), CL_ActorStartMove(), CL_ActorTurnMouse(), CL_ActorUse(), CL_ActorUse_f(), CL_ActorUseHeadgear_f(), HUD_ToggleCrouchReservation_f(), and HUD_ToggleReaction_f().
Definition at line 389 of file cl_actor.cpp.
References cls, InventoryInterface::destroyInventory(), client_static_s::i, and le_s::inv.
Referenced by CL_ActorRemoveFromTeamList(), and LE_Cleanup().
Recalculate forbidden list, available moves and actor's move length for the current selected actor.
Definition at line 682 of file cl_actor.cpp.
References cl, CL_ActorResetMoveLength(), CL_BuildForbiddenList(), le_s::fieldSize, Grid_CalcPathing(), LE_IsSelected, clientBattleScape_s::mapData, MAX_ROUTE_TUS, clientBattleScape_s::pathMap, le_s::pos, and mapData_s::routing.
Referenced by CL_ActorAppear(), CL_ActorDie(), CL_ActorRevitalised(), CL_ActorSelect(), CL_ActorStateChange(), CL_DoEndRound(), CL_RecalcRouting(), and LE_DoEndPathMove().
Performs pending actions for the given actor
le | The actor that should perform the pending actions |
Definition at line 2476 of file cl_actor.cpp.
References le_s::actorMode, clientBattleScape_s::actTeam, cl, CL_ActorShoot(), CL_ActorStartMove(), M_PEND_FIRE_L, M_PEND_FIRE_R, M_PEND_MOVE, le_s::mousePendPos, clientBattleScape_s::pnum, le_s::pnum, and le_s::team.
Referenced by CL_ActorConfirmAction_f().
Executes "pending" actions such as walking and firing.
Definition at line 2504 of file cl_actor.cpp.
References cl, CL_ActorConfirmAction(), cls, LE_GetNextInUse(), LE_IsLivingActor(), LE_IsStunned, client_static_s::team, le_s::team, and clientBattleScape_s::time.
Referenced by ACTOR_InitStartup().
bool CL_ActorFireModeActivated | ( | const actorModes_t | mode | ) |
Checks whether we are in fire mode or node.
mode | The actor mode |
true
if we are in fire mode, false
otherwise Definition at line 1066 of file cl_actor.cpp.
References IS_MODE_FIRE_HEADGEAR, IS_MODE_FIRE_LEFT, and IS_MODE_FIRE_RIGHT.
Referenced by CL_ActorActionMouse(), CL_ActorTargetAlign_f(), CL_ActorTurnMouse(), HUD_UpdateActor(), and UI_KeyPressed().
character_t* CL_ActorGetChr | ( | const le_t * | le | ) |
Returns the character information for an actor in the teamlist.
[in] | le | The actor to search. |
Definition at line 155 of file cl_actor.cpp.
References clientBattleScape_s::chrList, cl, LIST_Foreach, and le_s::ucn.
Referenced by CL_ActorDie(), CL_ActorGetReactionFireFireDef(), CL_ActorInjuryModifier(), CL_ActorInvMove(), CL_ActorReactionFireChange(), CL_ActorReservationChange(), CL_ActorReservedTUs(), CL_ActorReserveTUs(), CL_ActorRevitalised(), CL_ActorSelect(), CL_ActorStateChange(), CL_ActorWound(), CL_AddTargetingBox(), CL_GetHitProbability(), HUD_DisplayFiremodeEntry(), HUD_PopupFiremodeReservation(), HUD_ReactionFireGetTUs(), HUD_SetShootReservation(), HUD_UpdateActorLoad_f(), and HUD_UpdateActorStats().
Returns the actor that is closest to the given origin.
Definition at line 694 of file cl_actor.cpp.
References LE_GetNextInUse(), LE_IsLivingAndVisibleActor(), le_s::origin, le_s::team, and VectorDist.
Referenced by CL_SoundEvent().
int CL_ActorGetContainerForReload | ( | Item ** | ammoItem, |
const Inventory * | inv, | ||
const objDef_t * | weapon | ||
) |
Searches the clip with the least TU usage to put it into the weapon.
ammoItem | The inventory list that can be used outside of this function for the found ammo |
inv | The inventory to do the search in |
weapon | The weapon to reload |
NONE
if no container was found, the container id otherwise. Definition at line 916 of file cl_actor.cpp.
References CID_MAX, GAME_ItemIsUseable(), Inventory::getContainer2(), Item::getNext(), INVDEF, objDef_s::isLoadableInWeapon(), and NONE.
Referenced by CL_ActorReload(), and HUD_CalcReloadTime().
le_t* CL_ActorGetFromCharacter | ( | const character_t * | chr | ) |
Returns the local entity information for a character in the team list.
[in] | chr | The character to search the local entity for. |
Definition at line 141 of file cl_actor.cpp.
References cl, i, clientBattleScape_s::numTeamList, clientBattleScape_s::teamList, le_s::ucn, and character_s::ucn.
Returns the number of the actor in the teamlist.
[in] | le | The actor to search. |
-1
if the given entity is not in the team list. Definition at line 125 of file cl_actor.cpp.
References cl, clientBattleScape_s::numTeamList, and clientBattleScape_s::teamList.
Referenced by CL_ActorAddToTeamList(), CL_ActorSelect(), CL_ActorWound(), and HUD_UpdateActorStats().
[in] | shooter | The local entity to get the reaction fire firedef from |
nullptr
if there is none Definition at line 171 of file cl_actor.cpp.
References CL_ActorGetChr(), Item::getFiredefs(), FiremodeSettings::getFmIdx(), FiremodeSettings::getHand(), le_s::getHandItem(), MAX_FIREDEFS_PER_WEAPON, and character_s::RFmode.
Referenced by CL_ActorIsReactionFireOutOfRange(), and CL_ActorReactionFireAddTarget().
float CL_ActorInjuryModifier | ( | const le_t * | le, |
const modifier_types_t | type | ||
) |
Returns the actor injury modifier of the specified type.
[in] | le | The actor. |
[in] | type | The injury modifier type. |
Definition at line 299 of file cl_actor.cpp.
References teamDef_s::bodyTemplate, CL_ActorGetChr(), CL_ActorInjuryModifier(), Com_Printf(), le_s::maxHP, MODIFIER_ACCURACY, MODIFIER_MOVEMENT, MODIFIER_REACTION, MODIFIER_SHOOTING, BodyData::numBodyParts(), BodyData::penalty(), character_s::teamDef, woundInfo_s::treatmentLevel, woundInfo_s::woundLevel, le_s::wounds, and BodyData::woundThreshold().
Referenced by CL_ActorInjuryModifier(), CL_ActorMoveLength(), CL_ActorTimeForFireDef(), CL_GetHitProbability(), and HUD_UpdateButtons().
void CL_ActorInvMove | ( | const le_t * | le, |
containerIndex_t | fromContainer, | ||
int | fromX, | ||
int | fromY, | ||
containerIndex_t | toContainer, | ||
int | toX, | ||
int | toY | ||
) |
Sends an inventory move event to the server.
le | The le that is doing the inventory move (an actor) |
fromContainer | The container to fetch the item from |
fromX | The x position in the container to get the item from |
fromY | The y position in the container to get the item from |
toContainer | The container to store the item in |
toX | The x position in the container to move the item to |
toY | The y position in the container to move the item to |
Definition at line 1004 of file cl_actor.cpp.
References _, Inventory::canHoldItemWeight(), CL_ActorGetChr(), CL_BattlescapeRunning(), le_s::entnum, GAME_GetChrMaxLoad(), Inventory::getItemAtPos(), le_s::inv, INVDEF, LE_IsActor(), MSG_Write_PA(), PA_INVMOVE, and UI_Popup().
Referenced by CL_ActorReload(), and uiContainerNode::onDndFinished().
[in] | shooter | The local entity to get the reaction fire definition for the range check for |
[in] | target | The target to calculate the distance to |
true
if the given target
is out of range for the shooter
with the current selected fire mode Definition at line 199 of file cl_actor.cpp.
References CL_ActorGetReactionFireFireDef(), le_s::origin, fireDef_s::range, and VectorDist.
Referenced by CL_ActorReactionFireTargetUpdate().
Return the last position we can walk to with a defined amount of TUs.
[in] | to | The location we want to reach. |
[in] | le | Pointer to an actor for which we check maximum move. |
[in,out] | pos | The location we can reach with the given amount of TUs. |
Definition at line 816 of file cl_actor.cpp.
References cl, CL_ActorMoveLength(), CL_ActorUsableTUs(), Grid_MoveNext(), LE_IsCrouched, length, clientBattleScape_s::pathMap, PosSubDV, ROUTING_NOT_REACHABLE, ROUTING_UNREACHABLE, and VectorCopy.
Referenced by CL_ActorStartMove().
bool CL_ActorMouseTrace | ( | void | ) |
Battlescape cursor positioning.
Definition at line 1373 of file cl_actor.cpp.
References ACTOR_GET_FIELDSIZE, CELL_HEIGHT, cl, CL_ActorResetMoveLength(), CL_BattlescapeSearchAtGridPos(), CL_GetWorldCoordsUnderMouse(), CL_OutsideMap(), cl_worldlevel, le_s::clientAction, CM_EntTestLineDM(), CURSOR_OFFSET, Grid_Fall(), cvar_s::integer, LE_IsActor(), clientBattleScape_s::leInlineModelList, MAP_SIZE_OFFSET, clientBattleScape_s::mapData, clientBattleScape_s::mapTiles, ModelFloorToQuant, mouseLastPos, mousePos, PATHFINDING_HEIGHT, PosToVec, mapData_s::routing, SCR_ChangeCursor(), TL_FLAG_ACTORCLIP, truePos, UNIT_HEIGHT, VecToPos, VectorCompare, and VectorCopy.
Referenced by IN_Parse().
Get the real move length (depends on crouch-state of the current actor).
[in] | to | The position in the map to calculate the move-length for. |
[in] | le | Pointer to actor for which we calculate move lenght. |
Definition at line 737 of file cl_actor.cpp.
References cl, CL_ActorInjuryModifier(), Grid_MoveLength(), Grid_MoveNext(), Grid_ShouldUseAutostand(), cvar_s::integer, LE_IsCrouched, length, MODIFIER_MOVEMENT, clientBattleScape_s::pathMap, PosSubDV, ROUTING_NOT_REACHABLE, ROUTING_UNREACHABLE, TU_CROUCH, and VectorCopy.
Referenced by CL_ActorMaximumMove(), CL_ActorResetMoveLength(), CL_ActorStartMove(), CL_ActorTraceMove(), and CL_AddPathingBox().
Decide how the actor will walk, taking into account autostanding.
[in] | le | Pointer to an actor for which we set the moving mode. |
Definition at line 102 of file cl_actor.cpp.
References cl, le_s::fieldSize, Grid_ShouldUseAutostand(), cvar_s::integer, LE_IsCrouched, clientBattleScape_s::mapData, mousePos, clientBattleScape_s::pathMap, le_s::pos, mapData_s::routing, RT_CanActorStandHere(), WALKTYPE_AUTOSTAND_BEING_USED, WALKTYPE_AUTOSTAND_BUT_NOT_FAR_ENOUGH, WALKTYPE_CROUCH_WALKING, and WALKTYPE_WALKING.
Referenced by HUD_UpdateActorMove().
handle select or action clicking in either move mode
Definition at line 1161 of file cl_actor.cpp.
References le_s::actorMode, CL_ActorSetMode(), CL_ActorStartMove(), cl_worldlevel, cls, cvar_s::integer, client_static_s::isOurRound(), M_PEND_MOVE, le_s::mousePendPos, mousePos, VectorCompare, and VectorCopy.
Referenced by CL_ActorSelectMouse().
Switch to the next living soldier.
Definition at line 2282 of file cl_actor.cpp.
References CL_ActorSelectNext(), and CL_BattlescapeRunning().
Referenced by ACTOR_InitStartup().
void CL_ActorPlaySound | ( | const le_t * | le, |
actorSound_t | soundType | ||
) |
Plays various sounds on actor action.
[in] | le | The actor |
[in] | soundType | Type of action (among actorSound_t) for which we need a sound. |
Definition at line 2134 of file cl_actor.cpp.
References Com_DPrintf(), DEBUG_CLIENT, DEBUG_SOUND, le_s::gender, teamDef_s::getActorSound(), le_s::origin, S_LoadAndPlaySample(), SND_VOLUME_DEFAULT, SOUND_ATTN_IDLE, and le_s::teamDef.
Referenced by CL_ActorDie(), CL_ActorShootHidden(), CL_ActorStateChange(), LE_AddProjectile(), and LET_Projectile().
Switch to the previous living soldier.
Definition at line 2292 of file cl_actor.cpp.
References CL_ActorSelectPrev(), and CL_BattlescapeRunning().
Referenced by ACTOR_InitStartup().
void CL_ActorReload | ( | le_t * | le, |
containerIndex_t | containerID | ||
) |
Reload weapon with actor.
[in,out] | le | The actor to reload the weapon for |
[in] | containerID | The container to reload |
Definition at line 948 of file cl_actor.cpp.
References _, CID_LEFT, CID_RIGHT, CL_ActorCheckAction(), CL_ActorGetContainerForReload(), CL_ActorInvMove(), Item::def(), GAME_ItemIsUseable(), Inventory::getContainer2(), Item::getFirstShapePosition(), Item::getX(), Item::getY(), HUD_DisplayMessage(), le_s::inv, Item::isHeldTwoHanded(), objDef_s::isReloadable(), and NONE.
Referenced by HUD_ReloadLeft_f(), and HUD_ReloadRight_f().
Removes an actor (from your team) from the team list.
[in,out] | le | Pointer to local entity struct of the actor of your team |
Definition at line 400 of file cl_actor.cpp.
References cl, CL_ActorCleanup(), CL_ActorSelect(), i, LE_IsSelected, LE_IsStunned, clientBattleScape_s::numTeamList, clientBattleScape_s::teamList, and UI_ExecuteConfunc().
Referenced by CL_ActorDie(), and CL_ActorStateChange().
int CL_ActorReservedTUs | ( | const le_t * | le, |
const reservation_types_t | type | ||
) |
Returns the amount of reserved TUs for a certain type.
[in] | le | The actor to check. |
[in] | type | The type to check. Use RES_ALL_ACTIVE to get all reserved TUs that are not "active" (e.g. RF is skipped if disabled). RES_ALL returns ALL of them, no matter what. See reservation_types_t for a list of options. |
Definition at line 214 of file cl_actor.cpp.
References CL_ActorGetChr(), Com_DPrintf(), chrReservations_s::crouch, DEBUG_CLIENT, chrReservations_s::reaction, RES_ALL, RES_ALL_ACTIVE, RES_CROUCH, RES_REACTION, RES_SHOT, character_s::reservedTus, chrReservations_s::shot, le_s::state, and STATE_REACTION.
Referenced by CL_ActorStandCrouch_f(), CL_ActorStateChange(), CL_ActorUsableTUs(), HUD_CheckFiremodeReservation(), HUD_PopupFiremodeReservation(), HUD_ShotReserve_f(), HUD_ToggleCrouchReservation_f(), HUD_UpdateActorCvar(), HUD_UpdateActorMove(), HUD_UpdateActorStats(), HUD_UpdateButtons(), and HUD_UsableReactionTUs().
void CL_ActorReserveTUs | ( | const le_t * | le, |
const reservation_types_t | type, | ||
const int | tus | ||
) |
Replace the reserved TUs for a certain type.
[in] | le | The actor to change it for. |
[in] | type | The reservation type to be changed (i.e be replaced). |
[in] | tus | How many TUs to set. |
Definition at line 273 of file cl_actor.cpp.
References CL_ActorGetChr(), chrReservations_s::crouch, le_s::entnum, MSG_Write_PA(), PA_RESERVE_STATE, RES_CROUCH, RES_REACTION, RES_SHOT, character_s::reservedTus, and chrReservations_s::shot.
Referenced by CL_ActorStateChange(), HUD_SetShootReservation(), and HUD_ToggleCrouchReservation_f().
Recalculates the currently selected Actor's move length.
[in,out] | le | Pointer to actor for which we reset move lenght. |
Definition at line 764 of file cl_actor.cpp.
References le_s::actorMoveLength, CL_ActorMoveLength(), and mousePos.
Referenced by CL_ActorConditionalMoveCalc(), CL_ActorMouseTrace(), and CL_ActorStats().
bool CL_ActorSelect | ( | le_t * | le | ) |
Selects an actor.
le | Pointer to local entity struct. If this is nullptr the ui_inventory that is linked from the actors |
Definition at line 440 of file cl_actor.cpp.
References cl, CL_ActorConditionalMoveCalc(), CL_ActorGetChr(), CL_ActorGetNumber(), CL_UpdateCharacterValues(), le_s::clientAction, Com_Error(), Cvar_ForceSet(), ERR_DROP, le_s::flags, le_s::inuse, le_s::inv, LE_IsDead, LE_IsSelected, LE_SELECTED, mousePosTargettingAlign, clientBattleScape_s::pnum, le_s::pnum, RDF_IRGOGGLES, refdef, rendererData_t::rendererFlags, RF_IRGOGGLESSHOT, le_s::state, UI_ExecuteConfunc(), ui_inventory, and va().
Referenced by CL_ActorRemoveFromTeamList(), CL_ActorSelectList(), CL_ActorSelectMouse(), CL_Reset(), and CL_StartGame().
Selects a soldier while we are on battlescape.
Definition at line 2302 of file cl_actor.cpp.
References CL_ActorSelectList(), CL_BattlescapeRunning(), Cmd_Argc(), Cmd_Argv(), and Com_Printf().
Referenced by ACTOR_InitStartup().
bool CL_ActorSelectList | ( | int | num | ) |
Selects an actor from a list.
This function is used to select an actor from the lists that are used in equipment and team assemble screens
num | The index value from the list of actors |
Definition at line 506 of file cl_actor.cpp.
References cl, CL_ActorSelect(), Cvar_SetValue(), LE_CenterView(), clientBattleScape_s::numTeamList, le_s::pos, and clientBattleScape_s::teamList.
Referenced by CL_ActorAddToTeamList(), CL_ActorSelect_f(), CL_ActorSelectNext(), and CL_ActorSelectPrev().
Selects an actor using the mouse.
Definition at line 1197 of file cl_actor.cpp.
References le_s::actorMode, CL_ActorMoveMouse(), CL_ActorSelect(), CL_ActorSetMode(), CL_ActorShoot(), CL_ActorUse(), IN_GetMouseSpace, cvar_s::integer, LE_IsSelected, M_FIRE_L, M_FIRE_R, M_MOVE, M_PEND_FIRE_L, M_PEND_FIRE_R, M_PEND_MOVE, le_s::mousePendPos, mousePos, MS_WORLD, VectorCompare, and VectorCopy.
Referenced by CL_SelectUp_f().
bool CL_ActorSelectNext | ( | void | ) |
selects the next actor
Definition at line 527 of file cl_actor.cpp.
References cl, CL_ActorSelectList(), i, le_s::inuse, LE_IsDead, LE_IsSelected, clientBattleScape_s::numTeamList, and clientBattleScape_s::teamList.
Referenced by CL_ActorNext_f().
bool CL_ActorSelectPrev | ( | void | ) |
selects the previous actor
Definition at line 558 of file cl_actor.cpp.
References cl, CL_ActorSelectList(), i, le_s::inuse, LE_IsDead, LE_IsSelected, clientBattleScape_s::numTeamList, and clientBattleScape_s::teamList.
Referenced by CL_ActorPrev_f().
Definition at line 91 of file cl_actor.cpp.
References le_s::fd, and mousePosTargettingAlign.
Referenced by HUD_UpdateActorFireMode().
void CL_ActorSetMode | ( | le_t * | actor, |
actorModes_t | actorMode | ||
) |
Definition at line 835 of file cl_actor.cpp.
References le_s::actorMode.
Referenced by CL_ActorActionMouse(), CL_ActorMoveMouse(), CL_ActorSelectMouse(), CL_ActorStartMove(), CL_ActorUseHeadgear_f(), CL_AddTargeting(), HUD_FireWeapon_f(), HUD_SetMoveMode_f(), HUD_UpdateActorFireMode(), and UI_KeyPressed().
Shoot with actor.
[in] | le | Who is shooting |
[in] | at | Position you are targeting to |
Definition at line 888 of file cl_actor.cpp.
References le_s::actorMode, CL_ActorCheckAction(), le_s::currentSelectedFiremode, le_s::entnum, IN_GetMouseSpace, IS_MODE_FIRE_HEADGEAR, IS_MODE_FIRE_LEFT, IS_MODE_FIRE_RIGHT, mousePosTargettingAlign, MS_WORLD, MSG_Write_PA(), PA_SHOOT, ST_HEADGEAR, ST_LEFT, ST_RIGHT, and type.
Referenced by CL_ActorConfirmAction(), CL_ActorSelectMouse(), and CL_ActorUseHeadgear_f().
Stands or crouches actor.
Definition at line 1105 of file cl_actor.cpp.
References cl, CL_ActorCheckAction(), CL_ActorReservedTUs(), CL_ActorUsableTUs(), le_s::entnum, le_s::fieldSize, LE_IsCrouched, clientBattleScape_s::mapData, MSG_Write_PA(), PA_STATE, le_s::pos, RES_CROUCH, mapData_s::routing, RT_CanActorStandHere(), STATE_CROUCHED, and TU_CROUCH.
Referenced by ACTOR_InitStartup().
Starts moving actor.
[in] | le | |
[in] | to |
Definition at line 847 of file cl_actor.cpp.
References CL_ActorCheckAction(), CL_ActorMaximumMove(), CL_ActorMoveLength(), CL_ActorSetMode(), CL_ActorUsableTUs(), le_s::entnum, IN_GetMouseSpace, length, M_MOVE, MS_WORLD, MSG_Write_PA(), PA_MOVE, and ROUTING_NOT_REACHABLE.
Referenced by CL_ActorConfirmAction(), and CL_ActorMoveMouse().
Targets to the ground when holding the assigned button.
Definition at line 1924 of file cl_actor.cpp.
References le_s::actorMode, CL_ActorFireModeActivated(), Cmd_Argc(), Cmd_Argv(), le_s::fd, fireDef_s::gravity, GROUND_DELTA, and mousePosTargettingAlign.
Referenced by CL_InitLocal().
Find the TUs needed for the given fireDef taking into account the actor wound penalties.
[in] | le | The actor. |
[in] | fd | The fire definition. |
[in] | reaction | Whether this is a normal or reaction fire shot. |
Definition at line 342 of file cl_actor.cpp.
References CL_ActorInjuryModifier(), MODIFIER_REACTION, MODIFIER_SHOOTING, and fireDef_s::time.
Referenced by HUD_CheckFiremodeReservation(), HUD_DisplayFiremodeEntry(), HUD_FireWeapon_f(), HUD_PopupFiremodeReservation(), HUD_ReactionFireGetTUs(), and HUD_UpdateActorFireMode().
|
static |
Draws the way to walk when confirm actions is activated.
[in] | to | The location we draw the line to (starting with the location of selActor) |
Definition at line 776 of file cl_actor.cpp.
References cl, CL_ActorMoveLength(), CL_ActorUsableTUs(), CL_ParticleSpawn(), le_s::fieldSize, Grid_MoveNext(), Grid_PosToVec(), LE_IsCrouched, length, clientBattleScape_s::mapData, clientBattleScape_s::pathMap, PosSubDV, mapData_s::routing, ROUTING_NOT_REACHABLE, ROUTING_UNREACHABLE, and VectorCopy.
Referenced by CL_AddTargeting().
Turns the actor around without moving.
Definition at line 1074 of file cl_actor.cpp.
References le_s::actorMode, AngleToDV, CL_ActorActionMouse(), CL_ActorCheckAction(), CL_ActorFireModeActivated(), CL_ActorUsableTUs(), le_s::entnum, IN_GetMouseSpace, mousePos, MS_WORLD, MSG_Write_PA(), PA_TURN, le_s::pos, todeg, TU_TURN, and VectorSubtract.
Referenced by CL_TurnDown_f().
Update the skin of the current soldier.
Definition at line 2320 of file cl_actor.cpp.
References chrDisplayList, cl_selected, CL_UpdateCharacterValues(), i, cvar_s::integer, and LIST_Foreach.
Referenced by ACTOR_InitStartup().
Returns the amount of usable (overall-reserved) TUs for an actor.
[in] | le | The actor to check. |
Definition at line 259 of file cl_actor.cpp.
References CL_ActorReservedTUs(), RES_ALL_ACTIVE, and le_s::TU.
Referenced by CL_ActorMaximumMove(), CL_ActorStandCrouch_f(), CL_ActorStartMove(), CL_ActorStateChange(), CL_ActorTraceMove(), CL_ActorTurnMouse(), CL_ActorUse_f(), CL_AddPathingBox(), CL_AddTargetingBox(), HUD_CheckFiremodeReservation(), HUD_DisplayFiremodeEntry(), HUD_FireWeapon_f(), HUD_PopupFiremodeReservation(), HUD_ShotReserve_f(), HUD_ToggleReaction_f(), HUD_UpdateActor(), HUD_UpdateActorCvar(), HUD_UpdateActorFireMode(), HUD_UpdateActorMove(), HUD_UpdateButtons(), HUD_UsableReactionTUs(), and HUD_WeaponCanBeReloaded().
Uses the current selected entity in the battlescape. Can e.g. open the selected door.
Definition at line 1027 of file cl_actor.cpp.
References CL_ActorCheckAction(), le_s::clientAction, Com_DPrintf(), DEBUG_CLIENT, le_s::entnum, MSG_Write_PA(), and PA_USE.
Referenced by CL_ActorSelectMouse(), and CL_ActorUse_f().
Hud callback to use the current selected entity.
Definition at line 1041 of file cl_actor.cpp.
References CL_ActorCheckAction(), CL_ActorUsableTUs(), CL_ActorUse(), le_s::clientAction, Com_DPrintf(), DEBUG_CLIENT, le_s::entnum, LE_IsDoor, selActor, and TU_DOOR_ACTION.
Referenced by ACTOR_InitStartup().
Toggles the headgear for the current selected player.
Definition at line 1124 of file cl_actor.cpp.
References CL_ActorCheckAction(), CL_ActorSetMode(), CL_ActorShoot(), le_s::currentSelectedFiremode, Inventory::getHeadgear(), IN_GetMouseSpace, IN_SetMouseSpace(), le_s::inv, M_FIRE_HEADGEAR, M_MOVE, MS_WORLD, and le_s::pos.
Referenced by ACTOR_InitStartup().
[in] | le | The local entity to do the check for |
[in] | check | The local entity to check the visibility for |
true
if the given edict is visible from the given world coordinate, false
otherwise. Definition at line 2339 of file cl_actor.cpp.
References CL_Trace(), cl_worldlevel, AABB::EMPTY, trace_s::fraction, i, cvar_s::integer, LE_IsCrouched, LE_IsDead, MASK_SOLID, le_s::origin, PLAYER_CROUCH, PLAYER_DEAD, PLAYER_MIN, PLAYER_STAND, tr, VectorCopy, VectorMA(), and VectorNormalize().
Referenced by CL_NextAlienVisibleFromActor_f().
Adds an actor to the render entities with all it's models and items.
[in] | le | The local entity to get the values from |
[in] | ent | The body entity used in the renderer |
Add actor special effects. Only draw blood if the actor is dead or (if stunned) was damaged more than half its maximum HPs.
Definition at line 1515 of file cl_actor.cpp.
References le_s::alpha, cl, CL_AddActorWeapon(), CL_ParticleSpawn(), cls, Com_Error(), teamDef_s::deathTextureName, ERR_DROP, le_s::headSkin, le_s::HP, i, cvar_s::integer, it_effect, LE_IsDead, LE_IsSelected, LE_IsStunned, le_s::left, le_s::maxHP, le_s::model1, le_s::model2, client_static_s::modelPool, le_s::origin, PATHFINDING_HEIGHT, clientBattleScape_s::pnum, le_s::pnum, le_s::pos, le_s::ptl, R_AddEntity(), R_FindImage(), R_GetFreeEntity(), R_GetTagIndexByName(), RF_ACTOR, RF_ALLIED, RF_BLOOD, RF_IRGOGGLES, RF_MEMBER, RF_NEUTRAL, RF_NONE, RF_OPPONENT, RF_SELECTED, RF_SHADOW, le_s::right, client_static_s::team, le_s::team, TEAM_CIVILIAN, and le_s::teamDef.
Referenced by CL_ActorAppear().
Adds an actor pathing marker to the current floor when we render the world.
Definition at line 2109 of file cl_actor.cpp.
References CL_AddPathingBox(), cl_worldlevel, i, cvar_s::integer, and PATHFINDING_WIDTH.
Referenced by CL_ViewRender().
|
inlinestatic |
Checks whether a weapon should be added to the entity's hand.
[in] | objID | The item id that the actor is holding in his hand (le->left or le->right ) |
Definition at line 1495 of file cl_actor.cpp.
References INVSH_GetItemByIDX(), objDef_s::isVirtual, and NONE.
Referenced by CL_AddActor().
create an arrow between from and to with the specified color ratios
Definition at line 2147 of file cl_actor.cpp.
References entity_t::origin, R_AddEntity(), RF_ARROW, VectorCopy, and VectorSet.
Referenced by CL_DisplayFloorArrows(), and CL_DisplayObstructionArrows().
Adds a pathing marker to the current floor when we render the world.
Definition at line 2089 of file cl_actor.cpp.
References CL_AddPathingBox(), cl_worldlevel, cvar_s::integer, mousePos, and PATHFINDING_WIDTH.
Referenced by CL_ViewRender().
|
static |
create a targeting box at the given position
Definition at line 2043 of file cl_actor.cpp.
References ACTOR_GET_FIELDSIZE, cl, CL_ActorMoveLength(), CL_ActorUsableTUs(), Grid_Floor(), Grid_PosToVec(), clientBattleScape_s::mapData, entity_t::origin, PATHFINDING_MAX_FALL, QuantToModel, R_AddEntity(), RF_PATH, mapData_s::routing, ROUTING_NOT_REACHABLE, UNIT_HEIGHT, VectorSet, and VectorSubtract.
Referenced by CL_AddActorPathing(), and CL_AddPathing().
Adds a target cursor when we render the world.
Definition at line 1981 of file cl_actor.cpp.
References le_s::actorMode, CL_ActorSetMode(), CL_ActorTraceMove(), CL_AddTargetingBox(), CL_TargetingGrenade(), CL_TargetingStraight(), cl_worldlevel, le_s::fd, le_s::fieldSize, fireDef_s::gravity, IN_GetMouseSpace, cvar_s::integer, M_FIRE_L, M_FIRE_R, M_MOVE, M_PEND_FIRE_L, M_PEND_FIRE_R, M_PEND_MOVE, le_s::mousePendPos, mousePos, MS_WORLD, and le_s::pos.
Referenced by CL_ViewRender().
create a targeting box at the given position
Definition at line 1833 of file cl_actor.cpp.
References _, ACTOR_SIZE_NORMAL, le_s::actorMoveLength, cl, CL_ActorGetChr(), CL_ActorUsableTUs(), CL_PlayerGetName(), cls, le_s::fieldSize, GAME_TeamIsKnown(), Grid_PosToVec(), cvar_s::integer, LE_IsAlien, LE_IsSelected, clientBattleScape_s::mapData, teamDef_s::name, character_s::name, entity_t::origin, clientBattleScape_s::pnum, le_s::pnum, R_AddEntity(), RF_BOX, mapData_s::routing, ROUTING_NOT_REACHABLE, client_static_s::team, le_s::team, TEAM_CIVILIAN, le_s::teamDef, TEXT_MOUSECURSOR_PLAYERNAMES, clientBattleScape_s::time, UI_RegisterText(), UNIT_SIZE, VectorAdd, VectorSet, and VectorSubtract.
Referenced by CL_AddTargeting().
Scroll battlescape touchscreen-style, by clicking and dragging away.
Definition at line 1467 of file cl_actor.cpp.
References clientBattleScape_s::cam, cl, CL_GetWorldCoordsUnderMouse(), Cvar_SetValue(), f, mouseDraggingPos, camera_s::origin, truePos, VectorMA(), and VectorSubtract.
Referenced by CL_ProcessMouseDragging().
Builds a list of locations that cannot be moved to (client side).
Definition at line 612 of file cl_actor.cpp.
References forbiddenList_s::add(), ET_ACTOR2x2, le_s::fieldSize, LE_GetNextInUse(), LE_IsInvisible, LE_IsLivingAndVisibleActor(), LE_IsStunned, le_s::pos, forbiddenList_s::reset(), and le_s::type.
Referenced by CL_ActorConditionalMoveCalc().
Useful for debugging pathfinding.
Definition at line 2166 of file cl_actor.cpp.
References ACTOR_GET_FIELDSIZE, cl, CL_AddArrow(), Grid_PosToVec(), clientBattleScape_s::mapData, QUANT, mapData_s::routing, truePos, and VectorCopy.
Referenced by CL_ViewRender().
Useful for debugging pathfinding.
Definition at line 2180 of file cl_actor.cpp.
References ACTOR_GET_FIELDSIZE, cl, CL_AddArrow(), Grid_PosToVec(), clientBattleScape_s::mapData, mapData_s::routing, truePos, and VectorCopy.
Referenced by CL_ViewRender().
void CL_GetWorldCoordsUnderMouse | ( | vec3_t | groundIntersection, |
vec3_t | upperTracePoint, | ||
vec3_t | lowerTracePoint | ||
) |
Get battlescape cell position under mouse cursor.
[out] | groundIntersection | Point on the ground under the mouse cursor, in the world coordinates |
[out] | upperTracePoint | Point in the sky under the mouse cursor, in the world coordinates |
[out] | lowerTracePoint | Point below the ground under the mouse cursor, at the world boundary |
Definition at line 1290 of file cl_actor.cpp.
References camera_s::axis, clientBattleScape_s::cam, camera_s::camorg, cl, cl_isometric, cl_worldlevel, CM_EntTestLineDM(), CURSOR_OFFSET, DotProduct, rendererData_t::fieldOfViewX, cvar_s::integer, clientBattleScape_s::leInlineModelList, M_PI, clientBattleScape_s::mapTiles, mousePosX, mousePosY, refdef, viddef_t::rx, viddef_t::ry, TL_FLAG_ACTORCLIP, UNIT_HEIGHT, VectorAdd, VectorCopy, VectorMA(), VectorScale, VectorSet, VectorSubtract, viddef, viddef_t::viewHeight, viddef_t::viewWidth, viddef_t::x, and viddef_t::y.
Referenced by CL_ActorMouseTrace(), CL_BattlescapeMouseDragging(), and CL_InitBattlescapeMouseDragging().
Scroll battlescape touchscreen-style, by clicking and dragging away.
Definition at line 1459 of file cl_actor.cpp.
References CL_GetWorldCoordsUnderMouse(), and mouseDraggingPos.
Referenced by CL_SelectDown_f().
Cycles between visible aliens.
Definition at line 2422 of file cl_actor.cpp.
References cl, CL_ViewCenterAtGridPosition(), cls, Cvar_GetInteger(), Cvar_SetValue(), i, le_s::inuse, LE_IsLivingAndVisibleActor(), clientBattleScape_s::LEs, clientBattleScape_s::numLEs, le_s::pos, client_static_s::team, le_s::team, and TEAM_CIVILIAN.
Referenced by ACTOR_InitStartup().
Cycles between visible (to selected actor) aliens.
Definition at line 2391 of file cl_actor.cpp.
References cl, CL_ActorVis(), CL_ParticleSpawn(), CL_ViewCenterAtGridPosition(), cls, i, le_s::inuse, LE_IsCivilian, LE_IsLivingAndVisibleActor(), clientBattleScape_s::LEs, clientBattleScape_s::numLEs, le_s::origin, le_s::pos, client_static_s::team, and le_s::team.
Referenced by ACTOR_InitStartup().
Cycles between visible aliens in reverse direction.
Definition at line 2449 of file cl_actor.cpp.
References cl, CL_ViewCenterAtGridPosition(), cls, Cvar_GetInteger(), Cvar_SetValue(), i, le_s::inuse, LE_IsLivingAndVisibleActor(), clientBattleScape_s::LEs, clientBattleScape_s::numLEs, le_s::pos, client_static_s::team, le_s::team, and TEAM_CIVILIAN.
Referenced by ACTOR_InitStartup().
|
static |
Shows targeting for a grenade.
[in] | fromPos | The (grid-) position of the aiming actor. |
[in] | fromActorSize | The size of the aiming actor (1 for 1x1 or 2 for 2x2). |
[in] | toPos | The (grid-) position of the target (mousePos or mousePendPos). |
Definition at line 1738 of file cl_actor.cpp.
References ACTOR_SIZE_NORMAL, cl, CL_BattlescapeSearchAtGridPos(), CL_ParticleSpawn(), CL_TargetingRadius(), CL_Trace(), Com_GrenadeTarget(), AABB::EMPTY, le_s::fd, le_s::fieldSize, trace_s::fraction, fireDef_s::getShotOrigin(), GRAVITY, GRENADE_PARTITIONS, Grid_PosToVec(), GROUND_DELTA, i, fireDef_s::launched, trace_s::le, LE_IsCrouched, LE_IsInvisible, clientBattleScape_s::mapData, clientBattleScape_s::mapMaxLevel, MASK_SHOT, mousePosTargettingAlign, le_s::pos, fireDef_s::range, fireDef_s::rolled, mapData_s::routing, fireDef_s::splrad, tr, Vector2Compare, VectorAdd, VectorCompare, VectorCopy, VectorLength(), VectorScale, and VectorSubtract.
Referenced by CL_AddTargeting().
Show weapon radius.
[in] | center | The center of the circle |
[in] | radius | The radius of the damage circle |
Definition at line 1637 of file cl_actor.cpp.
References CL_ParticleSpawn(), and ptl_s::size.
Referenced by CL_TargetingGrenade(), and CL_TargetingStraight().
|
static |
Draws line to target.
[in] | fromPos | The (grid-) position of the aiming actor. |
[in] | fromActorSize | The size of the aiming actor (1 for 1x1 or 2 for 2x2). |
[in] | toPos | The (grid-) position of the target. |
Definition at line 1654 of file cl_actor.cpp.
References ACTOR_SIZE_NORMAL, cl, CL_BattlescapeSearchAtGridPos(), CL_ParticleSpawn(), CL_TargetingRadius(), CL_Trace(), cls, AABB::EMPTY, le_s::fd, le_s::fieldSize, trace_s::fraction, fireDef_s::getShotOrigin(), Grid_PosToVec(), trace_s::le, LE_IsCivilian, LE_IsCrouched, LE_IsInvisible, clientBattleScape_s::mapData, clientBattleScape_s::mapMaxLevel, MASK_SHOT, mousePosTargettingAlign, le_s::pos, fireDef_s::range, mapData_s::routing, fireDef_s::splrad, client_static_s::team, le_s::team, tr, UNIT_SIZE, VectorCompare, VectorCopy, VectorDist, VectorDistSqr, VectorMA(), VectorNormalize(), and VectorSubtract.
Referenced by CL_AddTargeting().
void MSG_Write_PA | ( | player_action_t | playerAction, |
int | entnum, | ||
... | |||
) |
Writes player action with its data.
[in] | playerAction | Type of action. |
[in] | entnum | The server side edict number of the actor |
Definition at line 73 of file cl_actor.cpp.
References clc_action, cls, NET_vWriteFormat(), NET_WriteFormat(), NET_WriteMsg(), client_static_s::netStream, and pa_format.
Referenced by CL_ActorInvMove(), CL_ActorReserveTUs(), CL_ActorShoot(), CL_ActorStandCrouch_f(), CL_ActorStartMove(), CL_ActorTurnMouse(), CL_ActorUse(), HUD_ToggleReaction_f(), and HUD_UpdateReactionFiremodes().
|
static |
Definition at line 2037 of file cl_actor.cpp.
|
static |
Player preference: should the server make guys stand for long walks, to save TU.
Definition at line 45 of file cl_actor.cpp.
|
static |
Definition at line 46 of file cl_actor.cpp.
|
static |
Confirm actions in tactical mode - valid values are 0, 1 and 2.
Definition at line 43 of file cl_actor.cpp.
|
static |
A list of locations that cannot be moved to.
Definition at line 602 of file cl_actor.cpp.
Referenced by Grid_FindPath(), and TEST_F().
|
static |
|
static |
Definition at line 65 of file cl_actor.cpp.
|
static |
Definition at line 64 of file cl_actor.cpp.
|
static |
The world pos, which we "grab" to scroll the world in touchscreen mode.
Definition at line 52 of file cl_actor.cpp.
Referenced by CL_BattlescapeMouseDragging(), and CL_InitBattlescapeMouseDragging().
|
static |
Definition at line 66 of file cl_actor.cpp.
Referenced by CL_ActorMouseTrace().
pos3_t mousePos |
The cell that an actor will move to when directed to move.
Definition at line 51 of file cl_actor.cpp.
Referenced by CL_ActorMouseTrace(), CL_ActorMoveMode(), CL_ActorMoveMouse(), CL_ActorResetMoveLength(), CL_ActorSelectMouse(), CL_ActorTurnMouse(), CL_AddPathing(), CL_AddTargeting(), CL_GetHitProbability(), and HUD_MapDebugCursor().
|
static |
If you want to change the z level of targeting and shooting, use this value. Negative and positive offsets are possible.
Definition at line 62 of file cl_actor.cpp.
Referenced by CL_ActorSelect(), CL_ActorSetFireDef(), CL_ActorShoot(), CL_ActorTargetAlign_f(), CL_TargetingGrenade(), and CL_TargetingStraight().
le_t* selActor |
Definition at line 49 of file cl_actor.cpp.
Referenced by CL_ActorAppear(), CL_ActorDie(), CL_ActorRevitalised(), CL_ActorUse_f(), CL_DoEndRound(), CL_InvDel(), CL_InvReload(), CL_RecalcRouting(), HUD_ActorWoundData_f(), HUD_CheckFiremodeReservation(), HUD_DisplayActions_f(), HUD_DisplayFiremodes_f(), HUD_ExecuteAction_f(), HUD_FireWeapon_f(), HUD_LeftHandChangeListener(), HUD_PopupFiremodeReservation_f(), HUD_ReloadLeft_f(), HUD_ReloadRight_f(), HUD_RightHandChangeListener(), HUD_SelectReactionFiremode_f(), HUD_SetMoveMode_f(), HUD_ShotReserve_f(), HUD_ToggleCrouchReservation_f(), HUD_ToggleReaction_f(), HUD_TUChangeListener(), HUD_Update(), HUD_UpdateActorLoad_f(), HUD_UpdateCursor(), LE_DoEndPathMove(), uiContainerNode::onDndFinished(), and UI_KeyPressed().
pos3_t truePos |
The cell at the current worldlevel under the mouse cursor.
Definition at line 50 of file cl_actor.cpp.
Referenced by CL_ActorMouseTrace(), CL_BattlescapeMouseDragging(), CL_DisplayFloorArrows(), CL_DisplayObstructionArrows(), and HUD_MapDebugCursor().