UFO: Alien Invasion
Loading...
Searching...
No Matches
cl_actor.cpp File Reference

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"
Include dependency graph for cl_actor.cpp:

Go to the source code of this file.

Macros

#define GRENADE_PARTITIONS   20
#define BoxOffset(aSize, target)

Functions

void MSG_Write_PA (player_action_t playerAction, int entnum,...)
 Writes player action with its data.
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.
int CL_ActorGetNumber (const le_t *le)
 Returns the number of the actor in the teamlist.
le_tCL_ActorGetFromCharacter (const character_t *chr)
 Returns the local entity information for a character in the team list.
character_tCL_ActorGetChr (const le_t *le)
 Returns the character information for an actor in the teamlist.
const fireDef_tCL_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.
int CL_ActorUsableTUs (const le_t *le)
 Returns the amount of usable (overall-reserved) TUs for an actor.
void CL_ActorReserveTUs (const le_t *le, const reservation_types_t type, const int tus)
 Replace the reserved TUs for a certain type.
float CL_ActorInjuryModifier (const le_t *le, const modifier_types_t type)
 Returns the actor injury modifier of the specified type.
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.
void CL_ActorAddToTeamList (le_t *le)
 Adds the actor to the team list.
void CL_ActorCleanup (le_t *le)
void CL_ActorRemoveFromTeamList (le_t *le)
 Removes an actor (from your team) from the team list.
bool CL_ActorSelect (le_t *le)
 Selects an actor.
bool CL_ActorSelectList (int num)
 Selects an actor from a list.
bool CL_ActorSelectNext (void)
 selects the next actor
bool CL_ActorSelectPrev (void)
 selects the previous actor
static void CL_BuildForbiddenList (void)
 Builds a list of locations that cannot be moved to (client side).
void CL_ActorConditionalMoveCalc (le_t *le)
 Recalculate forbidden list, available moves and actor's move length for the current selected actor.
le_tCL_ActorGetClosest (const vec3_t origin, int team)
 Returns the actor that is closest to the given origin.
int CL_ActorCheckAction (const le_t *le)
 Checks that an action is valid.
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).
void CL_ActorResetMoveLength (le_t *le)
 Recalculates the currently selected Actor's move length.
static bool CL_ActorTraceMove (const pos3_t to)
 Draws the way to walk when confirm actions is activated.
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.
void CL_ActorSetMode (le_t *actor, actorModes_t actorMode)
void CL_ActorStartMove (le_t *le, const pos3_t to)
 Starts moving actor.
void CL_ActorShoot (const le_t *le, const pos3_t at)
 Shoot with actor.
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.
void CL_ActorReload (le_t *le, containerIndex_t containerID)
 Reload weapon with actor.
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.
static void CL_ActorUse (const le_t *le)
 Uses the current selected entity in the battlescape. Can e.g. open the selected door.
static void CL_ActorUse_f (void)
 Hud callback to use the current selected entity.
bool CL_ActorFireModeActivated (const actorModes_t mode)
 Checks whether we are in fire mode or node.
void CL_ActorTurnMouse (void)
 Turns the actor around without moving.
static void CL_ActorStandCrouch_f (void)
 Stands or crouches actor.
static void CL_ActorUseHeadgear_f (void)
 Toggles the headgear for the current selected player.
static void CL_ActorMoveMouse (void)
 handle select or action clicking in either move mode
void CL_ActorSelectMouse (void)
 Selects an actor using the mouse.
void CL_ActorActionMouse (void)
 initiates action with mouse.
void CL_GetWorldCoordsUnderMouse (vec3_t groundIntersection, vec3_t upperTracePoint, vec3_t lowerTracePoint)
 Get battlescape cell position under mouse cursor.
bool CL_ActorMouseTrace (void)
 Battlescape cursor positioning.
void CL_InitBattlescapeMouseDragging (void)
 Scroll battlescape touchscreen-style, by clicking and dragging away.
void CL_BattlescapeMouseDragging (void)
 Scroll battlescape touchscreen-style, by clicking and dragging away.
static bool CL_AddActorWeapon (int objID)
 Checks whether a weapon should be added to the entity's hand.
bool CL_AddActor (le_t *le, entity_t *ent)
 Adds an actor to the render entities with all it's models and items.
static void CL_TargetingRadius (const vec3_t center, const float radius)
 Show weapon radius.
static void CL_TargetingStraight (const pos3_t fromPos, actorSizeEnum_t fromActorSize, const pos3_t toPos)
 Draws line to target.
static void CL_TargetingGrenade (const pos3_t fromPos, actorSizeEnum_t fromActorSize, const pos3_t toPos)
 Shows targeting for a grenade.
static void CL_AddTargetingBox (pos3_t pos, bool pendBox)
 create a targeting box at the given position
void CL_ActorTargetAlign_f (void)
 Targets to the ground when holding the assigned button.
void CL_AddTargeting (void)
 Adds a target cursor when we render the world.
static bool CL_AddPathingBox (pos3_t pos, bool addUnreachableCells)
 create a targeting box at the given position
void CL_AddPathing (void)
 Adds a pathing marker to the current floor when we render the world.
void CL_AddActorPathing (void)
 Adds an actor pathing marker to the current floor when we render the world.
