X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fclient%2Fmiscfunctions.qc;h=0ecb2b89a5aa7d0c2ea8517fc1a5a2fcb9376c1e;hb=900269c6bbf7fabfb9ab8976d8eace8ea7027271;hp=247dc4b35a64dedc2c7de722420154e9084df48e;hpb=8ad8bf067e165c2953462c45aea4ff2127967ee2;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/client/miscfunctions.qc b/qcsrc/client/miscfunctions.qc index 247dc4b35..0ecb2b89a 100644 --- a/qcsrc/client/miscfunctions.qc +++ b/qcsrc/client/miscfunctions.qc @@ -20,7 +20,7 @@ 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); //reset maptime announcers now as well @@ -31,7 +31,7 @@ void restartAnnouncer_Think() { } 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); @@ -754,3 +754,20 @@ void DrawCircleClippedPic(vector centre, float radius, string pic, float f, vect R_EndPolygon(); } } + +const vector GETPLAYERORIGIN_ERROR = '1123581321 2357111317 3141592653'; // way out of bounds for anything on the map +vector getplayerorigin(float pl) +{ + string s; + entity e; + + s = getplayerkey(pl, "TEMPHACK_origin"); + if(s != "") + return stov(s); + + e = entcs_receiver[pl]; + if(e) + return e.origin; + + return GETPLAYERORIGIN_ERROR; +}