X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fcounting.qh;h=2559bf3acd9ff8e822163d961f61c3e8fbd81d3b;hb=2380d290ee83610f2001d7806416c25e4c81433d;hp=a74f74e980f467acfe601edf823aab0c60b3ee80;hpb=30125332eda7a5e10bd535c63c3f689729155810;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/counting.qh b/qcsrc/common/counting.qh index a74f74e98..2559bf3ac 100644 --- a/qcsrc/common/counting.qh +++ b/qcsrc/common/counting.qh @@ -50,7 +50,7 @@ ZCTX(_("CI_SEC^%d seconds")), /* second */ \ ZCTX(_("CI_THI^%d seconds")), /* third */ \ ZCTX(_("CI_MUL^%d seconds"))) /* multi */ - + string count_ordinal(float interval) { // This function is designed primarily for the English language, it's impossible @@ -72,7 +72,7 @@ string count_ordinal(float interval) } } else { return sprintf(_("%dth"), interval); } - + return ""; } @@ -88,7 +88,7 @@ string count_fill(float interval, string zeroth, string first, string second, st // 1 second // 2 seconds // 3 seconds - // etc... minutes, hours, days, etc. + // etc... minutes, hours, days, etc. switch(floor(interval)) { @@ -111,28 +111,28 @@ string process_time(float outputtype, float seconds) { float tmp_hours = 0, tmp_minutes = 0, tmp_seconds = 0; float tmp_years = 0, tmp_weeks = 0, tmp_days = 0; - + tmp_seconds = floor(seconds); if(tmp_seconds) { tmp_minutes = floor(tmp_seconds / 60); - + if(tmp_minutes) { tmp_seconds -= (tmp_minutes * 60); tmp_hours = floor(tmp_minutes / 60); - + if(tmp_hours) { tmp_minutes -= (tmp_hours * 60); tmp_days = floor(tmp_hours / 24); - + if(tmp_days) { tmp_hours -= (tmp_days * 24); tmp_weeks = floor(tmp_days / 7); - + if(tmp_weeks) { tmp_days -= (tmp_weeks * 7);