void CL_ActorPlaySound (const le_t *le, actorSound_t soundType)
 Plays various sounds on actor action.
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
void CL_DisplayFloorArrows (void)
 Useful for debugging pathfinding.
void CL_DisplayObstructionArrows (void)
 Useful for debugging pathfinding.
static void CL_ActorNext_f (void)
 Switch to the next living soldier.
static void CL_ActorPrev_f (void)
 Switch to the previous living soldier.
static void CL_ActorSelect_f (void)
 Selects a soldier while we are on battlescape.
static void CL_ActorUpdate_f (void)
 Update the skin of the current soldier.
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.
static void CL_NextAlien_f (void)
 Cycles between visible aliens.
static void CL_PrevAlien_f (void)
 Cycles between visible aliens in reverse direction.
static void CL_ActorConfirmAction (le_t *le)
static void CL_ActorConfirmAction_f (void)
 Executes "pending" actions such as walking and firing.
void ACTOR_InitStartup (void)

Variables

static cvar_tconfirm_actions
 Confirm actions in tactical mode - valid values are 0, 1 and 2.
static cvar_tcl_autostand
 Player preference: should the server make guys stand for long walks, to save TU.
static cvar_tcl_showactors
le_tselActor
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.
static le_tmouseActor
static le_tinteractEntity
static pos3_t mouseLastPos
static forbiddenList_t forbiddenList
 A list of locations that cannot be moved to.
static const vec3_t halfBoxSize = { BOX_DELTA_WIDTH, BOX_DELTA_LENGTH, BOX_DELTA_HEIGHT }
 field marker box
static const vec3_t boxShift = { PLAYER_WIDTH, PLAYER_WIDTH, UNIT_HEIGHT / 2 - DIST_EPSILON }

Detailed Description

Actor related routines.

Definition in file cl_actor.cpp.

Macro Definition Documentation

◆ BoxOffset

#define BoxOffset ( aSize,
target )
Value:
(target[0]=(aSize-1)*(UNIT_SIZE+BOX_DELTA_WIDTH), target[1]=(aSize-1)*(UNIT_SIZE+BOX_DELTA_LENGTH), target[2]=0)
#define UNIT_SIZE
Definition defines.h:121
#define BOX_DELTA_LENGTH
Definition q_sizes.h:27
#define BOX_DELTA_WIDTH
Definition q_sizes.h:26

Definition at line 1826 of file cl_actor.cpp.

◆ GRENADE_PARTITIONS

#define GRENADE_PARTITIONS   20

Definition at line 1729 of file cl_actor.cpp.

Referenced by CL_TargetingGrenade().

Function Documentation

◆ ACTOR_InitStartup()

◆ CL_ActorActionMouse()

void CL_ActorActionMouse ( void )

initiates action with mouse.

See also
CL_ActionDown
CL_ActorStartMove

Definition at line 1266 of file cl_actor.cpp.

References CL_ActorFireModeActivated(), CL_ActorSetMode(), IN_GetMouseSpace, M_MOVE, MS_WORLD, and selActor.

Referenced by CL_ActionUp_f(), and CL_ActorTurnMouse().

◆ CL_ActorAddToTeamList()

void CL_ActorAddToTeamList ( le_t * le)

Adds the actor to the team list.

See also
CL_ActorAppear
CL_ActorRemoveFromTeamList
Parameters
lePointer 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, le_t::pnum, le_t::team, and UI_ExecuteConfunc().

Referenced by CL_ActorAppear(), and CL_ActorRevitalised().

◆ CL_ActorCheckAction()

int CL_ActorCheckAction ( const le_t * le)

Checks that an action is valid.

Parameters
[in]lePointer to actor for which we check an action.
Returns
true if action is valid.

Definition at line 713 of file cl_actor.cpp.

References _, cls, HUD_DisplayMessage(), and le_t::isMoving().

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().

◆ CL_ActorCleanup()

void CL_ActorCleanup ( le_t * le)

Definition at line 389 of file cl_actor.cpp.

References cls, and le_t::inv.

Referenced by CL_ActorRemoveFromTeamList(), and LE_Cleanup().

◆ CL_ActorConditionalMoveCalc()

void CL_ActorConditionalMoveCalc ( le_t * le)

Recalculate forbidden list, available moves and actor's move length for the current selected actor.

Note
An attempt to do this with le->TU to save time ended up with the first actor not being able to move at gamestart.
Todo
seems like this function is called before the TUs are set

Definition at line 682 of file cl_actor.cpp.

References cl, CL_ActorResetMoveLength(), CL_BuildForbiddenList(), le_t::fieldSize, forbiddenList, Grid_CalcPathing(), LE_IsSelected, MAX_ROUTE_TUS, and le_t::pos.

Referenced by CL_ActorAppear(), CL_ActorDie(), CL_ActorRevitalised(), CL_ActorSelect(), CL_ActorStateChange(), CL_DoEndRound(), CL_RecalcRouting(), and LE_DoEndPathMove().

◆ CL_ActorConfirmAction()

void CL_ActorConfirmAction ( le_t * le)
static

Performs pending actions for the given actor

Parameters
leThe actor that should perform the pending actions

Definition at line 2476 of file cl_actor.cpp.

