UFO: Alien Invasion
Toggle main menu visibility
Loading...
Searching...
No Matches
e_event_doendround.cpp
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
#include "
../../../../client.h
"
26
#include "
../../../../ui/ui_main.h
"
27
#include "
../../../cl_localentity.h
"
28
#include "
../../../cl_actor.h
"
29
#include "
../../../cl_particle.h
"
30
#include "
../../../cl_hud.h
"
31
#include "
e_event_doendround.h
"
32
39
void
CL_DoEndRound
(
const
eventRegister_t
* self,
dbuffer
* msg)
40
{
41
/* hud changes */
42
if
(
cls
.isOurRound())
43
UI_ExecuteConfunc
(
"endround"
);
44
45
refdef
.rendererFlags &=
~RDF_IRGOGGLES
;
46
47
/* change active player */
48
Com_Printf
(
"Team %i ended round\n"
,
cl
.actTeam);
49
cl
.actTeam =
NET_ReadByte
(msg);
50
Com_Printf
(
"Team %i's round started!\n"
,
cl
.actTeam);
51
52
/* hud changes */
53
if
(
cls
.isOurRound()) {
54
/* check whether a particle has to go */
55
CL_ParticleCheckRounds
();
56
UI_ExecuteConfunc
(
"startround"
);
57
HUD_DisplayMessage
(
_
(
"Your round started!"
));
58
S_StartLocalSample
(
"misc/roundstart"
,
SND_VOLUME_DEFAULT
);
59
CL_ActorConditionalMoveCalc
(
selActor
);
60
}
61
}
CL_ActorConditionalMoveCalc
void CL_ActorConditionalMoveCalc(le_t *le)
Recalculate forbidden list, available moves and actor's move length for the current selected actor.
Definition
cl_actor.cpp:682
selActor
le_t * selActor
Definition
cl_actor.cpp:49
cl_actor.h
cl
clientBattleScape_t cl
Definition
cl_battlescape.cpp:29
HUD_DisplayMessage
void HUD_DisplayMessage(const char *text)
Displays a message on the hud.
Definition
cl_hud.cpp:138
cl_hud.h
HUD related routines.
cl_localentity.h
cls
client_static_t cls
Definition
cl_main.cpp:83
CL_ParticleCheckRounds
void CL_ParticleCheckRounds(void)
checks whether a particle is still active in the current round
Definition
cl_particle.cpp:827
cl_particle.h
RDF_IRGOGGLES
#define RDF_IRGOGGLES
Definition
cl_renderer.h:35
refdef
rendererData_t refdef
Definition
r_main.cpp:45
_
#define _(String)
Definition
cl_shared.h:44
dbuffer
Definition
dbuffer.h:20
client.h
Primary header for client.
Com_Printf
void Com_Printf(const char *const fmt,...)
Definition
common.cpp:428
CL_DoEndRound
void CL_DoEndRound(const eventRegister_t *self, dbuffer *msg)
Performs end-of-turn processing.
Definition
e_event_doendround.cpp:39
e_event_doendround.h
NET_ReadByte
int NET_ReadByte(dbuffer *buf)
Reads a byte from the netchannel.
Definition
netpack.cpp:234
S_StartLocalSample
void S_StartLocalSample(const char *s, float volume)
Plays a sample without spatialization.
Definition
s_mix.cpp:184
SND_VOLUME_DEFAULT
#define SND_VOLUME_DEFAULT
Definition
s_main.h:42
eventRegister_t
Struct that defines one particular event with all its callbacks and data.
Definition
e_main.h:42
UI_ExecuteConfunc
void UI_ExecuteConfunc(const char *fmt,...)
Executes confunc - just to identify those confuncs in the code - in this frame.
Definition
ui_main.cpp:110
ui_main.h
src
client
battlescape
events
event
player
e_event_doendround.cpp
Generated on __DATE__ __TIME__ for UFO: Alien Invasion by
1.17.0