summaryrefslogtreecommitdiff
path: root/src/cgame
diff options
context:
space:
mode:
authorPaweł Redman <trem.redman@gmail.com>2013-09-09 23:24:54 +0200
committerPaweł Redman <trem.redman@gmail.com>2013-09-09 23:24:54 +0200
commit37b8af1e6eb90378f1290b5130c8b6882b06a219 (patch)
tree1f8c00819cf59b7147e657dcb90d9ccc2e0d7989 /src/cgame
parent27a16fb1fa69d458fb10e6437eb07b85496b46b8 (diff)
0.1.3
Diffstat (limited to 'src/cgame')
-rw-r--r--src/cgame/cg_local.h5
-rw-r--r--src/cgame/cg_servercmds.c30
2 files changed, 32 insertions, 3 deletions
diff --git a/src/cgame/cg_local.h b/src/cgame/cg_local.h
index 11133bf..7dd951b 100644
--- a/src/cgame/cg_local.h
+++ b/src/cgame/cg_local.h
@@ -2171,11 +2171,12 @@ typedef enum
// mod version data
-#define MODVER_CURRENT 3
+#define MODVER_CURRENT 4
+#define MODVER_C2_0_1_3 4
#define MODVER_C2_0_1_2 3
#define MODVER_C2_0_1_1 2
#define MODVER_C2_0_1_0 1
-#define MODVER_TITLE "0.1.2 (Sep 09)"
+#define MODVER_TITLE "0.1.3 (Sep 10)"
diff --git a/src/cgame/cg_servercmds.c b/src/cgame/cg_servercmds.c
index 48a5a60..f11aa7e 100644
--- a/src/cgame/cg_servercmds.c
+++ b/src/cgame/cg_servercmds.c
@@ -1259,6 +1259,33 @@ static void CG_PoisonCloud_f( void )
}
}
+/*
+=================
+CG_VoteEvent_f
+
+Vote sounds use commands to save on events and entities
+=================
+*/
+static void CG_VoteEvent( void )
+{
+ const char *event, *soundName;
+
+ if( trap_Argc( ) != 2 )
+ return;
+
+ event = CG_Argv( 1 );
+
+ if( !Q_stricmp( event, "votenow" ) ||
+ !Q_stricmp( event, "votecancelled" ) ||
+ !Q_stricmp( event, "votefailed" ) ||
+ !Q_stricmp( event, "votepassed" ) )
+ soundName = va( "sound/feedback/%s.wav", event );
+ else
+ return;
+
+ trap_S_StartLocalSound( trap_S_RegisterSound( soundName, qfalse ), CHAN_VOICE );
+}
+
static void CG_GameCmds_f( void )
{
int i;
@@ -1290,7 +1317,8 @@ static consoleCommand_t svcommands[ ] =
{ "serverclosemenus", CG_ServerCloseMenus_f },
{ "servermenu", CG_ServerMenu_f },
{ "tinfo", CG_ParseTeamInfo },
- { "voice", CG_ParseVoice }
+ { "voice", CG_ParseVoice },
+ { "voteevent", CG_VoteEvent }
};
/*