References le_t::actorMode, cl, CL_ActorShoot(), CL_ActorStartMove(), M_PEND_FIRE_L, M_PEND_FIRE_R, M_PEND_MOVE, le_t::mousePendPos, le_t::pnum, and le_t::team.

Referenced by CL_ActorConfirmAction_f().

◆ CL_ActorConfirmAction_f()

void CL_ActorConfirmAction_f ( void )
static

Executes "pending" actions such as walking and firing.

Note
Manually triggered by the player when hitting the "confirm" button.
When triggering this twice in 1000ms all pending actions are performed, otherwise only the current selected actor is handled.

Definition at line 2504 of file cl_actor.cpp.

References cl, CL_ActorConfirmAction(), cls, LE_GetNextInUse(), LE_IsLivingActor(), LE_IsStunned, selActor, and le_t::team.

Referenced by ACTOR_InitStartup().

◆ CL_ActorFireModeActivated()

bool CL_ActorFireModeActivated ( const actorModes_t mode)

Checks whether we are in fire mode or node.

Parameters
modeThe actor mode
Returns
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().

◆ CL_ActorGetChr()

◆ CL_ActorGetClosest()

le_t * CL_ActorGetClosest ( const vec3_t origin,
int team )

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_t::origin, le_t::team, and VectorDist.

Referenced by CL_SoundEvent().

◆ CL_ActorGetContainerForReload()

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.

Parameters
ammoItemThe inventory list that can be used outside of this function for the found ammo
invThe inventory to do the search in
weaponThe weapon to reload
Returns
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_t::isLoadableInWeapon(), and NONE.

Referenced by CL_ActorReload(), and HUD_CalcReloadTime().

◆ CL_ActorGetFromCharacter()

le_t * CL_ActorGetFromCharacter ( const character_t * chr)

Returns the local entity information for a character in the team list.

Parameters
[in]chrThe character to search the local entity for.
Returns
A pointer to a le_t struct.

Definition at line 141 of file cl_actor.cpp.

References cl, i, and character_t::ucn.

◆ CL_ActorGetNumber()

int CL_ActorGetNumber ( const le_t * le)

Returns the number of the actor in the teamlist.

Parameters
[in]leThe actor to search.
Returns
The number of the actor in the teamlist. Or -1 if the given entity is not in the team list.

Definition at line 125 of file cl_actor.cpp.

References cl.

Referenced by CL_ActorAddToTeamList(), CL_ActorSelect(), CL_ActorWound(), and HUD_UpdateActorStats().

◆ CL_ActorGetReactionFireFireDef()

const fireDef_t * CL_ActorGetReactionFireFireDef ( const le_t * shooter)
Parameters
[in]shooterThe local entity to get the reaction fire firedef from
Returns
The current selected firedef for reaction fire or nullptr if there is none

Definition at line 171 of file cl_actor.cpp.

References CL_ActorGetChr(), Item::getFiredefs(), FiremodeSettings::getFmIdx(), FiremodeSettings::getHand(), le_t::getHandItem(), MAX_FIREDEFS_PER_WEAPON, and character_t::RFmode.

Referenced by CL_ActorIsReactionFireOutOfRange(), and CL_ActorReactionFireAddTarget().

◆ CL_ActorInjuryModifier()

float CL_ActorInjuryModifier ( const le_t * le,
const modifier_types_t type )

◆ CL_ActorInvMove()

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.

Parameters
leThe le that is doing the inventory move (an actor)
fromContainerThe container to fetch the item from
fromXThe x position in the container to get the item from
fromYThe y position in the container to get the item from
toContainerThe container to store the item in
toXThe x position in the container to move the item to
toYThe 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_t::entnum, GAME_GetChrMaxLoad(), Inventory::getItemAtPos(), le_t::inv, INVDEF, LE_IsActor(), MSG_Write_PA(), PA_INVMOVE, and UI_Popup().

Referenced by CL_ActorReload(), and uiContainerNode::onDndFinished().

◆ CL_ActorIsReactionFireOutOfRange()

bool CL_ActorIsReactionFireOutOfRange ( const le_t * shooter,
const le_t * target )
Parameters
[in]shooterThe local entity to get the reaction fire definition for the range check for
[in]targetThe target to calculate the distance to
Returns
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_t::origin, fireDef_t::range, and VectorDist.

Referenced by CL_ActorReactionFireTargetUpdate().

◆ CL_ActorMaximumMove()

void CL_ActorMaximumMove ( const pos3_t to,
const le_t * le,
pos3_t pos )
static

Return the last position we can walk to with a defined amount of TUs.

Parameters
[in]toThe location we want to reach.
[in]lePointer to an actor for which we check maximum move.
[in,out]posThe location we can reach with the given amount of TUs.
See also
CL_TraceMove (similar algo.)

Definition at line 816 of file cl_actor.cpp.

References cl, CL_ActorMoveLength(), CL_ActorUsableTUs(), Grid_MoveNext(), LE_IsCrouched, length, PosSubDV, ROUTING_NOT_REACHABLE, ROUTING_UNREACHABLE, and VectorCopy.

Referenced by CL_ActorStartMove().

◆ CL_ActorMouseTrace()

bool CL_ActorMouseTrace ( void )

Battlescape cursor positioning.

