]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fixed missing centerprints, better alignement in scoreboard for secrets
authorPrzemysław Grzywacz <nexather@gmail.com>
Sun, 23 Oct 2011 09:32:36 +0000 (11:32 +0200)
committerPrzemysław Grzywacz <nexather@gmail.com>
Sun, 23 Oct 2011 09:32:36 +0000 (11:32 +0200)
qcsrc/client/scoreboard.qc
qcsrc/server/secret.qc

index 1e24e8272d0881084893da67cc65f95521a5a783..fb907555c21f22769564c670ae93e0e00495abe7 100644 (file)
@@ -1055,9 +1055,9 @@ vector HUD_DrawScoreboardAccuracyStats(vector pos, vector rgb, vector bg_size)
 
 vector HUD_DrawKeyValue(vector pos, string key, string value) {
        float px = pos_x;
-       pos_x += hud_fontsize_x;
+       pos_x += hud_fontsize_x * 0.25;
        drawstring(pos, key, hud_fontsize, '1 1 1', scoreboard_alpha_fg, DRAWFLAG_NORMAL);
-       pos_x = xmax - stringwidth(value, FALSE, hud_fontsize) - hud_fontsize_x;
+       pos_x = xmax - stringwidth(value, FALSE, hud_fontsize) - hud_fontsize_x * 0.25;
        drawstring(pos, value, hud_fontsize, '1 1 1', scoreboard_alpha_fg, DRAWFLAG_NORMAL);
        pos_x = px;
        pos_y+= hud_fontsize_y;
index ca4a49cf4035b760c9da07aadca904fe2c602696..2694cb3d6f536ac506b49b4b05f0b07ee9a75389 100644 (file)
@@ -17,6 +17,10 @@ void trigger_secret_touch() {
        secrets_found += 1;
        //print("Secret found: ", ftos(secret_counter.cnt), "/");
        //print(ftos(secret_counter.count), "\n");
+
+       // centerprint message (multi_touch() doesn't always call centerprint())
+       centerprint(other, self.message);
+       self.message = "";
        
        // handle normal trigger features
        multi_touch();