From: Samual Date: Thu, 7 Jul 2011 22:15:25 +0000 (-0400) Subject: Merge remote branch 'origin/master' into terencehill/centerprint_stuff X-Git-Tag: xonotic-v0.5.0~151 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=42b501c5da481b2598db9bfc1b93b06fede3657a;p=xonotic%2Fxonotic-data.pk3dir.git Merge remote branch 'origin/master' into terencehill/centerprint_stuff --- 42b501c5da481b2598db9bfc1b93b06fede3657a diff --cc qcsrc/client/miscfunctions.qc index 0ecb2b89a,da09230db..77f409925 --- a/qcsrc/client/miscfunctions.qc +++ b/qcsrc/client/miscfunctions.qc @@@ -20,9 -20,9 +20,9 @@@ void restartAnnouncer_Think() countdown_rounded = floor(0.5 + countdown); if(countdown <= 0) { if (!spectatee_status) //do cprint only for players - centerprint(_("^1Begin!")); + centerprint_generic(CPID_GAME_STARTING, _("^1Begin!"), 1, 0); - sound(world, CHAN_AUTO, strcat("announcer/", autocvar_cl_announcer, "/begin.wav"), VOL_BASEVOICE, ATTN_NONE); + sound(world, CH_INFO, strcat("announcer/", autocvar_cl_announcer, "/begin.wav"), VOL_BASEVOICE, ATTN_NONE); //reset maptime announcers now as well announcer_5min = announcer_1min = FALSE; @@@ -31,10 -31,10 +31,10 @@@ } else { if (!spectatee_status) //do cprint only for players - centerprint(sprintf(_("^1Game starts in %d seconds"), countdown_rounded)); + centerprint_generic(CPID_GAME_STARTING, _("^1Game starts in %d seconds"), 1, countdown_rounded); if(countdown_rounded <= 3 && countdown_rounded >= 1) { - sound(world, CHAN_AUTO, strcat("announcer/", autocvar_cl_announcer, "/", ftos(countdown_rounded), ".wav"), VOL_BASEVOICE, ATTN_NONE); + sound(world, CH_INFO, strcat("announcer/", autocvar_cl_announcer, "/", ftos(countdown_rounded), ".wav"), VOL_BASEVOICE, ATTN_NONE); } self.nextthink = getstatf(STAT_GAMESTARTTIME) - (countdown - 1); diff --cc qcsrc/server/cl_client.qc index 144e849e1,5b9c8d907..3ccd515fc --- a/qcsrc/server/cl_client.qc +++ b/qcsrc/server/cl_client.qc @@@ -2001,9 -1987,50 +2001,9 @@@ void play_countdown(float finished, str if(clienttype(self) == CLIENTTYPE_REAL) if(floor(finished - time - frametime) != floor(finished - time)) if(finished - time < 6) - sound (self, CHAN_AUTO, samp, VOL_BASE, ATTN_NORM); + sound (self, CH_INFO, samp, VOL_BASE, ATTN_NORM); } -/** - * When sv_timeout is used this function returs strings like - * "Timeout begins in 2 seconds!\n" or "Timeout ends in 23 seconds!\n". - * Called by centerprint functions - * @param addOneSecond boolean, set to 1 if the welcome-message centerprint asks for the text - */ -string getTimeoutText(float addOneSecond) { - if (!autocvar_sv_timeout || !timeoutStatus) - return ""; - - local string retStr; - if (timeoutStatus == 1) { - if (addOneSecond == 1) { - retStr = strcat("Timeout begins in ", ftos(remainingLeadTime + 1), " seconds!\n"); - } - else { - retStr = strcat("Timeout begins in ", ftos(remainingLeadTime), " seconds!\n"); - } - return retStr; - } - else if (timeoutStatus == 2) { - if (addOneSecond) { - retStr = strcat("Timeout ends in ", ftos(remainingTimeoutTime + 1), " seconds!\n"); - //don't show messages like "Timeout ends in 0 seconds"... - if ((remainingTimeoutTime + 1) > 0) - return retStr; - else - return ""; - } - else { - retStr = strcat("Timeout ends in ", ftos(remainingTimeoutTime), " seconds!\n"); - //don't show messages like "Timeout ends in 0 seconds"... - if (remainingTimeoutTime > 0) - return retStr; - else - return ""; - } - } - else return ""; -} - void player_powerups (void) { // add a way to see what the items were BEFORE all of these checks for the mutator hook diff --cc qcsrc/server/mutators/gamemode_keepaway.qc index 5a3c42e3f,ac6d5dccd..85e77fe77 --- a/qcsrc/server/mutators/gamemode_keepaway.qc +++ b/qcsrc/server/mutators/gamemode_keepaway.qc @@@ -127,8 -127,8 +127,8 @@@ void ka_TouchEvent() // runs any time t // messages and sounds Send_KillNotification(other.netname, "", "", KA_PICKUPBALL, MSG_KA); WriteByte(MSG_BROADCAST, SVC_CENTERPRINT); - WriteString(MSG_BROADCAST, strcat("\n\n", other.netname, "^7 has picked up the ball!\n")); + WriteString(MSG_BROADCAST, strcat(other.netname, "^7 has picked up the ball!")); - sound(self.owner, CHAN_AUTO, "keepaway/pickedup.wav", VOL_BASE, ATTN_NONE); // ATTN_NONE (it's a sound intended to be heard anywhere) + sound(self.owner, CH_TRIGGER, "keepaway/pickedup.wav", VOL_BASE, ATTN_NONE); // ATTN_NONE (it's a sound intended to be heard anywhere) // scoring PlayerScore_Add(other, SP_KEEPAWAY_PICKUPS, 1); @@@ -169,8 -169,8 +169,13 @@@ void ka_DropEvent(entity plyr) // runs // messages and sounds Send_KillNotification(plyr.netname, "", "", KA_DROPBALL, MSG_KA); WriteByte(MSG_BROADCAST, SVC_CENTERPRINT); ++<<<<<<< HEAD + WriteString(MSG_BROADCAST, strcat("\n\n", plyr.netname, "^7 has dropped the ball!\n")); + sound(plyr, CH_TRIGGER, "keepaway/dropped.wav", VOL_BASE, ATTN_NONE); // ATTN_NONE (it's a sound intended to be heard anywhere) ++======= + WriteString(MSG_BROADCAST, strcat(plyr.netname, "^7 has dropped the ball!")); + sound(other, CHAN_AUTO, "keepaway/dropped.wav", VOL_BASE, ATTN_NONE); // ATTN_NONE (it's a sound intended to be heard anywhere) ++>>>>>>> terencehill/centerprint_stuff // scoring // PlayerScore_Add(plyr, SP_KEEPAWAY_DROPS, 1); Not anymore, this is 100% the same as pickups and is useless.