Note
Sets global var mouseActor to current selected le
See also
IN_Parse CL_GetWorldCoordsUnderMouse
Todo
Shouldn't we check the return value of CM_TestLineDM here - maybe we don't have to do the second Grid_Fall call at all and can save a lot of traces

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, CM_EntTestLineDM(), CURSOR_OFFSET, Grid_Fall(), interactEntity, LE_IsActor(), MAP_SIZE_OFFSET, ModelFloorToQuant, mouseActor, mouseLastPos, mousePos, PATHFINDING_HEIGHT, PosToVec, SCR_ChangeCursor(), selActor, TL_FLAG_ACTORCLIP, truePos, UNIT_HEIGHT, VecToPos, VectorCompare, and VectorCopy.

Referenced by IN_Parse().

◆ CL_ActorMoveLength()

byte CL_ActorMoveLength ( const le_t * le,
const pos3_t to )
static

Get the real move length (depends on crouch-state of the current actor).

Note
The part of the line that is not reachable in this turn (i.e. not enough
TUs left) will be drawn differently.
Parameters
[in]toThe position in the map to calculate the move-length for.
[in]lePointer to actor for which we calculate move lenght.
Returns
The amount of TUs that are needed to walk to the given grid position

Definition at line 737 of file cl_actor.cpp.

References cl, CL_ActorInjuryModifier(), cl_autostand, Grid_MoveLength(), Grid_MoveNext(), Grid_ShouldUseAutostand(), LE_IsCrouched, length, MODIFIER_MOVEMENT, PosSubDV, ROUTING_NOT_REACHABLE, ROUTING_UNREACHABLE, TU_CROUCH, and VectorCopy.

Referenced by CL_ActorMaximumMove(), CL_ActorResetMoveLength(), CL_ActorStartMove(), CL_ActorTraceMove(), and CL_AddPathingBox().

◆ CL_ActorMoveMode()

int CL_ActorMoveMode ( const le_t * le)

Decide how the actor will walk, taking into account autostanding.

Parameters
[in]lePointer to an actor for which we set the moving mode.

Definition at line 102 of file cl_actor.cpp.

References cl, cl_autostand, le_t::fieldSize, Grid_ShouldUseAutostand(), LE_IsCrouched, mousePos, le_t::pos, RT_CanActorStandHere(), WALKTYPE_AUTOSTAND_BEING_USED, WALKTYPE_AUTOSTAND_BUT_NOT_FAR_ENOUGH, WALKTYPE_CROUCH_WALKING, and WALKTYPE_WALKING.

Referenced by HUD_UpdateActorMove().

◆ CL_ActorMoveMouse()

void CL_ActorMoveMouse ( void )
static

handle select or action clicking in either move mode

See also
CL_ActorSelectMouse
CL_ActorActionMouse

Definition at line 1161 of file cl_actor.cpp.

References CL_ActorSetMode(), CL_ActorStartMove(), cl_worldlevel, cls, confirm_actions, M_PEND_MOVE, mousePos, selActor, VectorCompare, and VectorCopy.

Referenced by CL_ActorSelectMouse().

◆ CL_ActorNext_f()

void CL_ActorNext_f ( void )
static

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().

◆ CL_ActorPlaySound()

void CL_ActorPlaySound ( const le_t * le,
actorSound_t soundType )

Plays various sounds on actor action.

Parameters
[in]leThe actor
[in]soundTypeType 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_t::gender, teamDef_t::getActorSound(), le_t::origin, S_LoadAndPlaySample(), SND_VOLUME_DEFAULT, SOUND_ATTN_IDLE, and le_t::teamDef.

Referenced by CL_ActorDie(), CL_ActorShootHidden(), CL_ActorStateChange(), LE_AddProjectile(), and LET_Projectile().

◆ CL_ActorPrev_f()

void CL_ActorPrev_f ( void )
static

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().

◆ CL_ActorReload()

void CL_ActorReload ( le_t * le,
containerIndex_t containerID )

Reload weapon with actor.

Parameters
[in,out]leThe actor to reload the weapon for
[in]containerIDThe container to reload
See also
CL_ActorCheckAction

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_t::inv, Item::isHeldTwoHanded(), objDef_t::isReloadable(), and NONE.

Referenced by HUD_ReloadLeft_f(), and HUD_ReloadRight_f().

◆ CL_ActorRemoveFromTeamList()

void CL_ActorRemoveFromTeamList ( le_t * le)

Removes an actor (from your team) from the team list.

See also
CL_ActorStateChange
CL_ActorAddToTeamList
Parameters
[in,out]lePointer 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, and UI_ExecuteConfunc().

Referenced by CL_ActorDie(), and CL_ActorStateChange().

◆ CL_ActorReservedTUs()

int CL_ActorReservedTUs ( const le_t * le,
const reservation_types_t type )

Returns the amount of reserved TUs for a certain type.

Parameters
[in]leThe actor to check.
[in]typeThe 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.
Returns
The reserved TUs for the given type.
-1 on error.

Definition at line 214 of file cl_actor.cpp.

References CL_ActorGetChr(), Com_DPrintf(), chrReservations_t::crouch, DEBUG_CLIENT, chrReservations_t::reaction, RES_ALL, RES_ALL_ACTIVE, RES_CROUCH, RES_REACTION, RES_SHOT, character_t::reservedTus, chrReservations_t::shot, le_t::state, STATE_REACTION, and type.

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().

