cl_battlescape.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  clientinfo_t
struct  client_state_s
 This is the structure that should be used for data that is needed for tactical missions only. More...

Typedefs

typedef struct client_state_s client_state_t
 This is the structure that should be used for data that is needed for tactical missions only.

Functions

qboolean CL_OnBattlescape (void)
 Check whether we are in a tactical mission as server or as client. But this only means that we are able to render the map - not that the game is running (the team can still be missing - see CL_BattlescapeRunning).
qboolean CL_BattlescapeRunning (void)
 Check whether we already have actors spawned on the battlefield.
int CL_GetHitProbability (const le_t *actor)
 Calculates chance to hit if the actor has a fire mode activated.
qboolean CL_OutsideMap (const vec3_t impact, const float delta)
 Checks whether give position is still inside the map borders.
char * CL_GetConfigString (int index)
int CL_GetConfigStringInteger (int index)
char * CL_SetConfigString (int index, struct dbuffer *msg)

Variables

client_state_t cl

Detailed Description

Definition in file cl_battlescape.h.


Typedef Documentation

This is the structure that should be used for data that is needed for tactical missions only.

Note:
the client_state_t structure is wiped completely at every server map change
See also:
client_static_t

Function Documentation

qboolean CL_BattlescapeRunning ( void   ) 

Check whether we already have actors spawned on the battlefield.

See also:
CL_OnBattlescape
Returns:
true when we are in battlefield and have soldiers spawned (game is running)

Definition at line 36 of file cl_battlescape.c.

References cl.

Referenced by CL_ActorInvMove(), CL_ActorNext_f(), CL_ActorSelect_f(), CL_NextRound_f(), HUD_ActorGetCvarData_f(), SCR_DrawCursor(), UI_BaseInventoryNodeInit(), UI_ContainerNodeAutoPlace(), UI_ContainerNodeDNDFinished(), UI_DrawFree(), and UI_PushNoHud_f().

char* CL_GetConfigString ( int  index  ) 
int CL_GetConfigStringInteger ( int  index  ) 
int CL_GetHitProbability ( const le_t actor  ) 

Calculates chance to hit if the actor has a fire mode activated.

Parameters:
[in] actor The local entity of the actor to calculate the hit probability for.
Todo:
The hit probability should work somewhat differently for splash damage weapons. Since splash damage weapons can deal damage even when they don't directly hit an actor, the hit probability should be defined as the predicted percentage of the maximum splash damage of the firemode, assuming the projectile explodes at the desired location. This means that a percentage should be displayed for EVERY actor in the predicted blast radius. This will likely require specialized code.

Todo:
use LE_FindRadius

Definition at line 130 of file cl_battlescape.c.

References ABILITY_ACCURACY, ABILITY_MIND, le_s::actorMode, CL_ActorGetChr(), CL_LookupErrorFunction(), CL_TestLine(), Com_Error(), fireDef_s::crouch, ERR_DROP, f, le_s::fd, FIRESH_IsMedikit, GET_ACC, GET_INJURY_MULT, le_s::HP, IS_MODE_FIRE_PENDING, LE_GetFromPos(), LE_IsCrouched, LOOKUP_EPSILON, le_s::maxHP, le_s::mousePendPos, mousePos, le_s::origin, PLAYER_CROUCHING_HEIGHT, PLAYER_STANDING_HEIGHT, PLAYER_WIDTH, character_s::score, le_s::selected, SKILL_BALANCE, chrScoreGlobal_s::skills, fireDef_s::spread, TL_FLAG_NONE, torad, UNIT_HEIGHT, VectorCopy, WEAPON_BALANCE, and fireDef_s::weaponSkill.

Referenced by HUD_UpdateActorFireMode().

qboolean CL_OnBattlescape ( void   ) 

Check whether we are in a tactical mission as server or as client. But this only means that we are able to render the map - not that the game is running (the team can still be missing - see CL_BattlescapeRunning).

Note:
handles multiplayer and singleplayer
See also:
CL_BattlescapeRunning
Returns:
true when we are in battlefield

Definition at line 49 of file cl_battlescape.c.

References ca_connected, cls, Com_ServerState(), qfalse, qtrue, and client_static_s::state.

Referenced by CL_LevelDown_f(), CL_LevelUp_f(), CL_SpawnSoldiers_f(), Con_MessageModeSay_f(), Con_MessageModeSayTeam_f(), HUD_ActorSelectionChangeListener(), HUD_LeftHandChangeListener(), HUD_RightHandChangeListener(), HUD_TUChangeListener(), Irc_Client_Invite_f(), Key_Event(), S_Frame(), SAV_GameContinue_f(), SAV_GameQuickLoad_f(), SAV_QuickSave(), and SCR_UpdateScreen().

qboolean CL_OutsideMap ( const vec3_t  position,
const float  delta 
)

Checks whether give position is still inside the map borders.

Parameters:
[in] position The position to check (world coordinate)
[in] delta The delta from the map boundaries. Positive values to make the position being earlier out of the map, negative values to let the position be later out of the map
Returns:
true if the given position is out of the map boundaries, false otherwise.

Definition at line 250 of file cl_battlescape.c.

References cl, mapZBorder, qfalse, and qtrue.

