From: Samual Date: Tue, 4 Oct 2011 22:43:31 +0000 (-0400) Subject: More work on centerprint rendering, plus new feature with sv_fraginfo which allows... X-Git-Tag: xonotic-v0.6.0~35^2~78^2~7^2~57 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=319d100049736c6233f59cee73f8fa4e69f4c1c0;p=xonotic%2Fxonotic-data.pk3dir.git More work on centerprint rendering, plus new feature with sv_fraginfo which allows it to only show health/armor of attacker when in warmup (normal matches then don't show this information) --- diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc index fff7b5699..98102151d 100644 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@ -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'; diff --git a/qcsrc/server/g_damage.qc b/qcsrc/server/g_damage.qc index 6258ff9a5..3b39ecabe 100644 --- a/qcsrc/server/g_damage.qc +++ b/qcsrc/server/g_damage.qc @@ -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"));