◆ CL_ActorReserveTUs()

void CL_ActorReserveTUs ( const le_t * le,
const reservation_types_t type,
const int tus )

Replace the reserved TUs for a certain type.

Parameters
[in]leThe actor to change it for.
[in]typeThe reservation type to be changed (i.e be replaced).
[in]tusHow many TUs to set.

Definition at line 273 of file cl_actor.cpp.

References CL_ActorGetChr(), chrReservations_t::crouch, le_t::entnum, MSG_Write_PA(), PA_RESERVE_STATE, RES_CROUCH, RES_REACTION, RES_SHOT, character_t::reservedTus, chrReservations_t::shot, and type.

Referenced by CL_ActorStateChange(), HUD_SetShootReservation(), and HUD_ToggleCrouchReservation_f().

◆ CL_ActorResetMoveLength()

void CL_ActorResetMoveLength ( le_t * le)

Recalculates the currently selected Actor's move length.

Parameters
[in,out]lePointer to actor for which we reset move lenght.

Definition at line 764 of file cl_actor.cpp.

References le_t::actorMoveLength, CL_ActorMoveLength(), and mousePos.

Referenced by CL_ActorConditionalMoveCalc(), CL_ActorMouseTrace(), and CL_ActorStats().

◆ CL_ActorSelect()

◆ CL_ActorSelect_f()

void CL_ActorSelect_f ( void )
static

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().

◆ CL_ActorSelectList()

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

Parameters
numThe index value from the list of actors
See also
CL_ActorSelect
Returns
true if selection was possible otherwise false

Definition at line 506 of file cl_actor.cpp.

References cl, CL_ActorSelect(), Cvar_SetValue(), LE_CenterView(), and le_t::pos.

Referenced by CL_ActorAddToTeamList(), CL_ActorSelect_f(), CL_ActorSelectNext(), and CL_ActorSelectPrev().

◆ CL_ActorSelectMouse()

◆ CL_ActorSelectNext()

bool CL_ActorSelectNext ( void )

selects the next actor

Definition at line 527 of file cl_actor.cpp.

References cl, CL_ActorSelectList(), i, le_t::inuse, LE_IsDead, and LE_IsSelected.

Referenced by CL_ActorNext_f().

◆ CL_ActorSelectPrev()

bool CL_ActorSelectPrev ( void )

selects the previous actor

Definition at line 558 of file cl_actor.cpp.

References cl, CL_ActorSelectList(), i, le_t::inuse, LE_IsDead, and LE_IsSelected.

Referenced by CL_ActorPrev_f().

◆ CL_ActorSetFireDef()

void CL_ActorSetFireDef ( le_t * actor,
const fireDef_t * fd )

Definition at line 91 of file cl_actor.cpp.

References le_t::fd, and mousePosTargettingAlign.

Referenced by HUD_UpdateActorFireMode().

◆ CL_ActorSetMode()

◆ CL_ActorShoot()

void CL_ActorShoot ( const le_t * le,
const pos3_t at )

◆ CL_ActorStandCrouch_f()

void CL_ActorStandCrouch_f ( void )
static

◆ CL_ActorStartMove()

◆ CL_ActorTargetAlign_f()

void CL_ActorTargetAlign_f ( void )

Targets to the ground when holding the assigned button.

See also
mousePosTargettingAlign

Definition at line 1924 of file cl_actor.cpp.

References CL_ActorFireModeActivated(), Cmd_Argc(), Cmd_Argv(), GROUND_DELTA, mousePosTargettingAlign, and selActor.

Referenced by CL_InitLocal().

◆ CL_ActorTimeForFireDef()

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.

Parameters
[in]leThe actor.
[in]fdThe fire definition.
[in]reactionWhether this is a normal or reaction fire shot.
Returns
The TUs needed for the fireDef for this actor.

Definition at line 342 of file cl_actor.cpp.

References CL_ActorInjuryModifier(), MODIFIER_REACTION, MODIFIER_SHOOTING, and fireDef_t::time.

Referenced by HUD_CheckFiremodeReservation(), HUD_DisplayFiremodeEntry(), HUD_FireWeapon_f(), HUD_PopupFiremodeReservation(), HUD_ReactionFireGetTUs(), and HUD_UpdateActorFireMode().

◆ CL_ActorTraceMove()

bool CL_ActorTraceMove ( const pos3_t to)
static

Draws the way to walk when confirm actions is activated.

Parameters
[in]toThe location we draw the line to (starting with the location of selActor)
Returns
true if everything went ok, otherwise false.
See also
CL_MaximumMove (similar algo.)
CL_AddTargetingBox

Definition at line 776 of file cl_actor.cpp.

References cl, CL_ActorMoveLength(), CL_ActorUsableTUs(), CL_ParticleSpawn(), Grid_MoveNext(), Grid_PosToVec(), LE_IsCrouched, length, PosSubDV, ROUTING_NOT_REACHABLE, ROUTING_UNREACHABLE, selActor, and VectorCopy.

Referenced by CL_AddTargeting().

◆ CL_ActorTurnMouse()

void CL_ActorTurnMouse ( void )

◆ CL_ActorUpdate_f()

void CL_ActorUpdate_f ( void )
static

Update the skin of the current soldier.

