26 #include "../client.h"
28 #include "../cgame/cl_game.h"
33 #include "../cl_screen.h"
34 #include "../ui/ui_main.h"
35 #include "../ui/ui_popup.h"
36 #include "../ui/node/ui_node_container.h"
37 #include "../renderer/r_entity.h"
38 #include "../renderer/r_mesh.h"
39 #include "../../common/routing.h"
40 #include "../../common/grid.h"
129 for (
int actorIdx = 0; actorIdx <
cl.
numTeamList; actorIdx++) {
160 if (chr->ucn == le->
ucn)
179 if (weapon ==
nullptr)
183 if (fdArray ==
nullptr)
186 const int fmIdx = fmSetting.
getFmIdx();
203 const bool outOfRange = fd->
range < distance;
232 return reservedReaction + reservedCrouch + reservedShot;
237 return reservedReaction + reservedShot + reservedCrouch;
239 return reservedShot + reservedCrouch;
242 return reservedReaction;
244 return reservedCrouch;
308 for (
int bodyPart = 0; bodyPart < bodyTemplate->
numBodyParts(); ++bodyPart) {
311 if (injury > threshold)
312 mod += 2 * bodyTemplate->
penalty(bodyPart, type) * injury / le->
maxHP;
327 Com_Printf(
"CL_ActorInjuryPenalty: Unused modifier type %i\n", type);
372 if (actorIdx == -1) {
376 Com_Printf(
"Too many actors on the teamlist!\n");
533 for (
int i = 0;
i < num;
i++) {
564 for (
int i = 0;
i < num;
i++) {
616 forbiddenList.
reset();
635 static void CL_DisplayBlockedPaths_f (
void)
664 for (
int j = 0; j < 3; j++) {
696 le_t* closest =
nullptr;
741 const int autostandTU = useAutostand ? 2 *
TU_CROUCH : 0;
750 int dvec, numSteps = 0;
753 PosSubDV(pos, crouchingState, dvec);
795 PosSubDV(pos, crouchingState, dvec);
800 else if (crouchingState)
831 PosSubDV(pos, crouchingState, dvec);
923 if (
INVDEF(container)->out >= tu)
933 tu =
INVDEF(container)->out;
934 bestContainer = container;
939 return bestContainer;
983 if (bestContainer !=
NONE) {
1013 if (item !=
nullptr) {
1016 UI_Popup(
_(
"Warning"),
_(
"This soldier can not carry anything else."));
1209 }
else if (interactEntity) {
1236 if (confirm_actions->
integer == 1) {
1248 if (confirm_actions->
integer == 1) {
1300 vec3_t from, forward, right, up;
1306 float frustumSlope[2];
1307 const float projectionDistance = 2048.0f;
1316 VectorMA(from, projectionDistance, forward, stop);
1317 VectorMA(stop, cur[0] * frustumSlope[0], right, stop);
1318 VectorMA(stop, cur[1] * -frustumSlope[1], up, stop);
1322 VectorMA(stop, -projectionDistance * 2, forward, from);
1341 vec3_t mapNormal, P3, P2minusP1;
1345 const float nDotP2minusP1 =
DotProduct(mapNormal, P2minusP1);
1349 if (nDotP2minusP1 > 0.01 || nDotP2minusP1 < -0.01) {
1353 const float u =
DotProduct(mapNormal, P3minusP1) / nDotP2minusP1;
1360 if (groundIntersection)
1362 if (upperTracePoint)
1364 if (lowerTracePoint)
1409 if (restingLevel < cl_worldlevel->integer) {
1426 testPos[2] = restingLevel;
1430 if (interactLe !=
nullptr &&
LE_IsActor(interactLe)) {
1431 mouseActor = interactLe;
1432 interactEntity =
nullptr;
1433 }
else if (selActor !=
nullptr && selActor->
clientAction == interactLe) {
1434 interactEntity = interactLe;
1435 mouseActor =
nullptr;
1437 interactEntity =
nullptr;
1438 mouseActor =
nullptr;
1441 if (interactEntity !=
nullptr) {
1497 if (objID !=
NONE) {
1526 levelflags |= (1 <<
i);
1533 const int delta = hasTagHead ? 2 : 1;
1535 if (addLeftHandWeapon) {
1539 if (!leftHand.model)
1544 leftHand.tagname =
"tag_lweapon";
1550 if (addRightHandWeapon) {
1553 rightHand.alpha = le->
alpha;
1555 if (!rightHand.model)
1560 rightHand.tagname =
"tag_rweapon";
1570 head.alpha = le->
alpha;
1578 head.tagname =
"tag_head";
1617 const char* deathTextureName;
1618 assert(le->
teamDef !=
nullptr);
1640 if (particle !=
nullptr)
1641 particle->
size[0] = radius;
1656 if (!selActor || !selActor->
fd)
1729 #define GRENADE_PARTITIONS 20
1783 bool obstructed =
false;
1787 next[2] += dt * (vz - 0.5 *
GRAVITY * dt);
1826 #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)
1854 cursor.alpha = 0.6 + 0.2 * sin((
float)
cl.
time / 80);
1858 switch (mouseActor->
team) {
1906 vec3_t increase = { inc, inc, 0};
1907 VectorAdd(cursor.oldorigin, increase, cursor.oldorigin);
1913 cursor.alpha = 0.15;
1927 if (!selActor || !selActor->
fd)
1937 static int currentPos = 0;
1938 switch (currentPos) {
1948 align = -(2 * align);
1959 align = -(2 * align);
2047 if (!addUnreachableCells && TUhave < TUneed)
2073 ent.oldorigin[2] = height;
2074 ent.oldorigin[0] = TUneed;
2075 ent.oldorigin[1] = TUhave;
2091 if (selActor ==
nullptr) {
2111 if (selActor ==
nullptr) {
2193 static void CL_DumpMoveMark_f (
void)
2211 static void CL_DumpTUs_f (
void)
2220 Com_Printf(
"TUs around (%i, %i, %i).\n", pos[0], pos[1], pos[2]);
2222 for (
int y = std::max(0, pos[1] - 8); y <= std::min(
PATHFINDING_WIDTH, pos[1] + 8); y++) {
2223 for (
int x = std::max(0, pos[0] - 8); x <= std::min(
PATHFINDING_WIDTH, pos[0] + 8); x++) {
2233 static void CL_DebugPath_f (
void)
2260 Com_Printf(
"RT_UpdateConnectionColumn needed %i milliseconds\n", (
int)time);
2271 Com_Printf(
"Statistics:\nWorldsize(x/y/z) %i/%i/%i\n", xW, yW, zW);
2272 int numCells = xW * yW * zW;
2273 Com_Printf(
"number of Cells: %i\n", numCells);
2362 dir[0] = from[1] - check->
origin[1];
2363 dir[1] = check->
origin[0] - from[0];
2369 for (
int i = 0;
i < 3;
i++) {
2393 static int lastAlien = 0;
2415 }
while (i != lastAlien);
2428 lastAlien = std::max(0, std::min(
cl.
numLEs - 1, lastAlien));
2442 }
while (i != lastAlien);
2455 lastAlien = std::max(0, std::min(
cl.
numLEs - 1, lastAlien));
2469 }
while (i != lastAlien);
2506 static int time = 0;
2508 if (time -
cl.
time < 1000) {
2524 cl_autostand =
Cvar_Get(
"cl_autostand",
"1",
CVAR_USERINFO |
CVAR_ARCHIVE,
"Prevent accidental wasting of TUs by allowing the actor to automatically stand up before starting long walks.");
2525 confirm_actions =
Cvar_Get(
"confirm_actions",
"0",
CVAR_ARCHIVE,
"Confirm all actions in tactical mode");
2526 cl_showactors =
Cvar_Get(
"cl_showactors",
"1", 0,
"Show actors on the battlefield");
2541 Cmd_AddCommand(
"debug_path", CL_DebugPath_f,
"Display routing data for current mouse position.");
2542 Cmd_AddCommand(
"debug_drawblocked", CL_DisplayBlockedPaths_f,
"Draw a marker for all blocked map-positions.");
2543 Cmd_AddCommand(
"debug_movemark", CL_DumpMoveMark_f,
"Trigger Step::isPossible in every direction at the current truePos.");
2544 Cmd_AddCommand(
"debug_tus", CL_DumpTUs_f,
"Show a table of the TUs that would be used by the current actor to move relative to his current location.");
2545 Cmd_AddCommand(
"debug_actorinvlist",
nullptr,
"Show the inventory list of all actors.");
void CL_AddPathing(void)
Adds a pathing marker to the current floor when we render the world.
#define ST_RIGHT
The right hand should be used for shooting.
static void CL_TargetingGrenade(const pos3_t fromPos, actorSizeEnum_t fromActorSize, const pos3_t toPos)
Shows targeting for a grenade.
vec_t VectorLength(const vec3_t v)
Calculate the length of a vector.
bool Grid_ShouldUseAutostand(const pathing_t *path, const pos3_t toPos)
Checks if a crouched actor could save TUs by standing up, walking and crouching again.
const char * Cmd_Argv(int arg)
Returns a given argument.
static void CL_ActorNext_f(void)
Switch to the next living soldier.
void Cmd_AddCommand(const char *cmdName, xcommand_t function, const char *desc)
Add a new command to the script interface.
#define VectorCopy(src, dest)
void CL_UpdateCharacterValues(const character_t *chr)
void destroyInventory(Inventory *const inv)
Destroys inventory.
le_t * CL_BattlescapeSearchAtGridPos(const pos3_t pos, bool includingStunned, const le_t *actor)
Searches a local entity at the given position.
void CL_AddTargeting(void)
Adds a target cursor when we render the world.
#define VectorSet(v, x, y, z)
void CL_BattlescapeMouseDragging(void)
Scroll battlescape touchscreen-style, by clicking and dragging away.
bool CL_ActorMouseTrace(void)
Battlescape cursor positioning.
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.
#define LE_IsCrouched(le)
static void CL_ActorConfirmAction_f(void)
Executes "pending" actions such as walking and firing.
void MSG_Write_PA(player_action_t playerAction, int entnum,...)
Writes player action with its data.
int Grid_MoveNext(const pathing_t *path, const pos3_t toPos, byte crouchingState)
Get the direction to use to move to a position (used to reconstruct the path)
QGL_EXTERN GLint GLenum type
static int mousePosTargettingAlign
If you want to change the z level of targeting and shooting, use this value. Negative and positive of...
void getShotOrigin(const vec3_t from, const vec3_t dir, bool crouching, vec3_t shotOrigin) const
void VectorMA(const vec3_t veca, const float scale, const vec3_t vecb, vec3_t outVector)
Sets vector_out (vc) to vevtor1 (va) + scale * vector2 (vb)
static const vec3_t halfBoxSize
field marker box
void CL_InitBattlescapeMouseDragging(void)
Scroll battlescape touchscreen-style, by clicking and dragging away.
void CL_ActorTurnMouse(void)
Turns the actor around without moving.
this is a fire definition for our weapons/ammo
void UI_RegisterText(int dataId, const char *text)
share a text with a data id
const char * va(const char *format,...)
does a varargs printf into a temp buffer, so I don't need to have varargs versions of all text functi...
void CL_ActorShoot(const le_t *le, const pos3_t at)
Shoot with actor.
void LE_CenterView(const le_t *le)
Center the camera on the local entity's origin.
const teamDef_t * teamDef
This is a cvar definition. Cvars can be user modified and used in our menus e.g.
void CL_ActorRemoveFromTeamList(le_t *le)
Removes an actor (from your team) from the team list.
void CL_AddActorPathing(void)
Adds an actor pathing marker to the current floor when we render the world.
void ACTOR_InitStartup(void)
Item * getContainer2(const containerIndex_t idx) const
ptl_t * CL_ParticleSpawn(const char *name, int levelFlags, const vec3_t s, const vec3_t v, const vec3_t a)
Spawn a new particle to the map.
pos_t Grid_Fall(const Routing &routing, const actorSizeEnum_t actorSize, const pos3_t pos)
Calculated the new height level when something falls down from a certain position.
void Grid_CalcPathing(const Routing &routing, const actorSizeEnum_t actorSize, pathing_t *path, const pos3_t from, int maxTUs, forbiddenList_t *fb_list)
Recalculate the pathing table for the given actor(-position)
le_t * CL_ActorGetClosest(const vec3_t origin, int team)
Returns the actor that is closest to the given origin.
const fireDef_t * getFiredefs() const
Returns the firedefinitions for a given weapon/ammo.
#define LE_IsInvisible(le)
#define LE_IsCivilian(le)
void CL_GetWorldCoordsUnderMouse(vec3_t groundIntersection, vec3_t upperTracePoint, vec3_t lowerTracePoint)
Get battlescape cell position under mouse cursor.
static void CL_TargetingStraight(const pos3_t fromPos, actorSizeEnum_t fromActorSize, const pos3_t toPos)
Draws line to target.
void CL_ActorActionMouse(void)
initiates action with mouse.
void CL_ViewCenterAtGridPosition(const pos3_t pos)
Centers the camera on a given grid field.
void CL_DisplayObstructionArrows(void)
Useful for debugging pathfinding.
const objDef_t * def(void) const
#define IS_MODE_FIRE_LEFT(x)
void CL_ActorStartMove(le_t *le, const pos3_t to)
Starts moving actor.
struct le_s * clientAction
bool S_LoadAndPlaySample(const char *s, const vec3_t origin, float attenuation, float volume)
does what the name implies in just one function to avoid exposing s_sample_t
bool CL_OutsideMap(const vec3_t position, const float delta)
Checks whether give position is still inside the map borders.
character_t * CL_ActorGetChr(const le_t *le)
Returns the character information for an actor in the teamlist.
char deathTextureName[MAX_VAR]
float CL_ActorInjuryModifier(const le_t *le, const modifier_types_t type)
Returns the actor injury modifier of the specified type.
void Com_Printf(const char *const fmt,...)
Item * getHeadgear() const
bool CM_EntTestLineDM(mapTiles_t *mapTiles, const Line &trLine, vec3_t hit, const int levelmask, const char **entlist)
Checks traces against the world and all inline models, gives the hit position back.
bool isReloadable() const
bool CL_ActorSelectPrev(void)
selects the previous actor
bool CL_ActorIsReactionFireOutOfRange(const le_t *shooter, const le_t *target)
const char * leInlineModelList[MAX_EDICTS+1]
Defines all attributes of objects used in the inventory.
bool LE_IsActor(const le_t *le)
Checks whether the given le is a living actor.
#define VectorScale(in, scale, out)
void CL_ActorAddToTeamList(le_t *le)
Adds the actor to the team list.
void CL_ActorSelectMouse(void)
Selects an actor using the mouse.
int GAME_GetChrMaxLoad(const character_t *chr)
Returns the max weight the given character can carry.
#define CELL_HEIGHT
A cell's height in QUANT sized units.
static bool CL_AddPathingBox(pos3_t pos, bool addUnreachableCells)
create a targeting box at the given position
#define PATHFINDING_MAX_FALL
int Cvar_GetInteger(const char *varName)
Returns the int value of a cvar.
static void CL_PrevAlien_f(void)
Cycles between visible aliens in reverse direction.
actorModes_t
Actor actions.
trace_t CL_Trace(const Line &traceLine, const AABB &box, const le_t *passle, le_t *passle2, int contentmask, int worldLevel)
Moves the given mins/maxs volume through the world from start to end.
#define TL_FLAG_ACTORCLIP
void Com_Error(int code, const char *fmt,...)
static void CL_NextAlien_f(void)
Cycles between visible aliens.
actorSizeEnum_t fieldSize
int CL_ActorGetNumber(const le_t *le)
Returns the number of the actor in the teamlist.
pos_t Grid_MoveLength(const pathing_t *path, const pos3_t to, byte crouchingState, bool stored)
Return the needed TUs to walk to a given position.
image_t * R_FindImage(const char *pname, imagetype_t type)
Finds or loads the given image.
const char * pa_format[]
Player action format strings for netchannel transfer.
item instance data, with linked list capability
void getFirstShapePosition(int *const x, int *const y) const
Calculates the first "true" bit in the shape and returns its position in the item.
static const vec3_t boxShift
#define PATHFINDING_WIDTH
absolute max
static void CL_TargetingRadius(const vec3_t center, const float radius)
Show weapon radius.
void CL_ActorReserveTUs(const le_t *le, const reservation_types_t type, const int tus)
Replace the reserved TUs for a certain type.
void CL_ActorConditionalMoveCalc(le_t *le)
Recalculate forbidden list, available moves and actor's move length for the current selected actor...
static void CL_ActorUse(const le_t *le)
Uses the current selected entity in the battlescape. Can e.g. open the selected door.
inventory definition with all its containers
void CL_ActorPlaySound(const le_t *le, actorSound_t soundType)
Plays various sounds on actor action.
void NET_vWriteFormat(dbuffer *buf, const char *format, va_list ap)
Writes to buffer according to format; version without syntactic sugar for variable arguments...
#define DotProduct(x, y)
Returns the distance between two 3-dimensional vectors.
int treatmentLevel[BODYPART_MAXTYPE]
#define Vector2Compare(a, b)
cvar_t * Cvar_Get(const char *var_name, const char *var_value, int flags, const char *desc)
Init or return a cvar.
void CL_ActorResetMoveLength(le_t *le)
Recalculates the currently selected Actor's move length.
model_t * modelPool[MAX_OBJDEFS]
#define PosSubDV(p, crouch, dv)
static pos3_t mouseLastPos
#define GRENADE_PARTITIONS
QGL_EXTERN GLuint GLsizei GLsizei * length
#define IS_MODE_FIRE_RIGHT(x)
entity_t * R_GetFreeEntity(void)
Get the next free entry in the entity list (the last one)
static void CL_ActorMoveMouse(void)
handle select or action clicking in either move mode
#define IS_MODE_FIRE_HEADGEAR(x)
static void CL_ActorStandCrouch_f(void)
Stands or crouches actor.
#define ST_LEFT
The left hand should be used for shooting.
#define ST_HEADGEAR
The headgear slot item should be used when shooting/using the item in the slot.
static cvar_t * cl_autostand
Player preference: should the server make guys stand for long walks, to save TU.
int Cmd_Argc(void)
Return the number of arguments of the current command. "command parameter" will result in a argc of 2...
#define ACTOR_GET_FIELDSIZE(actor)
#define LE_IsSelected(le)
#define MAX_FIREDEFS_PER_WEAPON
#define VecToPos(v, p)
Map boundary is +/- MAX_WORLD_WIDTH - to get into the positive area we add the possible max negative ...
int CL_ActorReservedTUs(const le_t *le, const reservation_types_t type)
Returns the amount of reserved TUs for a certain type.
float Com_GrenadeTarget(const vec3_t from, const vec3_t at, float speed, bool launched, bool rolled, vec3_t v0)
Calculates parabola-type shot.
bool LE_IsLivingAndVisibleActor(const le_t *le)
Checks whether the given le is a living and visible actor.
#define PosToVec(p, v)
Pos boundary size is +/- 128 - to get into the positive area we add the possible max negative value a...
static forbiddenList_t forbiddenList
A list of locations that cannot be moved to.
static void CL_ActorPrev_f(void)
Switch to the previous living soldier.
int woundLevel[BODYPART_MAXTYPE]
bool CL_ActorSelect(le_t *le)
Selects an actor.
void CL_ActorReload(le_t *le, containerIndex_t containerID)
Reload weapon with actor.
static bool CL_ActorVis(const le_t *le, const le_t *check)
void Com_DPrintf(int level, const char *fmt,...)
A Com_Printf that only shows up if the "developer" cvar is set.
struct net_stream * netStream
#define INVDEF(containerID)
void CL_ActorTargetAlign_f(void)
Targets to the ground when holding the assigned button.
bool CL_ActorFireModeActivated(const actorModes_t mode)
Checks whether we are in fire mode or node.
bool Grid_FindPath(const Routing &routing, const actorSizeEnum_t actorSize, pathing_t *path, const pos3_t from, const pos3_t targetPos, byte crouchingState, int maxTUs, forbiddenList_t *forbiddenList)
Tries to find a path from the given actor(-position) to a given target position.
bool GAME_TeamIsKnown(const teamDef_t *teamDef)
const char * CL_PlayerGetName(unsigned int player)
Get the player name.
void NET_WriteFormat(dbuffer *buf, const char *format,...)
The user-friendly version of NET_WriteFormat that writes variable arguments to buffer according to fo...
int CL_ActorUsableTUs(const le_t *le)
Returns the amount of usable (overall-reserved) TUs for an actor.
le_t * CL_ActorGetFromCharacter(const character_t *chr)
Returns the local entity information for a character in the team list.
#define ModelFloorToQuant(x)
These macros are meant to correctly convert from model units to QUANT units and back.
linkedList_t * chrDisplayList
List of currently displayed or equipable characters.
void setFromMapBounds(const vec3_t mini, const vec3_t maxi)
Set the box correctly if the maxs value is the upper corner of a cell. VecToPos considers the upper b...
bool CL_BattlescapeRunning(void)
Check whether we already have actors spawned on the battlefield.
void SCR_ChangeCursor(int cursor)
float woundThreshold(const short bodyPart) const
static const vec4_t green
bool canHoldItemWeight(containerIndex_t from, containerIndex_t to, const Item &item, int maxWeight) const
Check that adding an item to the inventory won't exceed the max permitted weight. ...
int CL_ActorCheckAction(const le_t *le)
Checks that an action is valid.
#define VectorCompare(a, b)
le_t * LE_GetNextInUse(le_t *lastLE)
Iterate through the entities that are in use.
static vec3_t mouseDraggingPos
void RT_UpdateConnectionColumn(mapTiles_t *mapTiles, Routing &routing, const int actorSize, const int x, const int y, const int dir, const char **list, const int minZ, const int maxZ)
Routing Function to update the connection between two fields.
bool isLoadableInWeapon(const objDef_s *weapon) const
Checks if an item can be used to reload a weapon.
int R_GetTagIndexByName(const model_t *mod, const char *tagName)
Searches the tag data for the given name.
#define PATHFINDING_HEIGHT
15 max, adjusting above 8 will require a rewrite to the DV code
int CL_ActorMoveMode(const le_t *le)
Decide how the actor will walk, taking into account autostanding.
#define VectorAdd(a, b, dest)
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.
short numBodyParts(void) const
static void CL_ActorSelect_f(void)
Selects a soldier while we are on battlescape.
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.
int Grid_Floor(const Routing &routing, const actorSizeEnum_t actorSize, const pos3_t pos)
Returns the height of the floor in a cell.
Item * getHandItem(actorHands_t hand) const
bool CL_AddActor(le_t *le, entity_t *ent)
Adds an actor to the render entities with all it's models and items.
vec_t VectorNormalize(vec3_t v)
Calculate unit vector for a given vec3_t.
static void CL_BuildForbiddenList(void)
Builds a list of locations that cannot be moved to (client side).
const BodyData * bodyTemplate
byte actorMoveLength
The TUs that the current selected actor needs to walk to the current grid position marked by the mous...
Item * getItemAtPos(const invDef_t *container, const int x, const int y) const
Searches if there is an item at location (x,y) in a container.
static void CL_ActorConfirmAction(le_t *le)
bool isHeldTwoHanded() const
const char * getActorSound(int gender, actorSound_t soundType) const
Returns the actor sounds for a given category.
int R_AddEntity(const entity_t *ent)
Adds a copy of the specified entity to the list of all known render entities.
#define LIST_Foreach(list, type, var)
Iterates over a linked list, it's safe to delete the returned entry from the list while looping over ...
inventory definition for our menus
bool CL_ActorSelectNext(void)
selects the next actor
bool CL_ActorSelectList(int num)
Selects an actor from a list.
const objDef_t * INVSH_GetItemByIDX(int index)
Returns the item that belongs to the given index or nullptr if the index is invalid.
float penalty(const short bodyPart, const modifier_types_t type) const
void add(pos3_t pos, byte *entSize)
static bool CL_AddActorWeapon(int objID)
Checks whether a weapon should be added to the entity's hand.
cvar_t * Cvar_ForceSet(const char *varName, const char *value)
Will set the variable even if NOSET or LATCH.
static cvar_t * confirm_actions
Confirm actions in tactical mode - valid values are 0, 1 and 2.
void CL_ActorSetMode(le_t *actor, actorModes_t actorMode)
actorSound_t
Types of actor sounds being issued by CL_ActorPlaySound().
#define ROUTING_UNREACHABLE
short dvec_t
The direction vector tells us where the actor came from (in his previous step). The pathing table hol...
actorHands_t getHand() const
le_t * teamList[MAX_ACTIVETEAM]
static void CL_ActorUseHeadgear_f(void)
Toggles the headgear for the current selected player.
bool GAME_ItemIsUseable(const objDef_t *od)
static void CL_ActorUse_f(void)
Hud callback to use the current selected entity.
void printTilesAt(int x, int y)
A list of locations that cannot be moved to.
bool LE_IsLivingActor(const le_t *le)
Checks whether the given le is a living actor (but might be hidden)
static void CL_AddTargetingBox(pos3_t pos, bool pendBox)
create a targeting box at the given position
How many TUs (and of what type) did a player reserve for a unit?
static void CL_ActorUpdate_f(void)
Update the skin of the current soldier.
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
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).
#define ACTOR_SIZE_NORMAL
void Grid_PosToVec(const Routing &routing, const actorSizeEnum_t actorSize, const pos3_t pos, vec3_t vec)
Converts a grid position to world coordinates.
#define ROUTING_NOT_REACHABLE
static cvar_t * cl_showactors
void Cvar_SetValue(const char *varName, float value)
Expands value to a string and calls Cvar_Set.
bool RT_CanActorStandHere(const Routing &routing, const int actorSize, const pos3_t pos)
Check if an actor can stand(up) in the cell given by pos.
#define VectorDistSqr(a, b)
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.
fireDefIndex_t currentSelectedFiremode
static bool CL_ActorTraceMove(const pos3_t to)
Draws the way to walk when confirm actions is activated.
void CL_DisplayFloorArrows(void)
Useful for debugging pathfinding.
void CL_ActorCleanup(le_t *le)
#define VectorSubtract(a, b, dest)
static le_t * interactEntity
void CL_ActorSetFireDef(le_t *actor, const fireDef_t *fd)
static void CL_NextAlienVisibleFromActor_f(void)
Cycles between visible (to selected actor) aliens.
void HUD_DisplayMessage(const char *text)
Displays a message on the hud.
int Sys_Milliseconds(void)
#define SND_VOLUME_DEFAULT
const fireDef_t * CL_ActorGetReactionFireFireDef(const le_t *shooter)
void UI_ExecuteConfunc(const char *fmt,...)
Executes confunc - just to identify those confuncs in the code - in this frame.
chrReservations_t reservedTus
void NET_WriteMsg(struct net_stream *s, dbuffer &buf)
Enqueue the buffer in the net stream for ONE client.
Describes a character with all its attributes.