Referenced by CL_ActorDoShootTime(), CL_ActorMouseTrace(), CL_GetEventTime(), and LET_Projectile().

char* CL_SetConfigString ( int  index,
struct dbuffer msg 
)

Variable Documentation

Definition at line 29 of file cl_battlescape.c.

Referenced by B_AssembleMap(), CL_ActorAdd(), CL_ActorAddToTeamList(), CL_ActorAppear(), CL_ActorAppearTime(), CL_ActorCheckAction(), CL_ActorConditionalMoveCalc(), CL_ActorConfirmAction(), CL_ActorConfirmAction_f(), CL_ActorDie(), CL_ActorDoMove(), CL_ActorDoMoveTime(), CL_ActorDoShootTime(), CL_ActorDoThrowTime(), CL_ActorGetChr(), CL_ActorGetNumber(), CL_ActorMouseTrace(), CL_ActorMoveMouse(), CL_ActorRemoveFromTeamList(), CL_ActorSelectList(), CL_ActorSelectNext(), CL_ActorShootHiddenTime(), CL_ActorStartShoot(), CL_ActorStartShootTime(), CL_ActorTraceMove(), CL_AddActor(), CL_AddBrushModel(), CL_AddMapParticle(), CL_AddPathingBox(), CL_AddTargetingBox(), CL_AddUGV(), CL_AreBattlescapeEventsBlocked(), CL_BattlescapeRunning(), CL_BlockBattlescapeEvents(), CL_CameraMove(), CL_CameraRoute(), CL_CameraZoomIn(), CL_CameraZoomOut(), CL_CamSetAngles_f(), CL_CamSetZoom_f(), CL_CanMultiplayerStart(), CL_CenterCameraIntoMap_f(), CL_ClampCamToMap(), CL_ClearState(), CL_ClipMoveToLEs(), CL_CompleteRecalcRouting(), CL_CvarWorldLevel(), CL_DisplayFloorArrows(), CL_DisplayObstructionArrows(), CL_DoEndRound(), CL_DoorClose(), CL_DoorOpen(), CL_EntAppear(), CL_EntPerish(), CL_Frame(), CL_GetConfigString(), CL_GetConfigStringInteger(), CL_GetEventTime(), CL_HullForEntity(), CL_InvReloadTime(), CL_LevelUp_f(), CL_LogEvent(), CL_NextAlien_f(), CL_NextAlienVisibleFromActor_f(), CL_NextRound_f(), CL_OutsideMap(), CL_ParseClientinfo(), CL_ParseConfigString(), CL_ParseEvent(), CL_ParseServerData(), CL_ParticleRun2(), CL_ParticleSpawn(), CL_RecalcRouting(), CL_RequestNextDownload(), CL_Reset(), CL_RunMapParticles(), CL_SequenceRender(), CL_SetConfigString(), CL_SpawnParseEntitystring(), CL_SpawnSoldiers_f(), CL_StartGame(), CL_TargetingGrenade(), CL_TargetingStraight(), CL_TestLine(), CL_Trace(), CL_UpdateCharacterStats(), CL_ViewCalcFieldOfViewX(), CL_ViewCenterAtGridPosition(), CL_ViewLoadMedia(), CL_ViewRender(), CL_ViewUpdateRenderData(), f_Ccall(), f_parser(), GAME_CP_Spawn(), GAME_InitializeBattlescape(), GAME_MP_EndRoundAnnounce(), GAME_Spawn(), GAME_SpawnSoldiers(), HUD_ActorGetCvarData_f(), HUD_ActorSelectionChangeListener(), HUD_DisplayFiremodes(), HUD_MapDebugCursor(), HUD_Update(), HUD_UpdateAllActors(), LE_ActorGetStepTime(), LE_Add(), LE_AddGrenade(), LE_AddProjectile(), LE_AddToScene(), LE_CenterView(), LE_Cleanup(), LE_GenerateInlineModelList(), LE_GetNext(), LE_PlaceItem(), LET_BrushModel(), LET_PathMove(), LET_Projectile(), LM_AddModel(), LM_AddToSceneOrder(), LM_Find(), LM_GetByID(), LM_Register(), LM_Think(), lua_pushcclosure(), luaD_precall(), luaV_execute(), propagatemark(), S_Frame(), S_SpatializeChannel(), SCR_DrawCursor(), SEQ_Execute(), SEQ_InitSequence(), SEQ_SetCamera(), SP_worldspawn(), SV_BroadcastPrintf(), SV_CheckGameStart(), SV_CountPlayers(), SV_DropClient(), SV_FinalMessage(), SV_GetPlayerClientStructure(), SV_Kick_f(), SV_Map(), SV_Multicast(), SV_PlayerPrintf(), SV_ReadPacket(), SV_StartGame_f(), SV_Status_f(), SV_UserInfo_f(), SVC_DirectConnect(), SVC_Info(), SVC_Status(), SVC_TeamInfo(), UI_BuildRadarImageList(), UI_GenAllRadarMap(), UI_GetRadarMapInFrameBuffer(), UI_InitRadar(), UI_RadarNodeCapturedMouseMove(), and UI_RadarNodeDraw().


Generated by  doxygen 1.6.2