Definition at line 2320 of file cl_actor.cpp.

References chrDisplayList, cl_selected, CL_UpdateCharacterValues(), i, and LIST_Foreach.

Referenced by ACTOR_InitStartup().

◆ CL_ActorUsableTUs()

int CL_ActorUsableTUs ( const le_t * le)

◆ CL_ActorUse()

void CL_ActorUse ( const le_t * le)
static

Uses the current selected entity in the battlescape. Can e.g. open the selected door.

See also
G_ClientUseEdict

Definition at line 1027 of file cl_actor.cpp.

References CL_ActorCheckAction(), le_t::clientAction, Com_DPrintf(), DEBUG_CLIENT, le_t::entnum, MSG_Write_PA(), and PA_USE.

Referenced by CL_ActorSelectMouse(), and CL_ActorUse_f().

◆ CL_ActorUse_f()

void CL_ActorUse_f ( void )
static

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_t::clientAction, Com_DPrintf(), DEBUG_CLIENT, le_t::entnum, LE_IsDoor, selActor, and TU_DOOR_ACTION.

Referenced by ACTOR_InitStartup().

◆ CL_ActorUseHeadgear_f()

void CL_ActorUseHeadgear_f ( void )
static

Toggles the headgear for the current selected player.

Todo
make this a variable somewhere?

Definition at line 1124 of file cl_actor.cpp.

References CL_ActorCheckAction(), CL_ActorSetMode(), CL_ActorShoot(), IN_GetMouseSpace, IN_SetMouseSpace(), M_FIRE_HEADGEAR, M_MOVE, MS_WORLD, and selActor.

Referenced by ACTOR_InitStartup().

◆ CL_ActorVis()

bool CL_ActorVis ( const le_t * le,
const le_t * check )
static
See also
G_ActorVis
Parameters
[in]leThe local entity to do the check for
[in]checkThe local entity to check the visibility for
Returns
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, i, LE_IsCrouched, LE_IsDead, MASK_SOLID, le_t::origin, PLAYER_CROUCH, PLAYER_DEAD, PLAYER_MIN, PLAYER_STAND, tr, VectorCopy, VectorMA(), and VectorNormalize().

Referenced by CL_NextAlienVisibleFromActor_f().

◆ CL_AddActor()

bool CL_AddActor ( le_t * le,
entity_t * ent )

Adds an actor to the render entities with all it's models and items.

Parameters
[in]leThe local entity to get the values from
[in]entThe body entity used in the renderer
See also
CL_AddUGV
LE_AddToScene
CL_ActorAppear
Note
Called via addfunc for each local entity in every frame

Add actor special effects. Only draw blood if the actor is dead or (if stunned) was damaged more than half its maximum HPs.

Todo
Better value for this?

Definition at line 1515 of file cl_actor.cpp.

References entity_t::alpha, le_t::alpha, cl, CL_AddActorWeapon(), CL_ParticleSpawn(), cl_showactors, cls, Com_Error(), teamDef_t::deathTextureName, ERR_DROP, entity_t::flags, le_t::headSkin, le_t::HP, i, it_effect, LE_IsDead, LE_IsSelected, LE_IsStunned, le_t::left, le_t::maxHP, entity_t::model, le_t::model1, le_t::model2, le_t::origin, PATHFINDING_HEIGHT, le_t::pnum, le_t::pos, le_t::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_t::right, entity_t::skinnum, entity_t::tagent, entity_t::tagname, le_t::team, TEAM_CIVILIAN, le_t::teamDef, and entity_t::texture.

Referenced by CL_ActorAppear().

◆ CL_AddActorPathing()

void CL_AddActorPathing ( void )

Adds an actor pathing marker to the current floor when we render the world.

See also
CL_ViewRender Draws the tracer (red, yellow, green box) on the grid

Definition at line 2109 of file cl_actor.cpp.

References CL_AddPathingBox(), cl_worldlevel, i, PATHFINDING_WIDTH, and selActor.

Referenced by CL_ViewRender().

◆ CL_AddActorWeapon()

bool CL_AddActorWeapon ( int objID)
inlinestatic

Checks whether a weapon should be added to the entity's hand.

Parameters
[in]objIDThe item id that the actor is holding in his hand (le->left or le->right)
Returns
true if the weapon is a valid item and false if it's a dummy item or the actor has nothing in the given hand

Definition at line 1495 of file cl_actor.cpp.

References INVSH_GetItemByIDX(), objDef_t::isVirtual, and NONE.

Referenced by CL_AddActor().

◆ CL_AddArrow()

void CL_AddArrow ( vec3_t from,
vec3_t to,
float red,
float green,
float blue )
static

create an arrow between from and to with the specified color ratios

Definition at line 2147 of file cl_actor.cpp.

References entity_t::alpha, entity_t::color, green, entity_t::oldorigin, entity_t::origin, R_AddEntity(), red, RF_ARROW, VectorCopy, and VectorSet.

Referenced by CL_DisplayFloorArrows(), and CL_DisplayObstructionArrows().

◆ CL_AddPathing()

void CL_AddPathing ( void )

Adds a pathing marker to the current floor when we render the world.

See also
CL_ViewRender Draws the tracer (red, yellow, green box) on the grid

Definition at line 2089 of file cl_actor.cpp.

