UFO: Alien Invasion
Toggle main menu visibility
Loading...
Searching...
No Matches
cl_battlescape.h
Go to the documentation of this file.
1
4
5
/*
6
Copyright (C) 2002-2025 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
;
41
camera_t
cam
;
42
43
le_t
*
teamList
[
MAX_ACTIVETEAM
];
44
int
numTeamList
;
45
int
numEnemiesSpotted
;
46
47
bool
eventsBlocked
;
48
50
int
pnum
;
51
int
actTeam
;
52
53
char
configstrings
[
MAX_CONFIGSTRINGS
][
MAX_TOKEN_CHARS
];
54
56
model_t
*
model_draw
[
MAX_MODELS
];
57
const
struct
cBspModel_s*
model_clip
[
MAX_MODELS
];
58
59
bool
radarInitialized
;
60
61
clientinfo_t
clientinfo
[
MAX_CLIENTS
];
62
63
int
mapMaxLevel
;
64
66
int
numMapParticles
;
67
68
int
numLMs
;
69
localModel_t
LMs
[
MAX_LOCALMODELS
];
70
71
int
numLEs
;
72
le_t
LEs
[
MAX_EDICTS
];
73
74
const
char
*
leInlineModelList
[
MAX_EDICTS
+ 1];
75
76
bool
spawned
;
78
bool
started
;
79
80
mapData_t
*
mapData
;
81
82
pathing_t
pathMap
;
83
84
mapTiles_t
*
mapTiles
;
85
86
linkedList_t
*
chrList
;
87
88
inline
clientBattleScape_s
() :
89
time
(0),
90
cam
(
camera_t
()),
91
numTeamList
(0),
92
numEnemiesSpotted
(0),
93
eventsBlocked
(false),
94
pnum
(0),
95
actTeam
(0),
96
radarInitialized
(false),
97
mapMaxLevel
(0),
98
numMapParticles
(0),
99
numLMs
(0),
100
numLEs
(0),
101
spawned
(false),
102
started
(false),
103
mapData
(
nullptr
),
104
mapTiles
(
nullptr
),
105
chrList
(
nullptr
)
106
{
107
for
(
int
i
= 0;
i
<
MAX_ACTIVETEAM
;
i
++)
108
teamList
[
i
] =
nullptr
;
109
for
(
int
i
= 0;
i
<
MAX_CONFIGSTRINGS
;
i
++)
110
configstrings
[
i
][0] =
'\0'
;
111
for
(
int
i
= 0;
i
<
MAX_MODELS
;
i
++) {
112
model_draw
[
i
] =
nullptr
;
113
model_clip
[
i
] =
nullptr
;
114
}
115
for
(
int
i
= 0;
i
<
MAX_EDICTS
+ 1;
i
++) {
116
leInlineModelList
[
i
] =
nullptr
;
117
if
(
i
<
MAX_EDICTS
)
118
LEs
[
i
] =
le_t
();
119
}
120
for
(
int
i
= 0;
i
<
MAX_CLIENTS
;
i
++)
121
clientinfo
[
i
] =
clientinfo_t
();
122
for
(
int
i
= 0;
i
<
MAX_LOCALMODELS
;
i
++)
123
LMs
[
i
] =
localModel_t
();
124
pathMap
=
pathing_t
();
125
}
126
}
clientBattleScape_t
;
127
128
extern
clientBattleScape_t
cl
;
129
130
le_t
*
CL_BattlescapeSearchAtGridPos
(
const
pos3_t
pos,
bool
includingStunned,
const
le_t
* actor);
131
bool
CL_OnBattlescape
(
void
);
132
bool
CL_BattlescapeRunning
(
void
);
133
int
CL_GetHitProbability
(
const
le_t
* actor);
134
bool
CL_OutsideMap
(
const
vec3_t
impact,
const
float
delta);
135
int
CL_CountVisibleEnemies
(
void
);
136
char
*
CL_GetConfigString
(
int
index
);
137
int
CL_GetConfigStringInteger
(
int
index
);
138
char
*
CL_SetConfigString
(
int
index
,
dbuffer
* msg);
139
#ifdef DEBUG
140
void
Grid_DumpWholeClientMap_f(
void
);
141
void
Grid_DumpClientRoutes_f(
void
);
142
#endif
cl
clientBattleScape_t cl
Definition
cl_battlescape.cpp:29
CL_OutsideMap
bool CL_OutsideMap(const vec3_t impact, const float delta)
Checks whether give position is still inside the map borders.
Definition
cl_battlescape.cpp:296
CL_GetConfigString
char * CL_GetConfigString(int index)
Definition
cl_battlescape.cpp:360
CL_GetHitProbability
int CL_GetHitProbability(const le_t *actor)
Calculates chance to hit if the actor has a fire mode activated.
Definition
cl_battlescape.cpp:176
CL_BattlescapeSearchAtGridPos
le_t * CL_BattlescapeSearchAtGridPos(const pos3_t pos, bool includingStunned, const le_t *actor)
Searches a local entity at the given position.
Definition
cl_battlescape.cpp:37
CL_GetConfigStringInteger
int CL_GetConfigStringInteger(int index)
Definition
cl_battlescape.cpp:368
CL_SetConfigString
char * CL_SetConfigString(int index, dbuffer *msg)
Definition
cl_battlescape.cpp:373
CL_CountVisibleEnemies
int CL_CountVisibleEnemies(void)
Counts visible enemies on the battlescape.
Definition
cl_battlescape.cpp:319
CL_OnBattlescape
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...
Definition
cl_battlescape.cpp:95
CL_BattlescapeRunning
bool CL_BattlescapeRunning(void)
Check whether we already have actors spawned on the battlefield.
Definition
cl_battlescape.cpp:82
MAX_LOCALMODELS
#define MAX_LOCALMODELS
Definition
cl_localentity.h:203
dbuffer
Definition
dbuffer.h:20
nullptr
#define nullptr
Definition
cxx.h:53
MAX_EDICTS
#define MAX_EDICTS
Definition
defines.h:99
MAX_ACTIVETEAM
#define MAX_ACTIVETEAM
Definition
defines.h:41
MAX_TOKEN_CHARS
#define MAX_TOKEN_CHARS
Definition
defines.h:372
MAX_MODELS
#define MAX_MODELS
Definition
defines.h:100
grid.h
Battlescape grid functions.
MAX_CLIENTS
#define MAX_CLIENTS
Definition
q_shared.h:299
MAX_CONFIGSTRINGS
#define MAX_CONFIGSTRINGS
Definition
q_shared.h:330
index
QGL_EXTERN GLuint index
Definition
r_gl.h:110
i
QGL_EXTERN GLint i
Definition
r_gl.h:113
MAX_VAR
#define MAX_VAR
Definition
shared.h:36
camera_t
Definition
cl_camera.h:30
clientBattleScape_t
This is the structure that should be used for data that is needed for tactical missions only.
Definition
cl_battlescape.h:38
clientBattleScape_t::configstrings
char configstrings[MAX_CONFIGSTRINGS][MAX_TOKEN_CHARS]
Definition
cl_battlescape.h:53
clientBattleScape_t::mapTiles
mapTiles_t * mapTiles
Definition
cl_battlescape.h:84
clientBattleScape_t::mapMaxLevel
int mapMaxLevel
Definition
cl_battlescape.h:63
clientBattleScape_t::cam
camera_t cam
Definition
cl_battlescape.h:41
clientBattleScape_t::teamList
le_t * teamList[MAX_ACTIVETEAM]
Definition
cl_battlescape.h:43
clientBattleScape_t::LEs
le_t LEs[MAX_EDICTS]
Definition
cl_battlescape.h:72
clientBattleScape_t::leInlineModelList
const char * leInlineModelList[MAX_EDICTS+1]
Definition
cl_battlescape.h:74
clientBattleScape_t::model_draw
model_t * model_draw[MAX_MODELS]
Definition
cl_battlescape.h:56
clientBattleScape_t::time
int time
Definition
cl_battlescape.h:39
clientBattleScape_t::numTeamList
int numTeamList
Definition
cl_battlescape.h:44
clientBattleScape_t::numMapParticles
int numMapParticles
Definition
cl_battlescape.h:66
clientBattleScape_t::actTeam
int actTeam
Definition
cl_battlescape.h:51
clientBattleScape_t::radarInitialized
bool radarInitialized
Definition
cl_battlescape.h:59
clientBattleScape_t::model_clip
const struct cBspModel_s * model_clip[MAX_MODELS]
Definition
cl_battlescape.h:57
clientBattleScape_t::spawned
bool spawned
Definition
cl_battlescape.h:76
clientBattleScape_t::clientinfo
clientinfo_t clientinfo[MAX_CLIENTS]
Definition
cl_battlescape.h:61
clientBattleScape_t::numEnemiesSpotted
int numEnemiesSpotted
Definition
cl_battlescape.h:45
clientBattleScape_t::LMs
localModel_t LMs[MAX_LOCALMODELS]
Definition
cl_battlescape.h:69
clientBattleScape_t::mapData
mapData_t * mapData
Definition
cl_battlescape.h:80
clientBattleScape_t::numLMs
int numLMs
Definition
cl_battlescape.h:68
clientBattleScape_t::chrList
linkedList_t * chrList
Definition
cl_battlescape.h:86
clientBattleScape_t::eventsBlocked
bool eventsBlocked
Definition
cl_battlescape.h:47
clientBattleScape_t::numLEs
int numLEs
Definition
cl_battlescape.h:71
clientBattleScape_t::started
bool started
Definition
cl_battlescape.h:78
clientBattleScape_t::pathMap
pathing_t pathMap
Definition
cl_battlescape.h:82
clientBattleScape_t::clientBattleScape_s
clientBattleScape_s()
Definition
cl_battlescape.h:88
clientBattleScape_t::pnum
int pnum
Definition
cl_battlescape.h:50
clientinfo_t
Definition
cl_battlescape.h:29
clientinfo_t::name
char name[MAX_VAR]
Definition
cl_battlescape.h:30
le_t
a local entity
Definition
cl_localentity.h:65
linkedList_t
Definition
list.h:30
localModel_t
local models
Definition
cl_localentity.h:206
mapData_t
Definition
typedefs.h:329
mapTiles_t
Definition
tracing.h:77
model_t
Definition
r_model.h:43
pathing_t
Definition
grid.h:83
pos3_t
pos_t pos3_t[3]
Definition
ufotypes.h:58
vec3_t
vec_t vec3_t[3]
Definition
ufotypes.h:39
src
client
battlescape
cl_battlescape.h
Generated on __DATE__ __TIME__ for UFO: Alien Invasion by
1.17.0