summaryrefslogtreecommitdiff
path: root/src/cgame/cg_local.h
diff options
context:
space:
mode:
authorChristopher Schwarz <lakitu7@gmail.com>2009-10-14 18:57:42 +0000
committerTim Angus <tim@ngus.net>2013-01-03 00:16:50 +0000
commita85a677ab302b0dec0cb716e5c071305825df666 (patch)
tree2242121b83be2c3385789058beb39b0b68387176 /src/cgame/cg_local.h
parent17db07ae8addfb0952875e3af929ca83a08ba481 (diff)
* (bug 2991) Add teamoverlay, an optional hud display showing names, health, class/equipment, and locations of teammates
- Disable with cg_drawTeamOverlay 0 or remove it from your hud - Control number of teammates to show with cg_teamOverlayMaxPlayers - When teamoverlay is enabled, show health of teammates next to their name when the crosshair is over them - Servers who dislike gameplay effects or want to save on bandwidth use can use g_allowTeamOverlay 0 to disable the feature for players - Special thanks to Risujin for bring this idea and the original patch to Tremulous * Cache teaminfo on the server and send only when needed (Undeference) * Increase frequency of sending updated teaminfo (Undeference)
Diffstat (limited to 'src/cgame/cg_local.h')
-rw-r--r--src/cgame/cg_local.h16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/cgame/cg_local.h b/src/cgame/cg_local.h
index d14454a1..7302ac78 100644
--- a/src/cgame/cg_local.h
+++ b/src/cgame/cg_local.h
@@ -730,8 +730,8 @@ typedef struct
int score; // updated by score servercmds
int location; // location index for team mode
int health; // you only get this info about your teammates
- int armor;
- int curWeapon;
+ int upgrade;
+ int curWeaponClass; // sends current weapon for H, current class for A
int handicap;
@@ -1188,6 +1188,7 @@ typedef struct
qhandle_t scannerBlipShader;
qhandle_t scannerLineShader;
+ qhandle_t teamOverlayShader;
qhandle_t numberShaders[ 11 ];
@@ -1384,6 +1385,8 @@ typedef struct
clientInfo_t clientinfo[ MAX_CLIENTS ];
+ int teaminfoReceievedTime;
+
// corpse info
clientInfo_t corpseinfo[ MAX_CLIENTS ];
@@ -1440,6 +1443,9 @@ extern vmCvar_t cg_drawChargeBar;
extern vmCvar_t cg_drawCrosshair;
extern vmCvar_t cg_drawCrosshairNames;
extern vmCvar_t cg_crosshairSize;
+extern vmCvar_t cg_drawTeamOverlay;
+extern vmCvar_t cg_teamOverlayMaxPlayers;
+extern vmCvar_t cg_teamOverlayUserinfo;
extern vmCvar_t cg_draw2D;
extern vmCvar_t cg_animSpeed;
extern vmCvar_t cg_debugAnim;
@@ -1596,20 +1602,16 @@ int CG_DrawStrlen( const char *str );
float *CG_FadeColor( int startMsec, int totalMsec );
void CG_TileClear( void );
void CG_ColorForHealth( vec4_t hcolor );
-void CG_GetColorForHealth( int health, int armor, vec4_t hcolor );
-
void CG_DrawRect( float x, float y, float width, float height, float size, const float *color );
void CG_DrawSides(float x, float y, float w, float h, float size);
void CG_DrawTopBottom(float x, float y, float w, float h, float size);
qboolean CG_WorldToScreen( vec3_t point, float *x, float *y );
char *CG_KeyBinding( const char *bind );
-
+char CG_GetColorCharForHealth( int clientnum );
//
// cg_draw.c
//
-extern int sortedTeamPlayers[ TEAM_MAXOVERLAY ];
-extern int numSortedTeamPlayers;
void CG_AddLagometerFrameInfo( void );
void CG_AddLagometerSnapshotInfo( snapshot_t *snap );