References CL_AddPathingBox(), cl_worldlevel, mousePos, PATHFINDING_WIDTH, and selActor.

Referenced by CL_ViewRender().

◆ CL_AddPathingBox()

◆ CL_AddTargeting()

void CL_AddTargeting ( void )

◆ CL_AddTargetingBox()

◆ CL_BattlescapeMouseDragging()

void CL_BattlescapeMouseDragging ( void )

Scroll battlescape touchscreen-style, by clicking and dragging away.

Definition at line 1467 of file cl_actor.cpp.

References cl, CL_GetWorldCoordsUnderMouse(), Cvar_SetValue(), mouseDraggingPos, truePos, VectorMA(), and VectorSubtract.

Referenced by CL_ProcessMouseDragging().

◆ CL_BuildForbiddenList()

void CL_BuildForbiddenList ( void )
static

Builds a list of locations that cannot be moved to (client side).

See also
G_MoveCalc
G_BuildForbiddenList <- server side
Grid_CheckForbidden
Note
This is used for pathfinding. It is a list of where the selected unit can not move to because others are standing there already.

Definition at line 612 of file cl_actor.cpp.

References ET_ACTOR2x2, le_t::fieldSize, forbiddenList, LE_GetNextInUse(), LE_IsInvisible, LE_IsLivingAndVisibleActor(), LE_IsStunned, le_t::pos, and le_t::type.

Referenced by CL_ActorConditionalMoveCalc().

◆ CL_DisplayFloorArrows()

void CL_DisplayFloorArrows ( void )

Useful for debugging pathfinding.

Definition at line 2166 of file cl_actor.cpp.

References ACTOR_GET_FIELDSIZE, cl, CL_AddArrow(), Grid_PosToVec(), QUANT, selActor, truePos, and VectorCopy.

Referenced by CL_ViewRender().

◆ CL_DisplayObstructionArrows()

void CL_DisplayObstructionArrows ( void )

Useful for debugging pathfinding.

Definition at line 2180 of file cl_actor.cpp.

References ACTOR_GET_FIELDSIZE, cl, CL_AddArrow(), Grid_PosToVec(), selActor, truePos, and VectorCopy.

Referenced by CL_ViewRender().

◆ CL_GetWorldCoordsUnderMouse()

void CL_GetWorldCoordsUnderMouse ( vec3_t groundIntersection,
vec3_t upperTracePoint,
vec3_t lowerTracePoint )

Get battlescape cell position under mouse cursor.

Note
The returned position might be out of world boundaries, or under the ground etc.
Parameters
[out]groundIntersectionPoint on the ground under the mouse cursor, in the world coordinates
[out]upperTracePointPoint in the sky under the mouse cursor, in the world coordinates
[out]lowerTracePointPoint below the ground under the mouse cursor, at the world boundary
See also
CL_ActorMouseTrace

Definition at line 1290 of file cl_actor.cpp.

References cl, cl_isometric, cl_worldlevel, CM_EntTestLineDM(), CURSOR_OFFSET, DotProduct, M_PI, mousePosX, mousePosY, refdef, TL_FLAG_ACTORCLIP, UNIT_HEIGHT, VectorAdd, VectorCopy, VectorMA(), VectorScale, VectorSet, VectorSubtract, and viddef.

Referenced by CL_ActorMouseTrace(), CL_BattlescapeMouseDragging(), and CL_InitBattlescapeMouseDragging().

◆ CL_InitBattlescapeMouseDragging()

void CL_InitBattlescapeMouseDragging ( void )

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().

◆ CL_NextAlien_f()

void CL_NextAlien_f ( void )
static

◆ CL_NextAlienVisibleFromActor_f()

void CL_NextAlienVisibleFromActor_f ( void )
static

Cycles between visible (to selected actor) aliens.

See also
CL_NextAlien_f

Definition at line 2391 of file cl_actor.cpp.

References cl, CL_ActorVis(), CL_ParticleSpawn(), CL_ViewCenterAtGridPosition(), cls, i, le_t::inuse, LE_IsCivilian, LE_IsLivingAndVisibleActor(), le_t::origin, le_t::pos, selActor, and le_t::team.

Referenced by ACTOR_InitStartup().

◆ CL_PrevAlien_f()

void CL_PrevAlien_f ( void )
static

Cycles between visible aliens in reverse direction.

See also
CL_NextAlienVisibleFromActor_f

Definition at line 2449 of file cl_actor.cpp.

References cl, CL_ViewCenterAtGridPosition(), cls, Cvar_GetInteger(), Cvar_SetValue(), i, le_t::inuse, LE_IsLivingAndVisibleActor(), le_t::pos, le_t::team, and TEAM_CIVILIAN.

Referenced by ACTOR_InitStartup().

◆ CL_TargetingGrenade()

void CL_TargetingGrenade ( const pos3_t fromPos,
actorSizeEnum_t fromActorSize,
const pos3_t toPos )
static

Shows targeting for a grenade.

