diff options
Diffstat (limited to 'src/cgame')
-rw-r--r-- | src/cgame/cg_local.h | 5 | ||||
-rw-r--r-- | src/cgame/cg_servercmds.c | 30 |
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 } }; /* |