From: Samual Date: Tue, 18 Oct 2011 23:20:09 +0000 (-0400) Subject: Limit fading out of centerprints to 1 second, otherwise it can be accidentally set... X-Git-Tag: xonotic-v0.6.0~35^2~78^2~7^2~31 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=85df527177e7f8378a2c9712cbed7e386cc6db1e;p=xonotic%2Fxonotic-data.pk3dir.git Limit fading out of centerprints to 1 second, otherwise it can be accidentally set to remain forever. --- diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc index 48568de96..17fe52a38 100644 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@ -4522,9 +4522,9 @@ void centerprint_generic(float new_id, string strMessage, float duration, float if (strMessage == "" && centerprint_messages[j] != "" && centerprint_countdown_num[j] == 0) { // fade out the current msg (duration and countdown_num are ignored) - centerprint_time[j] = autocvar_hud_panel_centerprint_fade_out; - if (centerprint_expire_time[j] > time + autocvar_hud_panel_centerprint_fade_out || centerprint_expire_time[j] < time) - centerprint_expire_time[j] = time + autocvar_hud_panel_centerprint_fade_out; + centerprint_time[j] = min(1, autocvar_hud_panel_centerprint_fade_out); + if (centerprint_expire_time[j] > time + min(1, autocvar_hud_panel_centerprint_fade_out) || centerprint_expire_time[j] < time) + centerprint_expire_time[j] = time + min(1, autocvar_hud_panel_centerprint_fade_out); return; } break; // found a msg with the same id, at position j