Parameters
[in]fromPosThe (grid-) position of the aiming actor.
[in]fromActorSizeThe size of the aiming actor (1 for 1x1 or 2 for 2x2).
[in]toPosThe (grid-) position of the target (mousePos or mousePendPos).
See also
CL_TargetingStraight
Todo
character strength should be used here, too the stronger the character, the further the throw

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_t::fieldSize, GRAVITY, GRENADE_PARTITIONS, Grid_PosToVec(), GROUND_DELTA, i, LE_IsCrouched, LE_IsInvisible, MASK_SHOT, mousePosTargettingAlign, selActor, tr, Vector2Compare, VectorAdd, VectorCompare, VectorCopy, VectorLength(), VectorScale, and VectorSubtract.

Referenced by CL_AddTargeting().

◆ CL_TargetingRadius()

void CL_TargetingRadius ( const vec3_t center,
const float radius )
static

Show weapon radius.

Parameters
[in]centerThe center of the circle
[in]radiusThe radius of the damage circle

Definition at line 1637 of file cl_actor.cpp.

References CL_ParticleSpawn(), and ptl_t::size.

Referenced by CL_TargetingGrenade(), and CL_TargetingStraight().

◆ CL_TargetingStraight()

void CL_TargetingStraight ( const pos3_t fromPos,
actorSizeEnum_t fromActorSize,
const pos3_t toPos )
static

Draws line to target.

Parameters
[in]fromPosThe (grid-) position of the aiming actor.
[in]fromActorSizeThe size of the aiming actor (1 for 1x1 or 2 for 2x2).
[in]toPosThe (grid-) position of the target.
See also
CL_TargetingGrenade
CL_AddTargeting
CL_Trace
G_ShootSingle
Todo
is this really needed for straight targetting? - for grenades, yes, but not for straight no? cl_worldlevel->integer should be enough here
Todo
is this really needed for straight targetting? - for grenades, yes, but not for straight no? cl_worldlevel->integer should be enough here

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_t::fieldSize, Grid_PosToVec(), LE_IsCivilian, LE_IsCrouched, LE_IsInvisible, MASK_SHOT, mousePosTargettingAlign, selActor, tr, UNIT_SIZE, VectorCompare, VectorCopy, VectorDist, VectorDistSqr, VectorMA(), VectorNormalize(), and VectorSubtract.

Referenced by CL_AddTargeting().

◆ MSG_Write_PA()

void MSG_Write_PA ( player_action_t playerAction,
int entnum,
... )

Writes player action with its data.

Parameters
[in]playerActionType of action.
[in]entnumThe 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(), 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().

Variable Documentation

◆ boxShift

const vec3_t boxShift = { PLAYER_WIDTH, PLAYER_WIDTH, UNIT_HEIGHT / 2 - DIST_EPSILON }
static

Definition at line 2037 of file cl_actor.cpp.

Referenced by CL_AddPathingBox().

◆ cl_autostand

cvar_t* cl_autostand
static

Player preference: should the server make guys stand for long walks, to save TU.

Definition at line 45 of file cl_actor.cpp.

Referenced by ACTOR_InitStartup(), CL_ActorMoveLength(), and CL_ActorMoveMode().

◆ cl_showactors

cvar_t* cl_showactors
static

Definition at line 46 of file cl_actor.cpp.

Referenced by ACTOR_InitStartup(), CL_AddActor(), and CL_AddTargetingBox().

◆ confirm_actions

cvar_t* confirm_actions
static

Confirm actions in tactical mode - valid values are 0, 1 and 2.

Definition at line 43 of file cl_actor.cpp.

Referenced by ACTOR_InitStartup(), CL_ActorMoveMouse(), and CL_ActorSelectMouse().

◆ forbiddenList

forbiddenList_t forbiddenList
static

A list of locations that cannot be moved to.

Note
Pointer to le->pos or edict->pos followed by le->fieldSize or edict->fieldSize
See also
CL_BuildForbiddenList

Definition at line 602 of file cl_actor.cpp.

Referenced by CL_ActorConditionalMoveCalc(), CL_BuildForbiddenList(), G_BuildForbiddenList(), G_FindPath(), G_MoveCalcLocal(), Grid_FindPath(), SV_GridCalcPathing(), SV_GridFindPath(), and TEST_F().

◆ halfBoxSize

const vec3_t halfBoxSize = { BOX_DELTA_WIDTH, BOX_DELTA_LENGTH, BOX_DELTA_HEIGHT }
static

field marker box

See also
ModelOffset

Definition at line 1825 of file cl_actor.cpp.

Referenced by CL_AddTargetingBox().

◆ interactEntity

le_t* interactEntity
static

Definition at line 65 of file cl_actor.cpp.

Referenced by CL_ActorMouseTrace(), and CL_ActorSelectMouse().

◆ mouseActor

le_t* mouseActor
static

Definition at line 64 of file cl_actor.cpp.

Referenced by CL_ActorMouseTrace(), CL_ActorSelectMouse(), and CL_AddTargetingBox().

◆ mouseDraggingPos

vec3_t mouseDraggingPos
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().

◆ mouseLastPos

pos3_t mouseLastPos
static

Definition at line 66 of file cl_actor.cpp.

Referenced by CL_ActorMouseTrace().

◆ mousePos

◆ mousePosTargettingAlign

int mousePosTargettingAlign = 0
static

If you want to change the z level of targeting and shooting, use this value. Negative and positive offsets are possible.

See also
CL_ActorTargetAlign_f
G_ClientShoot
G_ShootGrenade
G_ShootSingle

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().

◆ selActor

◆ truePos

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().