]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
More work on centerprint rendering, plus new feature with sv_fraginfo which allows...
authorSamual <samual@xonotic.org>
Tue, 4 Oct 2011 22:43:31 +0000 (18:43 -0400)
committerSamual <samual@xonotic.org>
Tue, 4 Oct 2011 22:43:31 +0000 (18:43 -0400)
qcsrc/client/hud.qc
qcsrc/server/g_damage.qc

index fff7b5699a8d28ec64153f2559fda31d5218bc2b..98102151d6d166854b5aa354d0dcbd4e3ee9d7e6 100644 (file)
@@ -4610,9 +4610,9 @@ void HUD_CenterPrint (void)
                        a = (centerprint_expire_time[j] - time) / centerprint_fadetime;
                }
                
-               sz = 0.8 + a * (1 - 0.8); // change the size before the other fade effect
-               
                a = a * (bound(0.5, (1 - (i / 2)), 1) * bound(0.5, (1 - (i / 10)), 1));
+               
+               sz = 0.5 + a * (1 - 0.5);
 
                drawfontscale = sz * '1 1 0';
                if (centerprint_countdown_num[j])
@@ -4672,13 +4672,13 @@ void HUD_CenterPrint (void)
                {
                        pos_y = current_msg_pos_y - CENTERPRINT_SPACING * fontsize_y;
                        if (a < 1 && centerprint_msgID[j] == 0) // messages with id can be replaced just after they are faded out, so never move over them the next messages
-                               pos_y += (msg_size + CENTERPRINT_SPACING * fontsize_y) * (1 - sqrt(a));
+                               pos_y += (msg_size + CENTERPRINT_SPACING * fontsize_y);
                }
                else
                {
                        pos_y += CENTERPRINT_SPACING * fontsize_y;
                        if (a < 1 && centerprint_msgID[j] == 0) // messages with id can be replaced just after they are faded out, so never move over them the next messages
-                               pos_y -= (msg_size + CENTERPRINT_SPACING * fontsize_y) * (1 - sqrt(a));
+                               pos_y -= (msg_size + CENTERPRINT_SPACING * fontsize_y);
                }
        }
        drawfontscale = '1 1 0';
index 6258ff9a599b9e337cda35d40b56702d20fec650..3b39ecabe55de450ca01e49572c405bef111ed7e 100644 (file)
@@ -230,8 +230,9 @@ string Obituary_ExtraFragInfo(entity player) // Extra fragmessage information
 
        // health/armor of attacker (person who killed you)
        if(autocvar_sv_fraginfo_stats && (player.health >= 1))
-               health_output = strcat("^7(Health ^1", ftos(rint(player.health)), "^7 / Armor ^2", ftos(rint(player.armorvalue)), "^7)");
-               
+               if((autocvar_sv_fraginfo_stats == 2) || !inWarmupStage)
+                       health_output = strcat("^7(Health ^1", ftos(rint(player.health)), "^7 / Armor ^2", ftos(rint(player.armorvalue)), "^7)");
+       
        // ping display
        if(autocvar_sv_fraginfo_ping)
                ping_output = ((clienttype(player) == CLIENTTYPE_BOT) ? "^2Bot" : strcat("Ping ", ((player.ping >= 150) ? "^1" : "^2"), ftos(player.ping), "ms"));