|
UFO: Alien Invasion
|

Go to the source code of this file.
Macros | |
| #define | CURSOR_OFFSET UNIT_HEIGHT * 0.4 |
| #define | EYE_HT_STAND UNIT_HEIGHT * 0.25 |
| #define | EYE_HT_CROUCH UNIT_HEIGHT * 0.06 |
| #define | ACTOR_GET_FIELDSIZE(actor) |
Enumerations | |
| enum | walkType_t { WALKTYPE_AUTOSTAND_BUT_NOT_FAR_ENOUGH , WALKTYPE_AUTOSTAND_BEING_USED , WALKTYPE_WALKING , WALKTYPE_CROUCH_WALKING , WALKTYPE_MAX } |
Functions | |
| void | MSG_Write_PA (player_action_t player_action, int num,...) |
| Writes player action with its data. | |
| void | ACTOR_InitStartup (void) |
| int | CL_ActorCheckAction (const le_t *le) |
| Checks that an action is valid. | |
| 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_t * | CL_ActorGetFromCharacter (const character_t *chr) |
| Returns the local entity information for a character in the team list. | |
| character_t * | CL_ActorGetChr (const le_t *le) |
| Returns the character information for an actor in the teamlist. | |
| int | CL_ActorUsableTUs (const le_t *le) |
| Returns the amount of usable (overall-reserved) TUs for an actor. | |
| int | CL_ActorReservedTUs (const le_t *le, reservation_types_t type) |
| Returns the amount of reserved TUs for a certain type. | |
| void | CL_ActorReserveTUs (const le_t *le, reservation_types_t type, int tus) |
| Replace the reserved TUs for a certain type. | |
| bool | CL_ActorIsReactionFireOutOfRange (const le_t *shooter, const le_t *target) |
| const fireDef_t * | CL_ActorGetReactionFireFireDef (const le_t *shooter) |
| int | CL_ActorMoveMode (const le_t *le) |
| Decide how the actor will walk, taking into account autostanding. | |
| void | CL_ActorSetMode (le_t *actor, actorModes_t actorMode) |
| bool | CL_ActorFireModeActivated (const actorModes_t mode) |
| Checks whether we are in fire mode or node. | |
| void | CL_ActorConditionalMoveCalc (le_t *le) |
| Recalculate forbidden list, available moves and actor's move length for the current selected actor. | |
| le_t * | CL_ActorGetClosest (const vec3_t origin, int team) |
| Returns the actor that is closest to the given origin. | |
| 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 | |
| void | CL_ActorAddToTeamList (le_t *le) |
| Adds the actor to the team list. | |
| void | CL_ActorRemoveFromTeamList (le_t *le) |
| Removes an actor (from your team) from the team list. | |
| void | CL_ActorCleanup (le_t *le) |
| void | CL_ActorSelectMouse (void) |
| Selects an actor using the mouse. | |
| void | CL_ActorReload (le_t *le, containerIndex_t containerID) |
| Reload weapon with actor. | |
| void | CL_ActorTurnMouse (void) |
| Turns the actor around without moving. | |
| 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 **ic, const Inventory *inv, const objDef_t *weapon) |
| Searches the clip with the least TU usage to put it into the weapon. | |
| void | CL_ActorPlaySound (const le_t *le, actorSound_t soundType) |
| Plays various sounds on actor action. | |
| 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=false) |
| Find the TUs needed for the given fireDef taking into account the actor wound penalties. | |
| void | CL_ActorActionMouse (void) |
| initiates action with mouse. | |
| void | CL_ActorSetFireDef (le_t *actor, const fireDef_t *fd) |
| void | CL_NextRound_f (void) |
| void | CL_ResetMouseLastPos (void) |
| void | CL_ActorResetMoveLength (le_t *le) |
| Recalculates the currently selected Actor's move length. | |
| bool | CL_ActorMouseTrace (void) |
| Battlescape cursor positioning. | |
| void | CL_GetWorldCoordsUnderMouse (vec3_t groundIntersection, vec3_t upperTracePoint, vec3_t lowerTracePoint) |
| Get battlescape cell position under mouse cursor. | |
| 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. | |
| bool | CL_AddActor (le_t *le, entity_t *ent) |
| Adds an actor to the render entities with all it's models and items. | |
| bool | CL_AddUGV (le_t *le, entity_t *ent) |
| Adds an UGV to the render entities. | |
| int | CL_ActorGetNumber (const le_t *le) |
| Returns the number of the actor in the teamlist. | |
| void | CL_AddTargeting (void) |
| Adds a target cursor when we render the world. | |
| 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_ActorTargetAlign_f (void) |
| Targets to the ground when holding the assigned button. | |
| void | CL_DisplayFloorArrows (void) |
| Useful for debugging pathfinding. | |
| void | CL_DisplayObstructionArrows (void) |
| Useful for debugging pathfinding. | |
Variables | |
| le_t * | selActor |
| pos3_t | truePos |
| pos3_t | mousePos |
| #define ACTOR_GET_FIELDSIZE | ( | actor | ) |
Definition at line 48 of file cl_actor.h.
Referenced by CL_ActorMouseTrace(), CL_AddPathingBox(), CL_DisplayFloorArrows(), CL_DisplayObstructionArrows(), and HUD_MapDebugCursor().
| #define CURSOR_OFFSET UNIT_HEIGHT * 0.4 |
Definition at line 28 of file cl_actor.h.
Referenced by CL_ActorMouseTrace(), and CL_GetWorldCoordsUnderMouse().
| #define EYE_HT_CROUCH UNIT_HEIGHT * 0.06 |
Definition at line 32 of file cl_actor.h.
Referenced by CL_DrawLineOfSight().
| #define EYE_HT_STAND UNIT_HEIGHT * 0.25 |
Definition at line 30 of file cl_actor.h.
Referenced by CL_DrawLineOfSight().
| enum walkType_t |
| Enumerator | |
|---|---|
| WALKTYPE_AUTOSTAND_BUT_NOT_FAR_ENOUGH | |
| WALKTYPE_AUTOSTAND_BEING_USED | |
| WALKTYPE_WALKING | |
| WALKTYPE_CROUCH_WALKING | |
| WALKTYPE_MAX | |
Definition at line 35 of file cl_actor.h.
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_autostand, CL_NextAlien_f(), CL_NextAlienVisibleFromActor_f(), CL_PrevAlien_f(), cl_showactors, Cmd_AddCommand(), confirm_actions, 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 CL_ActorFireModeActivated(), CL_ActorSetMode(), IN_GetMouseSpace, M_MOVE, MS_WORLD, and selActor.
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, le_t::pnum, le_t::team, 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(), 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().
Definition at line 389 of file cl_actor.cpp.
References cls, and le_t::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_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().
| 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 cl, LIST_Foreach, and le_t::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_t::origin, le_t::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_t::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, and character_t::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.
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_t::getHandItem(), MAX_FIREDEFS_PER_WEAPON, and character_t::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_t::bodyTemplate, CL_ActorGetChr(), CL_ActorInjuryModifier(), Com_Printf(), le_t::maxHP, MODIFIER_ACCURACY, MODIFIER_MOVEMENT, MODIFIER_REACTION, MODIFIER_SHOOTING, BodyData::numBodyParts(), BodyData::penalty(), character_t::teamDef, woundInfo_t::treatmentLevel, type, woundInfo_t::woundLevel, le_t::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_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().
| [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_t::origin, fireDef_t::range, and VectorDist.
Referenced by CL_ActorReactionFireTargetUpdate().
| 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, 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().
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, 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().
| 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_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().
| 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_t::inv, Item::isHeldTwoHanded(), objDef_t::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, 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_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().
| 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_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().
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_t::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_t::clientAction, Com_Error(), Cvar_ForceSet(), ERR_DROP, le_t::inuse, LE_IsDead, LE_IsSelected, LE_SELECTED, mousePosTargettingAlign, le_t::pnum, RDF_IRGOGGLES, refdef, RF_IRGOGGLESSHOT, selActor, le_t::state, UI_ExecuteConfunc(), ui_inventory, and va().
Referenced by CL_ActorRemoveFromTeamList(), CL_ActorSelectList(), CL_ActorSelectMouse(), CL_Reset(), and CL_StartGame().
| 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(), and le_t::pos.
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 CL_ActorMoveMouse(), CL_ActorSelect(), CL_ActorSetMode(), CL_ActorShoot(), CL_ActorUse(), confirm_actions, IN_GetMouseSpace, interactEntity, LE_IsSelected, M_FIRE_L, M_FIRE_R, M_MOVE, M_PEND_FIRE_L, M_PEND_FIRE_R, M_PEND_MOVE, mouseActor, mousePos, MS_WORLD, selActor, 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_t::inuse, LE_IsDead, and LE_IsSelected.
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_t::inuse, LE_IsDead, and LE_IsSelected.
Referenced by CL_ActorPrev_f().
Definition at line 91 of file cl_actor.cpp.
References le_t::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_t::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_t::actorMode, CL_ActorCheckAction(), le_t::currentSelectedFiremode, le_t::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().
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_t::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 CL_ActorFireModeActivated(), Cmd_Argc(), Cmd_Argv(), GROUND_DELTA, mousePosTargettingAlign, and selActor.
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_t::time.
Referenced by HUD_CheckFiremodeReservation(), HUD_DisplayFiremodeEntry(), HUD_FireWeapon_f(), HUD_PopupFiremodeReservation(), HUD_ReactionFireGetTUs(), and HUD_UpdateActorFireMode().
Turns the actor around without moving.
Definition at line 1074 of file cl_actor.cpp.
References AngleToDV, CL_ActorActionMouse(), CL_ActorCheckAction(), CL_ActorFireModeActivated(), CL_ActorUsableTUs(), IN_GetMouseSpace, mousePos, MS_WORLD, MSG_Write_PA(), PA_TURN, selActor, todeg, TU_TURN, and VectorSubtract.
Referenced by CL_TurnDown_f().
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_t::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().
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 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().
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, PATHFINDING_WIDTH, and selActor.
Referenced by CL_ViewRender().
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, mousePos, PATHFINDING_WIDTH, and selActor.
Referenced by CL_ViewRender().
Adds a target cursor when we render the world.
Definition at line 1981 of file cl_actor.cpp.
References CL_ActorSetMode(), CL_ActorTraceMove(), CL_AddTargetingBox(), CL_TargetingGrenade(), CL_TargetingStraight(), cl_worldlevel, IN_GetMouseSpace, M_FIRE_L, M_FIRE_R, M_MOVE, M_PEND_FIRE_L, M_PEND_FIRE_R, M_PEND_MOVE, mousePos, MS_WORLD, and selActor.
Referenced by CL_ViewRender().
Adds an UGV to the render entities.
| [in] | le | The local entity the UGV should be created from |
| [out] | ent |
Definition at line 35 of file cl_ugv.cpp.
References entity_t::alpha, le_t::alpha, le_t::bodySkin, cl, cls, entity_t::flags, LE_IsDead, LE_IsSelected, le_t::left, entity_t::model, le_t::model2, NONE, OBJZERO, le_t::pnum, R_AddEntity(), R_GetFreeEntity(), RF_ACTOR, RF_ALLIED, RF_MEMBER, RF_NEUTRAL, RF_NONE, RF_SELECTED, RF_SHADOW, le_t::right, entity_t::skinnum, entity_t::tagent, entity_t::tagname, le_t::team, and TEAM_CIVILIAN.
Referenced by CL_ActorAppear().
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().
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().
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().
| 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 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().
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().
Referenced by CL_ServerEventsInit().
| 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(), 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().
|
extern |
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().
|
extern |
Definition at line 49 of file cl_actor.cpp.
Referenced by CL_ActorActionMouse(), CL_ActorAppear(), CL_ActorConfirmAction_f(), CL_ActorDie(), CL_ActorMouseTrace(), CL_ActorMoveMouse(), CL_ActorRevitalised(), CL_ActorSelect(), CL_ActorSelectMouse(), CL_ActorStandCrouch_f(), CL_ActorTargetAlign_f(), CL_ActorTraceMove(), CL_ActorTurnMouse(), CL_ActorUse_f(), CL_ActorUseHeadgear_f(), CL_AddActorPathing(), CL_AddPathing(), CL_AddPathingBox(), CL_AddTargeting(), CL_AddTargetingBox(), CL_DisplayFloorArrows(), CL_DisplayObstructionArrows(), CL_DoEndRound(), CL_InvDel(), CL_InvReload(), CL_NextAlienVisibleFromActor_f(), CL_RecalcRouting(), CL_TargetingGrenade(), CL_TargetingStraight(), 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().
|
extern |
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().