weapons stats on server side - spelling fixed, and forgot ssg3000 and kicks

This commit is contained in:
Scott Brooks 2002-02-28 06:09:23 +00:00
parent b110c37ece
commit 02fa6d4eec

View file

@ -5,6 +5,9 @@
//-----------------------------------------------------------------------------
//
// $Log$
// Revision 1.8 2002/02/28 06:09:23 blaze
// weapons stats on server side - spelling fixed, and forgot ssg3000 and kicks
//
// Revision 1.7 2002/02/28 05:41:54 blaze
// weapons stats on client side
//
@ -727,7 +730,7 @@ CG_DrawWeaponStats
==============================
*/
#define WS_LEFTSIDE 20
#define WS_TOP 250
#define WS_TOP 230
#define WS_WIDTH 640 - WS_LEFTSIDE * 10
#define WS_LINE_WIDTH 1
#define WS_PADDING (WS_LINE_WIDTH+2)
@ -752,7 +755,7 @@ void CG_DrawWeaponStats(void)
if (Alpha > 1.0f) Alpha = 1.0f;
}
//make room for 8 weapon stats
size = (8*20)+SB_PADDING;
size = (10*20)+SB_PADDING;
score = cg.snap->ps.persistant[PERS_SCORE];
deaths = cg.snap->ps.persistant[PERS_KILLED];
// Score bar - Red:
@ -816,7 +819,7 @@ void CG_DrawWeaponStats(void)
MAKERGBA(color, 0.0f, 0.0f, 0.0f, 1.0f);
CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * 7 * 6, WS_TOP + SB_PADDING,
"Effency", color);
"Efficiency", color);
Com_sprintf(String, sizeof(String), "%4i",score);
@ -859,6 +862,10 @@ void CG_DrawWeaponStats(void)
CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH, WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++,
"HC", color);
MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f);
CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH, WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++,
"SSG3000", color);
MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f);
CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH, WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++,
"Akimbo", color);
@ -867,6 +874,10 @@ void CG_DrawWeaponStats(void)
CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH, WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++,
"Grenade", color);
MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f);
CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH, WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++,
"Kicks", color);
//Accuracy
@ -911,6 +922,11 @@ void CG_DrawWeaponStats(void)
CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++,
String, color);
Com_sprintf(String, sizeof(String), "%.1f%%",100 * (float)cg.records[REC_SSG3000HITS]/(cg.records[REC_SSG3000SHOTS] ? cg.records[REC_SSG3000SHOTS] : 1));
MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f);
CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++,
String, color);
Com_sprintf(String, sizeof(String), "%.1f%%",100 * (float)cg.records[REC_AKIMBOHITS]/(cg.records[REC_AKIMBOSHOTS] ? cg.records[REC_AKIMBOSHOTS] : 1));
MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f);
CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++,
@ -922,12 +938,13 @@ void CG_DrawWeaponStats(void)
String, color);
//Hits
i=2;
offset=24;
MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f);
CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++,
"Hitts", color);
"Hits", color);
Com_sprintf(String, sizeof(String), "%d",cg.records[REC_KNIFESLASHHITS]);
MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f);
@ -964,6 +981,11 @@ void CG_DrawWeaponStats(void)
CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++,
String, color);
Com_sprintf(String, sizeof(String), "%d",cg.records[REC_SSG3000HITS]);
MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f);
CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++,
String, color);
Com_sprintf(String, sizeof(String), "%d",cg.records[REC_AKIMBOHITS]);
MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f);
CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++,
@ -974,6 +996,11 @@ void CG_DrawWeaponStats(void)
CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++,
String, color);
Com_sprintf(String, sizeof(String), "%d",cg.records[REC_KICKHITS]);
MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f);
CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++,
String, color);
//Shots
i=2;
offset = 30;
@ -1016,6 +1043,11 @@ void CG_DrawWeaponStats(void)
CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++,
String, color);
Com_sprintf(String, sizeof(String), "%d",cg.records[REC_SSG3000SHOTS]);
MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f);
CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++,
String, color);
Com_sprintf(String, sizeof(String), "%d",cg.records[REC_AKIMBOSHOTS]);
MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f);
CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++,
@ -1068,6 +1100,11 @@ void CG_DrawWeaponStats(void)
CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++,
String, color);
Com_sprintf(String, sizeof(String), "%d",cg.records[REC_SSG3000KILLS]);
MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f);
CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++,
String, color);
Com_sprintf(String, sizeof(String), "%d",cg.records[REC_AKIMBOKILLS]);
MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f);
CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++,
@ -1078,6 +1115,11 @@ void CG_DrawWeaponStats(void)
CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++,
String, color);
Com_sprintf(String, sizeof(String), "%d",cg.records[REC_KICKKILLS]);
MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f);
CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++,
String, color);
//Deaths
i=2;
offset = 45;
@ -1120,6 +1162,11 @@ void CG_DrawWeaponStats(void)
CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++,
String, color);
Com_sprintf(String, sizeof(String), "%d",cg.records[REC_SSG3000DEATHS]);
MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f);
CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++,
String, color);
Com_sprintf(String, sizeof(String), "%d",cg.records[REC_AKIMBODEATHS]);
MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f);
CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++,
@ -1130,6 +1177,10 @@ void CG_DrawWeaponStats(void)
CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++,
String, color);
Com_sprintf(String, sizeof(String), "%d",cg.records[REC_KICKDEATHS]);
MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f);
CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++,
String, color);
if ( cg.wstatsRequestTime + 3000 < cg.time ) {
// the scores are more than two seconds out of data,