]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/miscfunctions.qc
Merge branch 'master' into terencehill/centerprint_stuff
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / miscfunctions.qc
index c3f7d6bda9c3a33ae81ea6e44962c800fbc2f270..0ecb2b89a5aa7d0c2ea8517fc1a5a2fcb9376c1e 100644 (file)
@@ -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);
@@ -766,9 +766,8 @@ vector getplayerorigin(float pl)
                return stov(s);
 
        e = entcs_receiver[pl];
-       if(e.classname == "entcs_receiver")
-               if(e.sv_entnum == pl)
-                       return e.origin;
+       if(e)
+               return e.origin;
 
        return GETPLAYERORIGIN_ERROR;
 }