From ed72dc0e7aefb4b69c1e851a2a58d41f841100b4 Mon Sep 17 00:00:00 2001 From: flowtron Date: Mon, 2 Aug 2010 23:19:46 +0000 Subject: [PATCH] really use the new VCs - plus attribution to DES|GeneralDisarray in creditmenu.cfg git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5529 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- config/creditmenu.cfg | 4 +++- config/menu_voicecom_v2.cfg | 12 ++++++------ config/sounds.cfg | 20 ++++++++++++-------- source/src/audiomanager.cpp | 2 +- source/src/server.cpp | 2 +- source/src/sound.h | 16 ++++++++++------ 6 files changed, 33 insertions(+), 23 deletions(-) diff --git a/config/creditmenu.cfg b/config/creditmenu.cfg index 1bd39436..f4f6b260 100644 --- a/config/creditmenu.cfg +++ b/config/creditmenu.cfg @@ -65,7 +65,9 @@ menuitem "> Kirin Code contributions and fixes, client stuff, advice" menuitem "> Rick Helmus Bot code." -1 menuitem "> stef Bug fixes, additional code, server stuff, new modes." -1 menuitem "> Verbal_ Q&A, advisor, lead tester, pro-coffee service." -1 -loop e 17 [ menuitem "" -1 ] +menuitem [> Goran "DES|GeneralDisarray" Dejanovic] +menuitem " Effects on the VoiceComs" +loop e 15 [ menuitem "" -1 ] menuitem " ---- [ VVV ] --------------- PAGE DOWN.." -1 menuitem " ---- [ ^^^ ] --------------- ..PAGE UP.." -1 menuitem " Resources" -1 diff --git a/config/menu_voicecom_v2.cfg b/config/menu_voicecom_v2.cfg index b5386f34..de225203 100644 --- a/config/menu_voicecom_v2.cfg +++ b/config/menu_voicecom_v2.cfg @@ -30,9 +30,9 @@ newmenu "Team Replies" 1 1 // the following two mirror F1/F2 - disagree/agree genvcitem [Yes Affirmative "All right, Sir"] "yes affirmative allrightsir" 1 // # genvcitem ["Negative" "No can do" "There's no way, Sir!"] "negative nocando theresnowaysir" 2 // * -genvcitem ["Under way" "On the move"] "underway onthemove" 3 -genvcitem "Got your back!" goturback 4 -genvcitem "In Position!" inposition 5 +genvcitem ["On the move" "On my way"] "onthemove_1 onthemove_2" 3 +genvcitem ["Got your back!" "Got you covered!"] "igotyourback igotyoucovered" 4 +genvcitem ["In Position!" "In Position now!"] "inposition_1 inposition_2" 5 // V 2 [ 1,2,3 ] newmenu "Team Commands" 1 1 @@ -63,6 +63,6 @@ genvcitem "Report In!" reportin // V 6 [ 1,2,3 ] newmenu "Public Talk" 1 1 -genvcitem "Nice shot" niceshot 1 -genvcitem "Thanks" thanks 2 -genvcitem "Awesome" awesome 3 +genvcitem "Nice shot" niceshot 1 +genvcitem ["Thanks!" "Thanks, man"] "thanks_1 thanks_2" 2 +genvcitem ["Awesome" "Awesome!"] "awesome_1 awesome_2" 3 diff --git a/config/sounds.cfg b/config/sounds.cfg index 23370e22..533ca800 100755 --- a/config/sounds.cfg +++ b/config/sounds.cfg @@ -97,14 +97,18 @@ registersound "voicecom/staytogether" // 83 registersound "voicecom/theresnowaysir" // 84 registersound "voicecom/wedidit" // 85 registersound "voicecom/yes" // 86 -registersound "voicecom/underway" // 87 -registersound "voicecom/onthemove" // 88 -registersound "voicecom/goturback" // 89 -registersound "voicecom/inposition" // 90 -registersound "voicecom/reportin" // 91 -registersound "voicecom/niceshot" // 92 : public -registersound "voicecom/thanks" // 93 : public -registersound "voicecom/awesome" // 94 : public +registersound "voicecom/onthemove_1" // 87 +registersound "voicecom/onthemove_2" // 88 +registersound "voicecom/igotyourback" // 89 +registersound "voicecom/igotyoucovered" // 90 +registersound "voicecom/inposition_1" // 91 +registersound "voicecom/inposition_2" // 92 +registersound "voicecom/reportin" // 93 +registersound "voicecom/niceshot" // 94 : public +registersound "voicecom/thanks_1" // 95 : public +registersound "voicecom/thanks_2" // 96 : public +registersound "voicecom/awesome_1" // 97 : public +registersound "voicecom/awesome_2" // 98 : public // Music registermusic "pingpong/03-pp-kamikadze" // M_FLAGGRAB diff --git a/source/src/audiomanager.cpp b/source/src/audiomanager.cpp index f1edeaa3..965dd01d 100644 --- a/source/src/audiomanager.cpp +++ b/source/src/audiomanager.cpp @@ -409,7 +409,7 @@ void voicecom(char *sound, char *text) { defformatstring(soundpath)("voicecom/%s", sound); int s = audiomgr.findsound(soundpath, 0, gamesounds); - if(s < 0 || s < S_AFFIRMATIVE || s > S_AWESOME) return; + if(s < 0 || s < S_AFFIRMATIVE || s >= S_NULL) return; audiomgr.playsound(s, SP_HIGH); if(s >= S_NICESHOT) // public { diff --git a/source/src/server.cpp b/source/src/server.cpp index 77305028..dc493edc 100644 --- a/source/src/server.cpp +++ b/source/src/server.cpp @@ -2580,7 +2580,7 @@ void process(ENetPacket *packet, int sender, int chan) /* spam filter */ if ( servmillis > cl->mute ) // client is not muted { - if( s < S_AFFIRMATIVE || s > S_AWESOME ) cl->mute = servmillis + 10000; // vc is invalid + if( s < S_AFFIRMATIVE || s >= S_NULL ) cl->mute = servmillis + 10000; // vc is invalid else if ( cl->lastvc + 4000 < servmillis ) { if ( cl->spam > 0 ) cl->spam -= (servmillis - cl->lastvc) / 4000; } // no vc in the last 4 seconds else cl->spam++; // the guy is spamming if ( cl->spam < 0 ) cl->spam = 0; diff --git a/source/src/sound.h b/source/src/sound.h index 82b38d8e..6b9f1588 100644 --- a/source/src/sound.h +++ b/source/src/sound.h @@ -30,7 +30,7 @@ enum S_MENUSELECT, S_MENUENTER, S_UNDERWATER, S_TINNITUS, - +// begin: voicecoms S_AFFIRMATIVE, S_ALLRIGHTSIR, S_COMEONMOVE, @@ -55,14 +55,18 @@ enum S_THERESNOWAYSIR, S_WEDIDIT, S_YES, - S_UNDERWAY, - S_ONTHEMOVE, + S_ONTHEMOVE1, + S_ONTHEMOVE2, S_GOTURBACK, - S_INPOSITION, + S_GOTUCOVERED, + S_INPOSITION1, + S_INPOSITION2, S_REPORTIN, S_NICESHOT, // begin: public - S_THANKS, - S_AWESOME, + S_THANKS1, + S_THANKS2, + S_AWESOME1, + S_AWESOME2, S_NULL };