UFO: Alien Invasion
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
cl_battlescape.h
Go to the documentation of this file.
1 
5 /*
6 Copyright (C) 2002-2020 UFO: Alien Invasion.
7 
8 This program is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License
10 as published by the Free Software Foundation; either version 2
11 of the License, or (at your option) any later version.
12 
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16 
17 See the GNU General Public License for more details.
18 
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 
23 */
24 
25 #pragma once
26 
27 #include "../../common/grid.h"
28 
29 typedef struct {
30  char name[MAX_VAR];
31 } clientinfo_t;
32 
38 typedef struct clientBattleScape_s {
39  int time;
42 
46 
50  int pnum;
51  int actTeam;
54 
58 
64 
67 
68  int numLMs;
70 
71  int numLEs;
73 
74  const char* leInlineModelList[MAX_EDICTS + 1];
75 
76  bool spawned;
78  bool started;
81 
85 
88 
89 extern clientBattleScape_t cl;
90 
91 le_t* CL_BattlescapeSearchAtGridPos(const pos3_t pos, bool includingStunned, const le_t* actor);
92 bool CL_OnBattlescape(void);
93 bool CL_BattlescapeRunning(void);
94 int CL_GetHitProbability(const le_t* actor);
95 bool CL_OutsideMap(const vec3_t impact, const float delta);
96 int CL_CountVisibleEnemies(void);
97 char* CL_GetConfigString(int index);
99 char* CL_SetConfigString(int index, dbuffer* msg);
100 #ifdef DEBUG
101 void Grid_DumpWholeClientMap_f(void);
102 void Grid_DumpClientRoutes_f(void);
103 #endif
This is the structure that should be used for data that is needed for tactical missions only...
linkedList_t * chrList
int CL_GetHitProbability(const le_t *actor)
Calculates chance to hit if the actor has a fire mode activated.
char * CL_GetConfigString(int index)
bool CL_OutsideMap(const vec3_t impact, const float delta)
Checks whether give position is still inside the map borders.
char configstrings[MAX_CONFIGSTRINGS][MAX_TOKEN_CHARS]
struct clientBattleScape_s clientBattleScape_t
This is the structure that should be used for data that is needed for tactical missions only...
clientBattleScape_t cl
localModel_t LMs[MAX_LOCALMODELS]
bool CL_BattlescapeRunning(void)
Check whether we already have actors spawned on the battlefield.
const char * leInlineModelList[MAX_EDICTS+1]
le_t LEs[MAX_EDICTS]
le_t * CL_BattlescapeSearchAtGridPos(const pos3_t pos, bool includingStunned, const le_t *actor)
Searches a local entity at the given position.
bool CL_OnBattlescape(void)
Check whether we are in a tactical mission as server or as client. But this only means that we are ab...
#define MAX_CLIENTS
Definition: q_shared.h:299
mapTiles_t * mapTiles
#define MAX_VAR
Definition: shared.h:36
model_t * model_draw[MAX_MODELS]
int CL_CountVisibleEnemies(void)
Counts visible enemies on the battlescape.
#define MAX_TOKEN_CHARS
Definition: defines.h:372
#define MAX_LOCALMODELS
Definition: grid.h:83
#define MAX_CONFIGSTRINGS
Definition: q_shared.h:330
int CL_GetConfigStringInteger(int index)
pos_t pos3_t[3]
Definition: ufotypes.h:58
const struct cBspModel_s * model_clip[MAX_MODELS]
QGL_EXTERN GLuint index
Definition: r_gl.h:110
clientinfo_t clientinfo[MAX_CLIENTS]
a local entity
#define MAX_MODELS
Definition: defines.h:100
QGL_EXTERN GLuint GLsizei GLsizei GLint GLenum GLchar * name
Definition: r_gl.h:110
#define MAX_ACTIVETEAM
Definition: defines.h:41
vec_t vec3_t[3]
Definition: ufotypes.h:39
le_t * teamList[MAX_ACTIVETEAM]
local models
char * CL_SetConfigString(int index, dbuffer *msg)
#define MAX_EDICTS
Definition: defines.h:99