129 for (
int actorIdx = 0; actorIdx <
cl.numTeamList; actorIdx++) {
130 if (
cl.teamList[actorIdx] == le)
143 for (
int i = 0;
i <
cl.numTeamList; ++
i) {
144 if (
cl.teamList[
i] &&
cl.teamList[
i]->ucn == chr->
ucn)
145 return cl.teamList[
i];
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)
327 Com_Printf(
"CL_ActorInjuryPenalty: Unused modifier type %i\n",
type);
372 if (actorIdx == -1) {
375 if (
cl.numTeamList >=
size) {
376 Com_Printf(
"Too many actors on the teamlist!\n");
379 cl.teamList[
cl.numTeamList] = le;
382 if (
cl.numTeamList == 1)
391 cls.i.destroyInventory(&le->
inv);
405 for (
int i = 0;
i <
cl.numTeamList;
i++) {
406 if (
cl.teamList[
i] == le) {
410 cl.teamList[
i] =
nullptr;
423 for (
i = 0;
i <
cl.numTeamList;
i++) {
429 if (
i ==
cl.numTeamList)
509 if (num >=
cl.numTeamList || num < 0)
513 le_t* le =
cl.teamList[num];
530 const int num =
cl.numTeamList;
533 for (
int i = 0;
i < num;
i++) {
534 const le_t* le =
cl.teamList[
i];
561 const int num =
cl.numTeamList;
564 for (
int i = 0;
i < num;
i++) {
565 const le_t* le =
cl.teamList[
i];
635static void CL_DisplayBlockedPaths_f (
void)
664 for (
int j = 0; j < 3; j++) {
696 le_t* closest =
nullptr;
721 if (!
cls.isOurRound()) {
741 const int autostandTU = useAutostand ? 2 *
TU_CROUCH : 0;
742 byte crouchingState =
LE_IsCrouched(le) && !useAutostand ? 1 : 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."));
1142 selActor->currentSelectedFiremode = 0;
1300 vec3_t from, forward, right, up;
1306 float frustumSlope[2];
1307 const float projectionDistance = 2048.0f;
1309 frustumSlope[0] = 10.0 *
refdef.fieldOfViewX;
1311 frustumSlope[0] = tan(
refdef.fieldOfViewX * (
M_PI / 360.0)) * projectionDistance;
1312 frustumSlope[1] = frustumSlope[0] * ((float)
viddef.viewHeight / (float)
viddef.viewWidth);
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)) {
1479 VectorMA(
cl.cam.origin, 0.2f, mousePosDiff,
cl.cam.origin);
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) {
1555 if (!rightHand.
model)
1560 rightHand.
tagname =
"tag_rweapon";
1617 const char* deathTextureName;
1618 assert(le->
teamDef !=
nullptr);
1640 if (particle !=
nullptr)
1641 particle->
size[0] = radius;
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);
1906 vec3_t increase = { inc, inc, 0};
1913 cursor.
alpha = 0.15;
1937 static int currentPos = 0;
1938 switch (currentPos) {
1948 align = -(2 * align);
1959 align = -(2 * align);
2047 if (!addUnreachableCells && TUhave < TUneed)
2193static void CL_DumpMoveMark_f (
void)
2211static 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++) {
2233static void CL_DebugPath_f (
void)
2245 RT_DebugSpecial(
cl.mapTiles,
cl.mapData->routing, actorSize, x, y, dir,
cl.leInlineModelList);
2260 Com_Printf(
"RT_UpdateConnectionColumn needed %i milliseconds\n", (
int)time);
2263 RT_DebugPathDisplay(
cl.mapData->routing, actorSize, x, y, z);
2264 cl.mapTiles->printTilesAt(x, y);
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++) {
2372 if (
tr.fraction < 1.0) {
2393 static int lastAlien = 0;
2398 if (lastAlien >=
cl.numLEs)
2403 if (++
i >=
cl.numLEs)
2415 }
while (
i != lastAlien);
2428 lastAlien = std::max(0, std::min(
cl.numLEs - 1, lastAlien));
2432 if (++
i >=
cl.numLEs)
2442 }
while (
i != lastAlien);
2455 lastAlien = std::max(0, std::min(
cl.numLEs - 1, lastAlien));
2469 }
while (
i != lastAlien);
2478 if (le->
team !=
cl.actTeam)
2506 static int time = 0;
2508 if (time -
cl.time < 1000) {
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.");
actorSound_t
Types of actor sounds being issued by CL_ActorPlaySound().
static cvar_t * cl_showactors
static const vec3_t boxShift
void CL_ActorStartMove(le_t *le, const pos3_t to)
Starts moving actor.
static void CL_AddTargetingBox(pos3_t pos, bool pendBox)
create a targeting box at the given position
void ACTOR_InitStartup(void)
static bool CL_AddActorWeapon(int objID)
Checks whether a weapon should be added to the entity's hand.
void CL_ActorReserveTUs(const le_t *le, const reservation_types_t type, const int tus)
Replace the reserved TUs for a certain type.
static void CL_ActorConfirmAction(le_t *le)
static const vec3_t halfBoxSize
field marker box
le_t * CL_ActorGetFromCharacter(const character_t *chr)
Returns the local entity information for a character in the team list.
void CL_ActorRemoveFromTeamList(le_t *le)
Removes an actor (from your team) from the team list.
static void CL_ActorMoveMouse(void)
handle select or action clicking in either move mode
static int mousePosTargettingAlign
If you want to change the z level of targeting and shooting, use this value. Negative and positive of...
static bool CL_ActorVis(const le_t *le, const le_t *check)
static void CL_ActorUseHeadgear_f(void)
Toggles the headgear for the current selected player.
int CL_ActorGetNumber(const le_t *le)
Returns the number of the actor in the teamlist.
void CL_ActorSelectMouse(void)
Selects an actor using the mouse.
static void CL_ActorNext_f(void)
Switch to the next living soldier.
static void CL_TargetingRadius(const vec3_t center, const float radius)
Show weapon radius.
int CL_ActorCheckAction(const le_t *le)
Checks that an action is valid.
int CL_ActorUsableTUs(const le_t *le)
Returns the amount of usable (overall-reserved) TUs for an actor.
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).
le_t * CL_ActorGetClosest(const vec3_t origin, int team)
Returns the actor that is closest to the given origin.
void CL_ActorTurnMouse(void)
Turns the actor around without moving.
void CL_ActorSetMode(le_t *actor, actorModes_t actorMode)
static void CL_TargetingStraight(const pos3_t fromPos, actorSizeEnum_t fromActorSize, const pos3_t toPos)
Draws line to target.
static bool CL_ActorTraceMove(const pos3_t to)
Draws the way to walk when confirm actions is activated.
void CL_BattlescapeMouseDragging(void)
Scroll battlescape touchscreen-style, by clicking and dragging away.
bool CL_ActorMouseTrace(void)
Battlescape cursor positioning.
int CL_ActorReservedTUs(const le_t *le, const reservation_types_t type)
Returns the amount of reserved TUs for a certain type.
static cvar_t * confirm_actions
Confirm actions in tactical mode - valid values are 0, 1 and 2.
static void CL_ActorUse_f(void)
Hud callback to use the current selected entity.
static void CL_PrevAlien_f(void)
Cycles between visible aliens in reverse direction.
void CL_ActorSetFireDef(le_t *actor, const fireDef_t *fd)
void CL_DisplayObstructionArrows(void)
Useful for debugging pathfinding.
static void CL_ActorConfirmAction_f(void)
Executes "pending" actions such as walking and firing.
static void CL_ActorUse(const le_t *le)
Uses the current selected entity in the battlescape. Can e.g. open the selected door.
void CL_AddTargeting(void)
Adds a target cursor when we render the world.
static void CL_ActorStandCrouch_f(void)
Stands or crouches actor.
static void CL_ActorUpdate_f(void)
Update the skin of the current soldier.
void MSG_Write_PA(player_action_t playerAction, int entnum,...)
Writes player action with its data.
void CL_ActorTargetAlign_f(void)
Targets to the ground when holding the assigned button.
bool CL_ActorSelectPrev(void)
selects the previous actor
static bool CL_AddPathingBox(pos3_t pos, bool addUnreachableCells)
create a targeting box at the given position
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.
static void CL_TargetingGrenade(const pos3_t fromPos, actorSizeEnum_t fromActorSize, const pos3_t toPos)
Shows targeting for a grenade.
void CL_InitBattlescapeMouseDragging(void)
Scroll battlescape touchscreen-style, by clicking and dragging away.
void CL_ActorReload(le_t *le, containerIndex_t containerID)
Reload weapon with actor.
void CL_ActorAddToTeamList(le_t *le)
Adds the actor to the team list.
int CL_ActorMoveMode(const le_t *le)
Decide how the actor will walk, taking into account autostanding.
bool CL_AddActor(le_t *le, entity_t *ent)
Adds an actor to the render entities with all it's models and items.
void CL_ActorPlaySound(const le_t *le, actorSound_t soundType)
Plays various sounds on actor action.
bool CL_ActorFireModeActivated(const actorModes_t mode)
Checks whether we are in fire mode or node.
void CL_AddActorPathing(void)
Adds an actor pathing marker to the current floor when we render the world.
void CL_GetWorldCoordsUnderMouse(vec3_t groundIntersection, vec3_t upperTracePoint, vec3_t lowerTracePoint)
Get battlescape cell position under mouse cursor.
void CL_ActorConditionalMoveCalc(le_t *le)
Recalculate forbidden list, available moves and actor's move length for the current selected actor.
const fireDef_t * CL_ActorGetReactionFireFireDef(const le_t *shooter)
void CL_ActorResetMoveLength(le_t *le)
Recalculates the currently selected Actor's move length.
void CL_ActorShoot(const le_t *le, const pos3_t at)
Shoot with actor.
static void CL_ActorPrev_f(void)
Switch to the previous living soldier.
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_ActorActionMouse(void)
initiates action with mouse.
static cvar_t * cl_autostand
Player preference: should the server make guys stand for long walks, to save TU.
static void CL_ActorSelect_f(void)
Selects a soldier while we are on battlescape.
bool CL_ActorSelect(le_t *le)
Selects an actor.
void CL_ActorCleanup(le_t *le)
static forbiddenList_t forbiddenList
A list of locations that cannot be moved to.
static void CL_NextAlienVisibleFromActor_f(void)
Cycles between visible (to selected actor) aliens.
static vec3_t mouseDraggingPos
#define GRENADE_PARTITIONS
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
bool CL_ActorIsReactionFireOutOfRange(const le_t *shooter, const le_t *target)
static void CL_NextAlien_f(void)
Cycles between visible aliens.
bool CL_ActorSelectList(int num)
Selects an actor from a list.
void CL_AddPathing(void)
Adds a pathing marker to the current floor when we render the world.
static le_t * interactEntity
static void CL_BuildForbiddenList(void)
Builds a list of locations that cannot be moved to (client side).
bool CL_ActorSelectNext(void)
selects the next 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.
character_t * CL_ActorGetChr(const le_t *le)
Returns the character information for an actor in the teamlist.
float CL_ActorInjuryModifier(const le_t *le, const modifier_types_t type)
Returns the actor injury modifier of the specified type.
void CL_DisplayFloorArrows(void)
Useful for debugging pathfinding.
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.
static pos3_t mouseLastPos
#define ACTOR_GET_FIELDSIZE(actor)
@ WALKTYPE_AUTOSTAND_BUT_NOT_FAR_ENOUGH
@ WALKTYPE_AUTOSTAND_BEING_USED
@ WALKTYPE_CROUCH_WALKING
bool CL_OutsideMap(const vec3_t position, const float delta)
Checks whether give position is still inside the map borders.
le_t * CL_BattlescapeSearchAtGridPos(const pos3_t pos, bool includingStunned, const le_t *actor)
Searches a local entity at the given position.
bool CL_BattlescapeRunning(void)
Check whether we already have actors spawned on the battlefield.
bool GAME_ItemIsUseable(const objDef_t *od)
int GAME_GetChrMaxLoad(const character_t *chr)
Returns the max weight the given character can carry.
bool GAME_TeamIsKnown(const teamDef_t *teamDef)
Shared game type headers.
void HUD_DisplayMessage(const char *text)
Displays a message on the hud.
le_t * LE_GetNextInUse(le_t *lastLE)
Iterate through the entities that are in use.
void LE_CenterView(const le_t *le)
Center the camera on the local entity's origin.
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.
bool LE_IsLivingAndVisibleActor(const le_t *le)
Checks whether the given le is a living and visible actor.
bool LE_IsLivingActor(const le_t *le)
Checks whether the given le is a living actor (but might be hidden).
bool LE_IsActor(const le_t *le)
Checks whether the given le is a living actor.
#define IS_MODE_FIRE_RIGHT(x)
#define IS_MODE_FIRE_HEADGEAR(x)
#define IS_MODE_FIRE_LEFT(x)
#define LE_IsCrouched(le)
#define LE_IsInvisible(le)
#define LE_IsSelected(le)
actorModes_t
Actor actions.
#define LE_IsCivilian(le)
const char * CL_PlayerGetName(unsigned int player)
Get the player name.
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.
void SCR_ChangeCursor(int cursor)
Header for certain screen operations.
#define INVDEF(containerID)
void CL_UpdateCharacterValues(const character_t *chr)
linkedList_t * chrDisplayList
List of currently displayed or equipable characters.
void CL_ViewCenterAtGridPosition(const pos3_t pos)
Centers the camera on a given grid field.
float woundThreshold(const short bodyPart) const
short numBodyParts(void) const
float penalty(const short bodyPart, const modifier_types_t type) const
actorHands_t getHand() const
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...
inventory definition with all its containers
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.
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.
Item * getContainer2(const containerIndex_t idx) const
item instance data, with linked list capability
const objDef_t * def(void) const
const fireDef_t * getFiredefs() const
Returns the firedefinitions for a given weapon/ammo.
void getFirstShapePosition(int *const x, int *const y) const
Calculates the first "true" bit in the shape and returns its position in the item.
bool isHeldTwoHanded() const
Primary header for client.
const char * Cmd_Argv(int arg)
Returns a given argument.
int Cmd_Argc(void)
Return the number of arguments of the current command. "command parameter" will result in a argc of 2...
void Cmd_AddCommand(const char *cmdName, xcommand_t function, const char *desc)
Add a new command to the script interface.
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 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.
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.
void Com_DPrintf(int level, const char *fmt,...)
A Com_Printf that only shows up if the "developer" cvar is set.
float Com_GrenadeTarget(const vec3_t from, const vec3_t at, float speed, bool launched, bool rolled, vec3_t v0)
Calculates parabola-type shot.
void Com_Error(int code, const char *fmt,...)
void Com_Printf(const char *const fmt,...)
static const vec4_t green
cvar_t * Cvar_ForceSet(const char *varName, const char *value)
Will set the variable even if NOSET or LATCH.
void Cvar_SetValue(const char *varName, float value)
Expands value to a string and calls Cvar_Set.
int Cvar_GetInteger(const char *varName)
Returns the int value of a cvar.
cvar_t * Cvar_Get(const char *var_name, const char *var_value, int flags, const char *desc)
Init or return a cvar.
#define TL_FLAG_ACTORCLIP
#define PATHFINDING_MAX_FALL
#define ROUTING_NOT_REACHABLE
#define PATHFINDING_WIDTH
absolute max
#define CELL_HEIGHT
A cell's height in QUANT sized units.
#define ROUTING_UNREACHABLE
#define ACTOR_SIZE_NORMAL
#define PATHFINDING_HEIGHT
15 max, adjusting above 8 will require a rewrite to the DV code
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).
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.
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_PosToVec(const Routing &routing, const actorSizeEnum_t actorSize, const pos3_t pos, vec3_t vec)
Converts a grid position to world coordinates.
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.
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).
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.
int Grid_Floor(const Routing &routing, const actorSizeEnum_t actorSize, const pos3_t pos)
Returns the height of the floor in a cell.
Battlescape grid functions.
const objDef_t * INVSH_GetItemByIDX(int index)
Returns the item that belongs to the given index or nullptr if the index is invalid.
#define MAX_FIREDEFS_PER_WEAPON
#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 ...
vec_t VectorNormalize(vec3_t v)
Calculate unit vector for a given vec3_t.
vec_t VectorLength(const vec3_t v)
Calculate the length of a vector.
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).
#define PosSubDV(p, crouch, dv)
#define PosToVec(p, v)
Pos boundary size is +/- 128 - to get into the positive area we add the possible max negative value a...
short dvec_t
The direction vector tells us where the actor came from (in his previous step). The pathing table hol...
#define VecToPos(v, p)
Map boundary is +/- MAX_WORLD_WIDTH - to get into the positive area we add the possible max negative ...
void NET_vWriteFormat(dbuffer *buf, const char *format, va_list ap)
Writes to buffer according to format; version without syntactic sugar for variable arguments,...
void NET_WriteMsg(struct net_stream *s, dbuffer &buf)
Enqueue the buffer in the net stream for ONE client.
void NET_WriteFormat(dbuffer *buf, const char *format,...)
The user-friendly version of NET_WriteFormat that writes variable arguments to buffer according to fo...
const char * pa_format[]
Player action format strings for netchannel transfer.
#define ST_HEADGEAR
The headgear slot item should be used when shooting/using the item in the slot.
#define ST_RIGHT
The right hand should be used for shooting.
#define ST_LEFT
The left hand should be used for shooting.
int R_AddEntity(const entity_t *ent)
Adds a copy of the specified entity to the list of all known render entities.
entity_t * R_GetFreeEntity(void)
Get the next free entry in the entity list (the last one).
QGL_EXTERN GLuint GLsizei GLsizei * length
QGL_EXTERN GLint GLenum type
image_t * R_FindImage(const char *pname, imagetype_t type)
Finds or loads the given image.
int R_GetTagIndexByName(const model_t *mod, const char *tagName)
Searches the tag data for the given name.
grid pathfinding and routing
#define ModelFloorToQuant(x)
These macros are meant to correctly convert from model units to QUANT units and back.
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
#define SND_VOLUME_DEFAULT
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...
Describes a character with all its attributes.
chrReservations_t reservedTus
const teamDef_t * teamDef
How many TUs (and of what type) did a player reserve for a unit?
This is a cvar definition. Cvars can be user modified and used in our menus e.g.
this is a fire definition for our weapons/ammo
A list of locations that cannot be moved to.
inventory definition for our menus
fireDefIndex_t currentSelectedFiremode
actorSizeEnum_t fieldSize
byte actorMoveLength
The TUs that the current selected actor needs to walk to the current grid position marked by the mous...
struct le_s * clientAction
Item * getHandItem(actorHands_t hand) const
Defines all attributes of objects used in the inventory.
bool isLoadableInWeapon(const objDef_s *weapon) const
Checks if an item can be used to reload a weapon.
bool isReloadable() const
const char * getActorSound(int gender, actorSound_t soundType) const
char deathTextureName[MAX_VAR]
const BodyData * bodyTemplate
int woundLevel[BODYPART_MAXTYPE]
int treatmentLevel[BODYPART_MAXTYPE]
int Sys_Milliseconds(void)
void UI_RegisterText(int dataId, const char *text)
share a text with a data id
@ TEXT_MOUSECURSOR_PLAYERNAMES
void UI_ExecuteConfunc(const char *fmt,...)
Executes confunc - just to identify those confuncs in the code - in this frame.
#define VectorSubtract(a, b, dest)
#define VectorCopy(src, dest)
#define VectorCompare(a, b)
#define Vector2Compare(a, b)
#define VectorDistSqr(a, b)
#define VectorAdd(a, b, dest)
#define DotProduct(x, y)
Returns the distance between two 3-dimensional vectors.
#define VectorSet(v, x, y, z)
#define VectorScale(in, scale, out)