e_event_doendround.c

Go to the documentation of this file.
00001 
00005 /*
00006 Copyright (C) 2002-2010 UFO: Alien Invasion.
00007 
00008 This program is free software; you can redistribute it and/or
00009 modify it under the terms of the GNU General Public License
00010 as published by the Free Software Foundation; either version 2
00011 of the License, or (at your option) any later version.
00012 
00013 This program is distributed in the hope that it will be useful,
00014 but WITHOUT ANY WARRANTY; without even the implied warranty of
00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00016 
00017 See the GNU General Public License for more details.
00018 
00019 You should have received a copy of the GNU General Public License
00020 along with this program; if not, write to the Free Software
00021 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00022 
00023 */
00024 
00025 #include "../../../../client.h"
00026 #include "../../../../ui/ui_main.h"
00027 #include "../../../cl_localentity.h"
00028 #include "../../../cl_actor.h"
00029 #include "../../../cl_particle.h"
00030 #include "../../../cl_hud.h"
00031 #include "e_event_doendround.h"
00032 
00039 void CL_DoEndRound (const eventRegister_t *self, struct dbuffer *msg)
00040 {
00041     /* hud changes */
00042     if (cls.team == cl.actTeam)
00043         UI_ExecuteConfunc("endround");
00044 
00045     refdef.rendererFlags &= ~RDF_IRGOGGLES;
00046 
00047     /* change active player */
00048     Com_Printf("Team %i ended round\n", cl.actTeam);
00049     cl.actTeam = NET_ReadByte(msg);
00050     Com_Printf("Team %i's round started!\n", cl.actTeam);
00051 
00052     /* hud changes */
00053     if (cls.team == cl.actTeam) {
00054         /* check whether a particle has to go */
00055         CL_ParticleCheckRounds();
00056         UI_ExecuteConfunc("startround");
00057         HUD_DisplayMessage(_("Your round started!\n"));
00058         S_StartLocalSample("misc/roundstart", SND_VOLUME_DEFAULT);
00059         CL_ActorConditionalMoveCalc(selActor);
00060     }
00061 }
00062 

Generated by  doxygen 1.6.2