X-Git-Url: http://de.git.xonotic.org/?p=voretournament%2Fvoretournament.git;a=blobdiff_plain;f=data%2Fqcsrc%2Fclient%2Fsbar.qc;h=f8d7eefc002920842e0e5a6e91d46bc9e10bc9e6;hp=da8488bb2f024da3510ce17e83b66972054dc412;hb=65ebedb3627734e33d349eacf3d949cb96cf2707;hpb=7e46a67a0a2cda32bf4e9e30f4e42efd18d25864 diff --git a/data/qcsrc/client/sbar.qc b/data/qcsrc/client/sbar.qc index da8488bb..f8d7eefc 100644 --- a/data/qcsrc/client/sbar.qc +++ b/data/qcsrc/client/sbar.qc @@ -71,8 +71,8 @@ vector Sbar_AccuracyColor(float accuracy) void Sbar_DrawXNum (vector pos, float num, float digits, float showminusplus, float lettersize, vector rgb, float alpha, float dflags) { - float l, i; - string str, tmp, l_length; + float l; + string str, tmp, l_length, final_num; float minus, plus; vector vsize; @@ -114,16 +114,12 @@ void Sbar_DrawXNum (vector pos, float num, float digits, float showminusplus, fl } if(minus) - { - drawstring(pos, "-", vsize, rgb, alpha, dflags); - pos_x += lettersize / 2; - } else if(plus) - { - drawstring(pos, "+", vsize, rgb, alpha, dflags); - pos_x += lettersize / 2; - } + final_num = "-"; + else if(plus) + final_num = "+"; - drawstring(pos, str, vsize, rgb, alpha, dflags); + final_num = strcat(final_num, str); + drawstring(pos, final_num, vsize, rgb, alpha, dflags); } void Sbar_DrawXNum_Colored (vector pos, float x, float lettersize, float alpha) @@ -923,6 +919,7 @@ void Sbar_PrintStomachboardItem(vector pos, entity pl) string str; float f, field, field_number; + vector hl_color; field_number = 3; // the number of components each row has for(fieldcounter = 1; fieldcounter <= field_number; ++fieldcounter) @@ -934,9 +931,15 @@ void Sbar_PrintStomachboardItem(vector pos, entity pl) if(field == ST_HIGHLIGHT) { if(getstati(STAT_VORE_EATEN)) - drawfill(pos - '0 0 0', '193 11 0', stov(cvar_string("sbar_stomachboard_color2")), cvar("sbar_stomachboard_highlight_alpha") * sbar_alpha_fg, DRAWFLAG_NORMAL); + { + if(teamplay && GetPlayerColor(pl.entnum - 1) == GetPlayerColor(player_localentnum - 1)) // same team + hl_color = stov(cvar_string("sbar_stomachboard_color2")); + else + hl_color = stov(cvar_string("sbar_stomachboard_color3")); + } else - drawfill(pos - '0 0 0', '193 11 0', stov(cvar_string("sbar_stomachboard_color1")), cvar("sbar_stomachboard_highlight_alpha") * sbar_alpha_fg, DRAWFLAG_NORMAL); + hl_color = stov(cvar_string("sbar_stomachboard_color1")); + drawfill(pos - '0 0 0', '193 11 0', hl_color, cvar("sbar_stomachboard_highlight_alpha") * sbar_alpha_fg, DRAWFLAG_NORMAL); } if(field == ST_NAME) { @@ -1652,7 +1655,8 @@ void Sbar_DrawRaceStatus(vector pos) void Sbar_Score() { float score, distribution, leader; - vector score_pos, secondary_score_pos, distribution_color; + vector score_pos, secondary_score_pos, race_score_pos, distribution_color; + string racetime, secondary_racetime; entity tm, pl, me; me = (spectatee_status > 0) ? playerslots[spectatee_status - 1] : playerslots[player_localentnum - 1]; @@ -1678,12 +1682,20 @@ void Sbar_Score() score = me.(scores[ps_primary]); float racemin, racesec, racemsec; - float distsec, distmsec, minusplus; + float distsec, distmsec; + string s_racemin, s_racesec, s_racemsec; racemin = floor(score/(60 * TIME_FACTOR)); racesec = floor((score - racemin*(60 * TIME_FACTOR))/TIME_FACTOR); racemsec = score - racemin*60*TIME_FACTOR - racesec*TIME_FACTOR; + if(racemin < 10) s_racemin = strcat("0", ftos(racemin)); + else s_racemin = ftos(racemin); + if(racesec < 10) s_racesec = strcat("0", ftos(racesec)); + else s_racesec = ftos(racesec); + if(racemsec < 10) s_racemsec = strcat("0", ftos(racemsec)); + else s_racemsec = ftos(racemsec); + if (pl && ((!(scores_flags[ps_primary] & SFL_ZERO_IS_WORST)) || score)) { // distribution display distribution = me.(scores[ps_primary]) - pl.(scores[ps_primary]); @@ -1691,30 +1703,29 @@ void Sbar_Score() if (distribution < TIME_FACTOR && distribution > -TIME_FACTOR) distmsec = fabs(distribution); else { - distsec = floor(fabs(distribution)/TIME_FACTOR); - distmsec = fabs(distribution) - distsec*TIME_FACTOR; - if (distribution < 0) - distsec = -distsec; + distsec = floor(fabs(distribution) / TIME_FACTOR); + distmsec = fabs(distribution) - distsec * TIME_FACTOR; } - if (distribution <= 0) { + if (distribution < 0) { distribution_color = '0 1 0'; - minusplus = 1; // minusplus 1: always prefix with minus sign + secondary_racetime = "-"; // always prefix with minus sign } - else { + else if (distribution > 0) { distribution_color = '1 0 0'; - minusplus = 2; // minusplus 1: always prefix with plus sign + secondary_racetime = "+"; // minusplus 1: always prefix with plus sign } - Sbar_DrawXNum(score_pos + '212 -4 0' - '16 0 0' * TIME_DECIMALS, distmsec, -TIME_DECIMALS, 0, 16, distribution_color, sbar_alpha_fg, DRAWFLAG_NORMAL); - Sbar_DrawXNum(score_pos + '212 12 0' - '16 0 0' * TIME_DECIMALS, distsec, 4, minusplus, 16, distribution_color, sbar_alpha_fg, DRAWFLAG_NORMAL); - } + else + distribution_color = '1 1 1'; - Sbar_DrawXNum(score_pos + '192 0 0' - TIME_DECIMALS * '30 0 0', racemsec, -TIME_DECIMALS, 0, 30, '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL); - Sbar_DrawXNum(score_pos + '192 0 0' - TIME_DECIMALS * '30 0 0' - '66 0 0', racesec, -2, 0, 30, '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL); - drawstring(score_pos + '192 0 0' - TIME_DECIMALS * '30 0 0' - '21 0 0', ".", '30 30 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_ADDITIVE); + secondary_racetime = strcat(secondary_racetime, ftos(distsec), ".", ftos(distmsec)); + drawstring(score_pos + '222 0 0' - '14 0 0', secondary_racetime, '14 14 0', distribution_color, sbar_alpha_fg, DRAWFLAG_NORMAL); + } - Sbar_DrawXNum(score_pos + '192 0 0' - TIME_DECIMALS * '30 0 0' - '132 0 0', racemin, -2, 0, 30, '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL); - drawstring(score_pos + '192 0 0' - TIME_DECIMALS * '30 0 0' - '88 0 0', ":", '30 30 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_ADDITIVE); + racetime = strcat(s_racemin, " : ", s_racesec, " . ", s_racemsec); + race_score_pos = top + '0 0 0'; + race_score_pos -= '1 0 0' * stringwidth(racetime, FALSE, '30 30 0') * 0.5; + drawstring(race_score_pos, racetime, '30 30 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL); } else if (!teamplay) { // non-teamgames, except race/cts // me vector := [team/connected frags id] @@ -1740,7 +1751,7 @@ void Sbar_Score() else distribution_color = '1 0 0'; - Sbar_DrawXNum(secondary_score_pos, distribution, 6, 0, 16, distribution_color, sbar_alpha_fg, DRAWFLAG_NORMAL); + Sbar_DrawXNum(secondary_score_pos, distribution, 6, 3, 16, distribution_color, sbar_alpha_fg, DRAWFLAG_NORMAL); Sbar_DrawXNum(score_pos, score, 6, 0, 34, distribution_color, sbar_alpha_fg, DRAWFLAG_NORMAL); } else { // teamgames float max_fragcount; @@ -1758,11 +1769,11 @@ void Sbar_Score() if(tm.team == myteam) { if (max_fragcount == score) leader = 1; - Sbar_DrawXNum(score_pos, score, 6, 0, 34, GetTeamRGB(tm.team) * 0.4 + '0.6 0.6 0.6', sbar_alpha_fg, DRAWFLAG_NORMAL); + Sbar_DrawXNum(score_pos, score, 6, 0, 34, GetTeamRGB(tm.team), sbar_alpha_fg, DRAWFLAG_NORMAL); } else { if (max_fragcount == score) leader = 1; - Sbar_DrawXNum(secondary_score_pos, score, 6, 0, 16, GetTeamRGB(tm.team) * 0.4 + '0.6 0.6 0.6', sbar_alpha_fg, DRAWFLAG_NORMAL); + Sbar_DrawXNum(secondary_score_pos, score, 6, 3, 16, GetTeamRGB(tm.team), sbar_alpha_fg, DRAWFLAG_NORMAL); secondary_score_pos = secondary_score_pos + '0 16 0'; } } @@ -1884,7 +1895,8 @@ void Sbar_Score() void Sbar_Timer() { float timelimit, elapsedTime, minutes, seconds, timeleft, minutesLeft, secondsLeft; - vector bgpos, timer_color; + vector pos, bgpos, timer_color; + string finaltime; bgpos = '0 0 0'; vector topright; @@ -1932,14 +1944,12 @@ void Sbar_Timer() } else { minutes = minutesLeft; seconds = secondsLeft; - if (minutes == 0) - bgpos_x = topright_x - (36 + 7 + 12) * scale; - else if (minutes < 10) // nudge the timer background left if more digits are drawn + if (minutes < 10) // nudge the timer background left if more digits are drawn bgpos_x = topright_x - (54 + 17 + 12) * scale; else if (minutes < 100) - bgpos_x = topright_x - (72 + 17 + 12) * scale; + bgpos_x = topright_x - (62 + 17 + 12) * scale; else - bgpos_x = topright_x - (90 + 17 + 12) * scale; + bgpos_x = topright_x - (70 + 17 + 12) * scale; bgpos_y = 0; bgpos_z = 0; } @@ -1957,11 +1967,103 @@ void Sbar_Timer() } drawpic(topright - ('19 0 0' + '3 0 0' - '0 2 0'), "gfx/hud/sb_time", '22 22 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL); - if(minutesLeft >= 1 || cvar("sbar_increment_maptime") || timelimit == 0 || warmup_stage) { - Sbar_DrawXNum(topright - ('50 -2 0' - '0 2 0') - (strlen(ftos(minutes)) * 18 * scale * '0.5 0 0'), minutes, 3, 0, 18 * scale, timer_color, sbar_alpha_fg, DRAWFLAG_NORMAL); - drawstring(topright - ('48 -2 0' - '0 1 0'), ":", '18 18 0' * scale, timer_color, sbar_alpha_fg, DRAWFLAG_NORMAL); + finaltime = strcat(ftos(minutes), ":"); + if(seconds < 10) + finaltime = strcat(finaltime, "0", ftos(seconds)); + else + finaltime = strcat(finaltime, ftos(seconds)); + + pos = topright - ('24 -2 0' + '3 0 0' - '0 2 0'); + pos -= '1 0 0' * stringwidth(finaltime, FALSE, 18 * scale * '1 1 0'); + drawstring(pos, finaltime, 18 * scale * '1 1 0', timer_color, sbar_alpha_fg, DRAWFLAG_NORMAL); +} + +void Sbar_Ring() +{ + vector ring_pos, ring1_color, ring2_color; + vector text_pos, text1_size, text2_size; + float ring1_alpha, ring2_alpha, ring1_size, ring1_clip, ring2_size, ring2_clip; + string text1_msg, text2_msg; + + ring_pos_x = vid_conwidth / 2; + ring_pos_y = vid_conheight / 1.375; + ring1_size = cvar("sbar_ring1_scale"); + ring2_size = cvar("sbar_ring2_scale"); + ring1_alpha = sbar_alpha_fg * cvar("sbar_ring1_alpha"); + ring2_alpha = sbar_alpha_fg * cvar("sbar_ring2_alpha"); + text1_size = '1 1 0' * cvar("sbar_ring1_text_scale"); + text2_size = '1 1 0' * cvar("sbar_ring2_text_scale"); + + switch(getstati(STAT_SBRING1_TYPE)) + { + case 0: + // ring disabled + break; + case 1: + // ring shows predator swallow progress, fills with progress + if not(cvar("sbar_ring1_info_swallowprogress_pred")) + break; + ring1_color = '0.5 1 0.5'; + text1_msg = "Swallowing..."; + break; + case 2: + // ring shows vore system delay, empties with progress + if not(cvar("sbar_ring1_info_voredelay")) + break; + ring1_color = '0.5 0.5 1'; + text1_msg = "Vore delay"; + break; + case 3: + // ring shows stomach kick delay, empties with progress + if not(cvar("sbar_ring1_info_kickdelay")) + break; + ring1_color = '1 1 0.5'; + text1_msg = "Kick delay"; + break; + default: + print(strcat("^1Error:^7 Unknown ring type: ", ftos(getstati(STAT_SBRING1_TYPE)), "\n")); + break; + } + switch(getstati(STAT_SBRING2_TYPE)) + { + case 0: + // ring disabled + break; + case 1: + // ring shows prey swallow progress, fills with progress + if not(cvar("sbar_ring2_info_swallowprogress_prey")) + break; + ring2_color = '1 0.5 0.5'; + text2_msg = "Swallowed..."; + break; + case 2: + // ring shows regurgitation preparing, fills with progress + if not(cvar("sbar_ring2_info_regurgitateprepare")) + break; + ring2_color = '1 0.5 1'; + text2_msg = "Regurgitating..."; + break; + default: + print(strcat("^1Error:^7 Unknown ring type: ", ftos(getstati(STAT_SBRING1_TYPE)), "\n")); + break; + } + ring1_clip = getstatf(STAT_SBRING1_CLIP); + ring2_clip = getstatf(STAT_SBRING2_CLIP); + + if(text1_msg != "" && cvar("sbar_ring1")) + { + DrawCircleClippedPic(ring_pos, ring1_size, "gfx/hud/sb_ring.tga", ring1_clip, ring1_color, ring1_alpha, DRAWFLAG_ADDITIVE); + text_pos_x = ring_pos_x - stringwidth(text1_msg, FALSE, text1_size) / 2; + text_pos_y = ring_pos_y - ring1_size / 2; + drawstring(text_pos, text1_msg, text1_size, ring1_color, sbar_alpha_fg, DRAWFLAG_NORMAL); + } + if(text2_msg != "" && cvar("sbar_ring2")) + { + DrawCircleClippedPic(ring_pos, ring2_size, "gfx/hud/sb_ring.tga", ring2_clip, ring2_color, ring2_alpha, DRAWFLAG_ADDITIVE); + text_pos_x = ring_pos_x - stringwidth(text2_msg, FALSE, text2_size) / 2; + text_pos_y = ring_pos_y + ring1_size / 2; + drawstring(text_pos, text2_msg, text2_size, ring2_color, sbar_alpha_fg, DRAWFLAG_NORMAL); } - Sbar_DrawXNum(topright - ('37 -2 0' + '3 0 0' - '0 2 0'), seconds, -2, 0, 18 * scale, timer_color, sbar_alpha_fg, DRAWFLAG_NORMAL); } void CSQC_Strength_Timer() { @@ -2008,7 +2110,7 @@ void CSQC_Strength_Timer() { { drawpic(pos, "gfx/hud/sb_str", picsize, '1 1 1', sbar_alpha_fg, DRAWFLAG_ADDITIVE); } - Sbar_DrawXNum(pos - '20 -2 0', ceil(dt), 2, 0, countdown_fontsize, '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL); + Sbar_DrawXNum(pos - '30 -2 0', ceil(dt), 2, 0, countdown_fontsize, '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL); } else if(dt > -1) { @@ -2031,7 +2133,7 @@ void CSQC_Strength_Timer() { { drawpic(pos - '0 -22 0', "gfx/hud/sb_invinc", picsize, '1 1 1', sbar_alpha_fg, DRAWFLAG_ADDITIVE); } - Sbar_DrawXNum(pos - '20 -24 0', ceil(dt), 2, 0, countdown_fontsize, '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL); + Sbar_DrawXNum(pos - '30 -24 0', ceil(dt), 2, 0, countdown_fontsize, '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL); } else if(dt > -1) { @@ -2570,8 +2672,13 @@ string GetAmmoPicture(float i) { switch(i) { - case 0: return "gfx/hud/sb_fuel"; - default: return ""; + case 0: + if(getstati(STAT_ITEMS) & IT_FUEL_REGEN) + return "gfx/hud/sb_fuel_regen"; + else + return "gfx/hud/sb_fuel"; + default: + return ""; } } @@ -2912,23 +3019,33 @@ void Sbar_Draw (void) } } + vector hl_color; + string hl_string; if(getstati(STAT_VORE_EATEN)) { - drawpic(bottomleft - '0 256 0', "gfx/hud/bg_stomach_status", '256 256 0', StomachStatus_ColorFade(stov(cvar_string("sbar_stomachboard_color2"))), cvar("sbar_stomachboard_status_alpha") * sbar_alpha_fg, DRAWFLAG_NORMAL); - drawstring(bottomleft - '-80 173 0', "predator:", '11 11 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL); + if(teamplay && GetPlayerColor(getstati(STAT_VORE_EATEN) - 1) == GetPlayerColor(player_localentnum - 1)) // same team + hl_color = stov(cvar_string("sbar_stomachboard_color2")); + else + hl_color = stov(cvar_string("sbar_stomachboard_color3")); + hl_string = "predator:"; } else { - drawpic(bottomleft - '0 256 0', "gfx/hud/bg_stomach_status", '256 256 0', StomachStatus_ColorFade(stov(cvar_string("sbar_stomachboard_color1"))), cvar("sbar_stomachboard_status_alpha") * sbar_alpha_fg, DRAWFLAG_NORMAL); - drawstring(bottomleft - '-80 173 0', "self:", '11 11 0', ' 1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL); + hl_color = stov(cvar_string("sbar_stomachboard_color1")); + hl_string = "self:"; } + drawpic(bottomleft - '0 256 0', "gfx/hud/bg_stomach_status", '256 256 0', StomachStatus_ColorFade(hl_color), cvar("sbar_stomachboard_status_alpha") * sbar_alpha_fg, DRAWFLAG_NORMAL); + drawstring(bottomleft - '-80 173 0', hl_string, '11 11 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL); float stomach_load; stomach_load = getstati(STAT_VORE_LOAD); // shows the predator's stomach load when we are eaten, and ours otherwise - Sbar_DrawXNum(bottomleft - '-26 171 0', bound(0, stomach_load, 9), 1, 0, 22, '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL); - drawstring(bottomleft - '-41 171 0', "/", '22 22 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL); - Sbar_DrawXNum(bottomleft - '-50 171 0', bound(0, g_balance_vore_swallow_limit, 9), 1, 0, 22, '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL); + vector status_pos; + string status_text; + status_text = strcat(ftos(bound(0, stomach_load, 9)), "/", ftos(bound(0, g_balance_vore_swallow_limit, 9))); + status_pos = bottomleft - '-43 171 0'; + status_pos -= '1 0 0' * stringwidth(status_text, FALSE, '22 22 0') * 0.5; + drawstring(status_pos, status_text, '22 22 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL); if(getstati(STAT_VORE_DIGESTING)) drawstring(bottomleft - '-76 142 0', "stomach digesting", '12 12 0', '1 0.5 0.5', sbar_alpha_fg, DRAWFLAG_NORMAL); @@ -3008,13 +3125,15 @@ void Sbar_Draw (void) pos_y = bottom_y - 20; float weapon_clipload, weapon_clipsize; + vector ammo_pos_offset; // if we are using the jetpack, show fuel ammo. Otherwise show the ammo of our weapon if(stat_items & IT_JETPACK && button_jetpack) { a = getstati(GetAmmoStat(0)); // how much fuel do we have? drawpic(pos - '98 18 0', GetAmmoPicture(0), '20 20 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL); - Sbar_DrawXNum(pos - '128 16 0', a, 3, 0, 16, '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL); + ammo_pos_offset = '1 0 0' * stringwidth(ftos(a), FALSE, '16 16 0') * 0.5; + Sbar_DrawXNum(pos - '118 16 0' - ammo_pos_offset, a, 3, 0, 16, '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL); } else { @@ -3032,13 +3151,23 @@ void Sbar_Draw (void) { weapon_clipload = getstati(STAT_WEAPON_CLIPLOAD); if(weapon_clipload < 0) // we're reloading - drawstring(pos - '128 23 0', "- -", '16 16 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL); + { + ammo_pos_offset = '1 0 0' * stringwidth("- -", FALSE, '16 16 0') * 0.5; + drawstring(pos - '118 23 0' - ammo_pos_offset, "- -", '16 16 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL); + } else - Sbar_DrawXNum(pos - '128 23 0', weapon_clipload, 2, 0, 16, '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL); - Sbar_DrawXNum(pos - '128 7 0', a, 3, 0, 12, '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL); + { + ammo_pos_offset = '1 0 0' * stringwidth(ftos(weapon_clipload), FALSE, '16 16 0') * 0.5; + Sbar_DrawXNum(pos - '118 23 0' - ammo_pos_offset, weapon_clipload, 2, 0, 16, '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL); + } + ammo_pos_offset = '1 0 0' * stringwidth(ftos(a), FALSE, '12 12 0') * 0.5; + Sbar_DrawXNum(pos - '118 7 0' - ammo_pos_offset, a, 3, 0, 12, '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL); } else - Sbar_DrawXNum(pos - '128 16 0', a, 3, 0, 16, '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL); + { + ammo_pos_offset = '1 0 0' * stringwidth(ftos(a), FALSE, '16 16 0') * 0.5; + Sbar_DrawXNum(pos - '118 16 0' - ammo_pos_offset, a, 3, 0, 16, '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL); + } } } } @@ -3049,9 +3178,10 @@ void Sbar_Draw (void) if (e && e.netname != "" && e.netname != "N/A") drawpic(bottom - '96 96 0', strcat("gfx/hud/bg_status_activeweapon_", e.netname), '192 96 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL); - // draw scores and timer + // draw scores, timer, and ring Sbar_Score(); Sbar_Timer(); + Sbar_Ring(); // draw strength/invincibility icon and timer CSQC_Strength_Timer();