Fixed some things ...

- fixed some unsecure code
- fixed lots of warnings
- removed some very long parts of commented code that is not used
anymore
This commit is contained in:
Walter Julius 'GSIO01' Hennecke 2012-09-09 13:30:56 +02:00
parent 725dfe17a1
commit 7f958b7651
24 changed files with 149 additions and 1270 deletions

View file

@ -66,7 +66,7 @@ Debugging command to print the current view position
=============
*/
static void CG_Viewpos_f (void) {
CG_Printf ("%s (%i %i %i) : %f\n", cgs.mapname, (int)cg.refdef.vieworg[0],
CG_Printf ("%s (%i %i %i) : %i\n", cgs.mapname, (int)cg.refdef.vieworg[0],
(int)cg.refdef.vieworg[1], (int)cg.refdef.vieworg[2],
(int)cg.refdefViewAngles[YAW]);
}
@ -212,7 +212,7 @@ void CG_ClassList_cmd( void ) {
return; */
if ( cgs.classData[i].formalName[0] )
CG_Printf( "%s\n", cgs.classData[i].formalName[0] );
CG_Printf( "%s\n", cgs.classData[i].formalName );
else
break;
}
@ -418,7 +418,7 @@ void CG_LocEdit_f(void) {
Com_sprintf(path, sizeof(path), "%s", cgs.mapname);
COM_StripExtension(path, path);
Com_sprintf(path, sizeof(path), "%s.locations");
Com_sprintf(path, sizeof(path), "%s.locations", path);
trap_FS_FOpenFile(path, &f, FS_READ);

View file

@ -31,9 +31,9 @@ int infoStringCount;
static qboolean drawCrosshairName=qfalse;
extern void InitPostGameMenuStruct();
extern void InitPostGameMenuStruct(void);
static void CG_InterfaceStartup();
static void CG_InterfaceStartup(void);
char *ingame_text[IGT_MAX]; /* Holds pointers to ingame text */
@ -748,7 +748,6 @@ Used for both the status bar and the scoreboard
void CG_DrawHead( float x, float y, float w, float h, int clientNum, vec3_t headAngles ) {
clipHandle_t cm;
centity_t *cent;
clientInfo_t *ci;
playerState_t *ps;
float value;
@ -756,7 +755,6 @@ void CG_DrawHead( float x, float y, float w, float h, int clientNum, vec3_t head
vec3_t origin;
vec3_t mins, maxs;
cent = &cg_entities[ clientNum ];
ci = &cgs.clientinfo[ clientNum ];
ps = &cg.snap->ps;
@ -799,12 +797,6 @@ void CG_DrawHead( float x, float y, float w, float h, int clientNum, vec3_t head
} else if ( cg_drawIcons.integer ) {
CG_DrawPic( x, y, w, h, ci->modelIcon );
}
//if ( cgs.clientinfo[clientNum].health <= 1 ) {//if eliminated, draw the cross-out
// CG_DrawPic( x, y, w, h, cgs.media.eliminatedShader );
//} else if ( ci->deferred ) {// if they are deferred, draw a cross out
// CG_DrawPic( x, y, w, h, cgs.media.deferShader );
//}
}
/*
@ -955,221 +947,10 @@ CG_DrawAmmo
*/
static void CG_DrawAmmo(centity_t *cent)
{
float value;
// float xLength;
playerState_t *ps;
// int max,brightColor_i,darkColor_i,numColor_i;
ps = &cg.snap->ps;
value = ps->ammo[cent->currentState.weapon];
// unused function ... lol might be removed
return;
}
//RPG-X: - RedTechie NO ARMOR! how many times do i have to say it!
/*
================
CG_DrawArmor
================
*/
/*
static void CG_DrawArmor(centity_t *cent)
{
int max;
float value,xLength;
playerState_t *ps;
int lengthMax;
ps = &cg.snap->ps;
value = ps->stats[STAT_ARMOR];
interface_graphics[IG_ARMOR_COUNT].max = value;
if (interface_graphics[IG_ARMOR_COUNT].max <= ps->stats[STAT_MAX_HEALTH])
{
interface_graphics[IG_ARMOR_COUNT].color = CT_LTPURPLE1; //
interface_graphics[IG_ARMOR_SLIDERFULL].color = CT_LTPURPLE1; //
interface_graphics[IG_ARMOR_COUNT].style &= ~UI_PULSE; // Numbers
}
else
{
interface_graphics[IG_ARMOR_COUNT].color = CT_LTGREY; // Numbers
interface_graphics[IG_ARMOR_SLIDERFULL].color = CT_LTGREY; //
interface_graphics[IG_ARMOR_COUNT].style |= UI_PULSE; // Numbers
}
// if (cg.oldarmor < value)
// {
// cg.oldArmorTime = cg.time + 100;
// }
// cg.oldarmor = value;
// if (cg.oldArmorTime < cg.time)
// {
// interface_graphics[IG_ARMOR_COUNT].color = CT_LTPURPLE1; // Numbers
// }
// else
// {
// interface_graphics[IG_ARMOR_COUNT].color = CT_YELLOW; // Numbers
// }
max = ps->stats[STAT_MAX_HEALTH];
lengthMax = 73;
if (max > 0)
{
if (value > max)
{
xLength = lengthMax;
}
else
{
xLength = lengthMax * (value/max);
}
}
else
{
max = 0;
xLength = 0;
}
// Armor empty section
interface_graphics[IG_ARMOR_SLIDEREMPTY].x = 72 + xLength;
interface_graphics[IG_ARMOR_SLIDEREMPTY].width = lengthMax - xLength;
// Armor full section
interface_graphics[IG_ARMOR_SLIDERFULL].width = xLength;
CG_PrintInterfaceGraphics(IG_ARMOR_START + 1,IG_ARMOR_END);
}
*/
//RPG-X: - RedTechie Close but no cigar we need 3 stage health not a bar
/*
================
CG_DrawHealth
================
*/
/*static void CG_DrawHealth(centity_t *cent)
{
int max;
float value,xLength;
playerState_t *ps;
int lengthMax;
ps = &cg.snap->ps;
value = ps->stats[STAT_HEALTH];
// Changing colors on numbers
// if (cg.oldhealth < value)
// {
// cg.oldHealthTime = cg.time + 100;
// }
// cg.oldhealth = value;
// Is health changing?
// if (cg.oldHealthTime < cg.time)
// {
// interface_graphics[IG_HEALTH_COUNT].color = CT_LTBROWN1; // Numbers
// }
// else
// {
// }
interface_graphics[IG_HEALTH_COUNT].max = value;
if (interface_graphics[IG_HEALTH_COUNT].max <= ps->stats[STAT_MAX_HEALTH])
{
interface_graphics[IG_HEALTH_COUNT].color = CT_LTBROWN1; //
interface_graphics[IG_HEALTH_SLIDERFULL].color = CT_LTBROWN1; //
interface_graphics[IG_HEALTH_SLIDEREMPTY].color = CT_DKBROWN1; //
interface_graphics[IG_HEALTH_COUNT].style &= ~UI_PULSE; // Numbers
}
else
{
interface_graphics[IG_HEALTH_COUNT].color = CT_LTGREY; // Numbers
interface_graphics[IG_HEALTH_SLIDERFULL].color = CT_LTGREY; //
interface_graphics[IG_HEALTH_COUNT].style |= UI_PULSE; // Numbers
}
// Calculating size of health bar
max = ps->stats[STAT_MAX_HEALTH];
lengthMax = 73;
if (max > 0)
{
if (value < max)
{
xLength = lengthMax * (value/max);
}
else // So the graphic doesn't extend past the cap
{
xLength = lengthMax;
}
}
else
{
max = 0;
xLength = 0;
}
// Health empty section
interface_graphics[IG_HEALTH_SLIDEREMPTY].x = 72 + xLength;
interface_graphics[IG_HEALTH_SLIDEREMPTY].width = lengthMax - xLength;
// Health full section
interface_graphics[IG_HEALTH_SLIDERFULL].width = xLength;
// Print it
CG_PrintInterfaceGraphics(IG_HEALTH_START + 1,IG_HEALTH_END);
}*/
//RPG-X: - RedTechie This is more like it
/*
================
CG_DrawHealth
New Draw health function by yours truly RedTechie
New version by TiM lol
================
*/
//static int CG_DrawHealth( centity_t *cent )
//{
// float value;
// float offset;
// float yOffset;
//
// value = cg.snap->ps.stats[STAT_HEALTH];
//
// //Draw static graphics first
// CG_FillRect( 8, 428, 89, 1, colorTable[CT_LTPURPLE1] );
// CG_FillRect( 8, 429, 1, 44, colorTable[CT_LTPURPLE1] );
// CG_FillRect( 8, 473, 89, 1, colorTable[CT_LTPURPLE1] );
// CG_FillRect( 96, 429, 1, 44, colorTable[CT_LTPURPLE1] );
//
// //Okay... we'll need to work out some funky math here later...
// //For now, let's just test
// offset = (( (float)(cg.time % 2000) / 2000.0f ) * (1.0f+(1.0f-(value/100.0f)) * 0.25f));
// yOffset = (value / 100.0f ) * 21.0f ;
// //CG_Printf( "%f\n", offset );
//
// trap_R_SetColor( NULL );
// CG_DrawStretchPic( 9, 450 - yOffset, 87, yOffset * 2.0f, 0.0f + offset, 0.0f, (1.0f+(1.0f-(value/100.0f)) * 0.25f) + offset, 1.0f, cgs.media.healthSineWave );
// //CG_DrawStretchPic( 16, 413, 123, 60, 1.0f, 1.0f, 2.0f, 2.0f, cgs.media.healthSineWave );
//
// return 125;
//}
static int CG_DrawHealth(centity_t *cent)
{
float value;
@ -1257,24 +1038,12 @@ CG_DrawStatusBar
static void CG_DrawStatusBar( void )
{
centity_t *cent;
playerState_t *ps;
vec3_t angles;
int y=0;
vec4_t whiteA;
int x, z, i, h, yZ;
vec3_t tmpVec, eAngle, forward, dAngle;
//RPG-X: Redtechie - for the HACK code below
//int rpg_shakemycamera;
int healthBarWidth;
//float rpg_shakemycamera_intensity;
//const char *info;
/*static float colors[4][4] =
{
{ 1, 0.69, 0, 1.0 } , // normal
{ 1.0, 0.2, 0.2, 1.0 }, // low health
{0.5, 0.5, 0.5, 1}, // weapon firing
{ 1, 1, 1, 1 } }; // health > 100*/
whiteA[0] = whiteA[1] = whiteA[2] = 1.0f; whiteA[3] = 0.3f;
@ -1295,23 +1064,10 @@ static void CG_DrawStatusBar( void )
// draw the team background
CG_DrawTeamBackground( 0, 420, 640, 60, 0.33, cg.snap->ps.persistant[PERS_TEAM], qfalse );
ps = &cg.snap->ps;
VectorClear( angles );
// draw any 3D icons first, so the changes back to 2D are minimized
y = (SCREEN_HEIGHT - (4*ICON_SIZE) - 20);
/*if (cg.predictedPlayerState.powerups[PW_REDFLAG])
{ //fixme: move to powerup renderer? make it pulse?
// CG_FillRect( 5, y, ICON_SIZE*2, ICON_SIZE*2, whiteA);
CG_DrawFlagModel( 5, y, ICON_SIZE*2, ICON_SIZE*2, TEAM_RED );
}*/
/*else if (cg.predictedPlayerState.powerups[PW_BORG_ADAPT])
{
// CG_FillRect( 5, y, ICON_SIZE*2, ICON_SIZE*2, whiteA);
// CG_DrawFlagModel( 5, y, ICON_SIZE*2, ICON_SIZE*2, TEAM_BLUE );
//RPG-X | GSIO01 | 08/05/2009: we have flag in rpg? haha
}*/
// Do start
if (!cg.interfaceStartupDone)
@ -1397,45 +1153,8 @@ static void CG_DrawStatusBar( void )
// Convert Angle back to Vector
AngleVectors(dAngle, forward, NULL, NULL);
VectorScale(forward, h/32, forward);
// if (h/32 < 100 && h/32 > 0) // Limit Radar Range
// {
// Draw up arrow if above, down if below, or an ordinary blip if level
// With tolerance of +- 5 units
//RPG-X: RedTechie - No teams in a RP
/*if ( cgs.gametype >= GT_TEAM )
{
if ( cgs.clientinfo[cg.snap->entities[i].number].team == TEAM_BLUE )
{
if (z > 64)
{
CG_DrawPic(86 - forward[1], 146 - forward[0], 7, 7, cgs.media.rd_blue_up);
}
else if (z < -64)
{
CG_DrawPic(86 - forward[1], 146 - forward[0], 7, 7, cgs.media.rd_blue_down);
}
else
{
CG_DrawPic(86 - forward[1], 146 - forward[0], 7, 7, cgs.media.rd_blue_level);
}
}
else if ( cgs.clientinfo[cg.snap->entities[i].number].team == TEAM_RED )
{
if (z > 64)
{
CG_DrawPic(86 - forward[1], 146 - forward[0], 7, 7, cgs.media.rd_red_up);
}
else if (z < -64)
{
CG_DrawPic(86 - forward[1], 146 - forward[0], 7, 7, cgs.media.rd_red_down);
}
else
{
CG_DrawPic(86 - forward[1], 146 - forward[0], 7, 7, cgs.media.rd_red_level);
}
}
}*/
//RPG-X: RedTechie - If Dead show them as a medical symbol
//RPG-X: RedTechie - If Dead show them as a medical symbol
//.number
if (h/32 < 100 && h/32 > 0) { // Limit Radar Range
if ( cg_entities[cg.snap->entities[i].number].currentState.eFlags & EF_DEAD )
@ -1457,118 +1176,6 @@ static void CG_DrawStatusBar( void )
}
else
{
//if ( cgs.clientinfo[cg.snap->entities[i].number].pClass == PC_COMMAND )
//{
// /*if (z > 64)
// {
// CG_DrawPic(86 - forward[1], 146 - forward[0], 7, 7, cgs.media.rd_red_up);
// }
// else if (z < -64)
// {
// CG_DrawPic(86 - forward[1], 146 - forward[0], 7, 7, cgs.media.rd_red_down);
// }
// else
// {
// CG_DrawPic(86 - forward[1], 146 - forward[0], 7, 7, cgs.media.rd_red_level);
// }*/
// //trap_R_SetColor( colorTable[CT_RED] );
// VectorCopy( colorTable[CT_RED], radColor );
// radColor[3] = colorTable[CT_RED][3];
//}
//else if ( cgs.clientinfo[cg.snap->entities[i].number].pClass == PC_SCIENCE )
//{
// /*if (z > 64)
// {
// CG_DrawPic(86 - forward[1], 146 - forward[0], 7, 7, cgs.media.rd_teal_up);
// }
// else if (z < -64)
// {
// CG_DrawPic(86 - forward[1], 146 - forward[0], 7, 7, cgs.media.rd_teal_down);
// }
// else
// {
// CG_DrawPic(86 - forward[1], 146 - forward[0], 7, 7, cgs.media.rd_teal_level);
// }*/
// //trap_R_SetColor( colorTable[CT_TEAL] );
// VectorCopy( colorTable[CT_TEAL], radColor );
// radColor[3] = colorTable[CT_TEAL][3];
//}
//else if ( cgs.clientinfo[cg.snap->entities[i].number].pClass == PC_SECURITY )
//{
// /*if (z > 64)
// {
// CG_DrawPic(86 - forward[1], 146 - forward[0], 7, 7, cgs.media.rd_blue_up);
// }
// else if (z < -64)
// {
// CG_DrawPic(86 - forward[1], 146 - forward[0], 7, 7, cgs.media.rd_blue_down);
// }
// else
// {
// CG_DrawPic(86 - forward[1], 146 - forward[0], 7, 7, cgs.media.rd_blue_level);
// }*/
// //trap_R_SetColor( colorTable[CT_GOLD] );
// VectorCopy( colorTable[CT_GOLD], radColor );
// radColor[3] = colorTable[CT_GOLD][3];
//}
//else if ( cgs.clientinfo[cg.snap->entities[i].number].pClass == PC_MEDICAL )
//{
// /*if (z > 64)
// {
// CG_DrawPic(86 - forward[1], 146 - forward[0], 7, 7, cgs.media.rd_white_up);
// }
// else if (z < -64)
// {
// CG_DrawPic(86 - forward[1], 146 - forward[0], 7, 7, cgs.media.rd_white_down);
// }
// else
// {
// CG_DrawPic(86 - forward[1], 146 - forward[0], 7, 7, cgs.media.rd_white_level);
// }*/
// //trap_R_SetColor( colorTable[CT_TEAL] );
// VectorCopy( colorTable[CT_TEAL], radColor );
// radColor[3] = colorTable[CT_TEAL][3];
//}
//else if ( cgs.clientinfo[cg.snap->entities[i].number].pClass == PC_ENGINEER )
//{
// /*if (z > 64)
// {
// CG_DrawPic(86 - forward[1], 146 - forward[0], 7, 7, cgs.media.rd_up);
// }
// else if (z < -64)
// {
// CG_DrawPic(86 - forward[1], 146 - forward[0], 7, 7, cgs.media.rd_down);
// }
// else
// {
// CG_DrawPic(86 - forward[1], 146 - forward[0], 7, 7, cgs.media.rd_level);
// }*/
// //trap_R_SetColor( colorTable[CT_GOLD] );
// VectorCopy( colorTable[CT_GOLD], radColor );
// radColor[3] = colorTable[CT_GOLD][3];
//}
//else if ( cgs.clientinfo[cg.snap->entities[i].number].pClass == PC_ALPHAOMEGA22 )
//{
// /*if (z > 64)
// {
// CG_DrawPic(86 - forward[1], 146 - forward[0], 7, 7, cgs.media.rd_teal_up);
// }
// else if (z < -64)
// {
// CG_DrawPic(86 - forward[1], 146 - forward[0], 7, 7, cgs.media.rd_teal_down);
// }
// else
// {
// CG_DrawPic(86 - forward[1], 146 - forward[0], 7, 7, cgs.media.rd_teal_level);
// }*/
// //trap_R_SetColor( colorTable[CT_GREEN] );
// VectorCopy( colorTable[CT_GREEN], radColor );
// radColor[3] = colorTable[CT_GREEN][3];
//}
//else if ( cgs.clientinfo[cg.snap->entities[i].number].pClass == PC_ADMIN && cg.snap->ps.persistant[PERS_CLASS] != PC_ADMIN )
//{
// //RPG-X: RedTechie - Dont show admins on radar unless you are a admin
//}
if ( cgs.clientinfo[cg.snap->entities[i].number].pClass >= 0 )
{
radColor[0] = (float)cgs.classData[cgs.clientinfo[cg.snap->entities[i].number].pClass].radarColor[0] / 255.0f;
@ -1578,20 +1185,6 @@ static void CG_DrawStatusBar( void )
}
else
{
/*if (z > 64)
{
CG_DrawPic(86 - forward[1], 146 - forward[0], 7, 7, cgs.media.rd_black_up);
}
else if (z < -64)
{
CG_DrawPic(86 - forward[1], 146 - forward[0], 7, 7, cgs.media.rd_black_down);
}
else
{
CG_DrawPic(86 - forward[1], 146 - forward[0], 7, 7, cgs.media.rd_black_level);
}*/
//trap_R_SetColor( colorTable[CT_BLACK] );
VectorCopy( colorTable[CT_BLACK], radColor );
radColor[3] = colorTable[CT_BLACK][3];
}
@ -2141,16 +1734,7 @@ Draw the small two score display
*/
static float CG_DrawScores( float y )
{
// const char *s;
int s1, s2; //, score;
// int x, w;
// int v;
// vec4_t color;
float y1;
// gitem_t *item;
s1 = cgs.scores1;
s2 = cgs.scores2;
y -= BIGCHAR_HEIGHT + 8;
y1 = y;
@ -3223,17 +2807,14 @@ CG_LabelCrosshairEntity
static void CG_LabelViewEntity( int clientNum, vec3_t origin, vec3_t entMins, vec3_t entMaxs, char *name, qboolean scanAll, vec4_t color, qboolean drawHealth, int health, char *pClass, char *rank, char *race, char* age, char *height, char *weight, char *weapon )
{//ID teammates, ID enemies, ID objectives, etc.
centity_t *cent;
//clientInfo_t *ci;
vec3_t center, maxs, mins, top, bottom, topLeft, topRight, bottomLeft, bottomRight;
vec3_t worldEast = {1.0f, 0, 0}, worldNorth = {0, 1.0f, 0}, worldUp = {0, 0, 1.0f};
//vec4_t hcolor;
float x = 0, y = 0;
float topLeftx, topLefty, topRightx, topRighty, bottomLeftx, bottomLefty, bottomRightx, bottomRighty;
int corner, topSize, bottomSize, leftSize, rightSize;
int charIndex, classCharIndex, rankCharIndex, ageCharIndex, raceCharIndex, htCharIndex, wtCharIndex, weapCharIndex, healthCharIndex;
float lineHorzLength = 8.0f, lineVertLength = 8.0f, lineWidth = 2.0f;
float fUpDot, fEastDot, fNorthDot, uNorthDot, uEastDot;//, hwidth;//, timedScale = 1.0f;
float fUpDot, fEastDot, fNorthDot, uNorthDot, uEastDot;
qboolean doTopLeft = qfalse;
qboolean doTopRight = qfalse;
qboolean doBottomLeft = qfalse;
@ -3249,13 +2830,6 @@ static void CG_LabelViewEntity( int clientNum, vec3_t origin, vec3_t entMins, ve
char showHealth[1024];
char showAge[1024];
char showClass[1024];
//char *health = "100";
cent = &cg_entities[clientNum];
/*if ( clientNum < MAX_CLIENTS ) {
ci = &cgs.clientinfo[clientNum];
}*/
infoStringCount += cg.frametime;
rankCharIndex = raceCharIndex = classCharIndex = ageCharIndex = htCharIndex = wtCharIndex = weapCharIndex = charIndex = healthCharIndex = floor(infoStringCount/33);
@ -4319,7 +3893,6 @@ static void CG_DrawWarmup( void ) {
int sec;
int i;
clientInfo_t *ci1, *ci2;
int cw;
const char *s;
sec = cg.warmup;
@ -4354,18 +3927,8 @@ static void CG_DrawWarmup( void ) {
if ( ci1 && ci2 ) {
s = va( "%s vs %s", ci1->name, ci2->name );
// w = CG_DrawStrlen( s );
w = UI_ProportionalStringWidth(s,UI_BIGFONT);
if ( w > 640 / BIGCHAR_WIDTH ) {
cw = 640 / w;
} else {
cw = BIGCHAR_WIDTH;
}
// CG_DrawStringExt( 320 - w * cw/2, 20,s, colorWhite,
// qfalse, qtrue, cw, (int)(cw * 1.5), 0 );
UI_DrawProportionalString( (SCREEN_WIDTH/2), 20,s, UI_BIGFONT|UI_CENTER, colorTable[CT_LTGOLD1]);
}
} else {
char gamename[1024];
@ -4386,12 +3949,6 @@ static void CG_DrawWarmup( void ) {
w = UI_ProportionalStringWidth(s,UI_BIGFONT);
if ( w > 640 / BIGCHAR_WIDTH ) {
cw = 640 / w;
} else {
cw = BIGCHAR_WIDTH;
}
UI_DrawProportionalString((SCREEN_WIDTH/2) , 20,gamename, UI_BIGFONT|UI_CENTER, colorTable[CT_LTGOLD1]);
}
@ -4416,24 +3973,6 @@ static void CG_DrawWarmup( void ) {
break;
}
}
switch ( cg.warmupCount ) {
case 0:
cw = 28;
break;
case 1:
cw = 24;
break;
case 2:
cw = 20;
break;
default:
cw = 16;
break;
}
// w = CG_DrawStrlen( s );
// CG_DrawStringExt( 320 - w * cw/2, 70, s, colorWhite,
// qfalse, qtrue, cw, (int)(cw * 1.5), 0 );
w = UI_ProportionalStringWidth(s,UI_BIGFONT);
UI_DrawProportionalString( (SCREEN_WIDTH/2), 70, s, UI_BIGFONT|UI_CENTER, colorTable[CT_LTGOLD1]);

View file

@ -750,15 +750,9 @@ static void UI_DrawProportionalString2( int x, int y, const char* str, vec4_t co
float fcol;
float fwidth;
float fheight;
vec4_t givenColor;
int colorI;
int special;
givenColor[0] = color[0];
givenColor[1] = color[1];
givenColor[2] = color[2];
givenColor[3] = color[3];
// draw the colored text
trap_R_SetColor( color );
@ -1452,7 +1446,7 @@ qboolean CG_ParseRankData( char **data, rankMenuData_t* rankMenuData ) {
}
}
else {
Com_Printf( S_COLOR_RED, "Could not find { in current rankset file.\n" );
Com_Printf( S_COLOR_RED "Could not find { in current rankset file.\n" );
return qtrue;
}
}
@ -1467,7 +1461,7 @@ qboolean CG_LoadRanks( void ) {
fileHandle_t file;
int file_len;
char charText[32000];
char *textPtr, *prevValue;
char *textPtr;
char fileName[MAX_QPATH];
int i;
int rankCount=0;
@ -1523,7 +1517,6 @@ qboolean CG_LoadRanks( void ) {
//DEFAULT I SAY! IT'S SPECIAL!
//WE NEED A DEFAULT FOR ERRORS! NO DEFAULT NO RANK FOR YOU!
while ( 1 ) {
prevValue = textPtr;
token = COM_Parse( &textPtr );
if ( !token[0] ) {
@ -1590,7 +1583,6 @@ qboolean CG_LoadRanks( void ) {
else {
//Parse.Rank.Data? :) *sigh* if only rofl
while (1) {
prevValue = textPtr;
token = COM_Parse( &textPtr );
if ( !token[0] ) {
break;

View file

@ -871,7 +871,7 @@ Also called by client movement prediction code
void CG_AdjustPositionForMover( const vec3_t in, int moverNum, int fromTime, int toTime, vec3_t out ) {
centity_t *cent;
vec3_t oldOrigin, origin, deltaOrigin;
vec3_t oldAngles, angles, deltaAngles;
vec3_t oldAngles, angles /*, deltaAngles*/;
if ( moverNum <= 0 || moverNum >= ENTITYNUM_MAX_NORMAL ) {
VectorCopy( in, out );
@ -891,7 +891,7 @@ void CG_AdjustPositionForMover( const vec3_t in, int moverNum, int fromTime, int
BG_EvaluateTrajectory( &cent->currentState.apos, toTime, angles );
VectorSubtract( origin, oldOrigin, deltaOrigin );
VectorSubtract( angles, oldAngles, deltaAngles );
//VectorSubtract( angles, oldAngles, deltaAngles );
VectorAdd( in, deltaOrigin, out );

View file

@ -671,7 +671,6 @@ void CG_FountainSpurt( vec3_t org, vec3_t end )
//vec3_t rgb = { 0.4f, 0.7f, 0.8f };
//float distance;
//FXBezier *fxb;
localEntity_t *le;
// offset table, could have used sin/cos, I suppose
//TiM - This was for the 4-way fountain. not needed no more
@ -726,14 +725,14 @@ void CG_FountainSpurt( vec3_t org, vec3_t end )
VectorCopy( cpt2, org2 );
// Add the main spout
le = FX_AddBezier( org1, org2, cpt1, cpt2, NULL, NULL, NULL, NULL, 4, 90,
FX_AddBezier( org1, org2, cpt1, cpt2, NULL, NULL, NULL, NULL, 4, 90,
cgs.media.fountainShader);
//if ( fxb )
// fxb->SetSTScale( 0.7f );
// Add a hazy faint spout
le = FX_AddBezier( org1, org2, cpt1, cpt2, NULL, NULL, NULL, NULL, 10, 200,
FX_AddBezier( org1, org2, cpt1, cpt2, NULL, NULL, NULL, NULL, 10, 200,
cgs.media.fountainShader);
//if ( fxb )
@ -800,10 +799,9 @@ void electric_spark( vec3_t pos, vec3_t normal, vec3_t dir, vec3_t user )
void CG_ElectricalExplosion( vec3_t start, vec3_t dir, float radius )
{
localEntity_t *le;
localEntity_t *particle; //FXTrail
vec3_t pos, temp/*, angles*/;
int i, numSparks;
float scale, dscale;
float scale;
// Spawn some delayed smoke
/*FX_AddSpawner( start, dir, NULL, NULL, 150, 40, qfalse, 9000, smoke_puffs );
@ -816,9 +814,8 @@ void CG_ElectricalExplosion( vec3_t start, vec3_t dir, float radius )
for ( i = 0; i < numSparks; i++ )
{
scale = 0.7f + random(); //0.2
dscale = -scale*2;
particle = FX_AddTrail( start,
FX_AddTrail( start,
NULL,
qfalse,
8.0f + random() * 6,
@ -919,7 +916,7 @@ void CG_PhaserFX(centity_t *cent) {
qboolean TorpedoQFX_Think(localEntity_t *le)
{
vec3_t line1end, line2end, axis[3], rgb, vel, dis;
vec3_t line1end, line2end, axis[3], vel, dis;
float dist;
VectorSubtract(le->refEntity.origin, le->addOrigin, dis);
@ -958,8 +955,6 @@ qboolean TorpedoQFX_Think(localEntity_t *le)
FX_AddLine( line1end, line2end, 1.0f, random() * 25 + 2, 0.0f, /*0.1 + random() * 0.2*/0.0f, 0.0f, 1, cgs.media.quantumGlow);
//FX_AddSprite(line1end, NULL, qfalse, random() * 90 + 30, 4, 1.0f, 0.0f, 0, 0.0f, 1.0f, cgs.media.photonStar);
VectorSet( rgb, 1.0f, 0.45f, 0.15f ); // orange
FX_AddSprite( le->refEntity.origin, NULL,qfalse,random() * 60 + 30, 4, 0.5f, 0.0f, 0, 0.0f, 1.0f, cgs.media.quantumRays);
//FX_AddSprite2(le->refEntity.origin, NULL,qfalse,random() * 10 + 60, 0.0f, 0.1f, 0.1f, rgb, rgb, 0.0f, 0.0f, 1, cgs.media.whiteRingShader);
FX_AddSprite( le->refEntity.origin, NULL,qfalse,random() * 40 + 8, 4, 0.5f, 0.0f, 0, 0.0f, 1.0f, cgs.media.quantumGlow );
@ -975,7 +970,7 @@ qboolean TorpedoQFX_Think(localEntity_t *le)
qboolean TorpedoPFX_Think(localEntity_t *le)
{
vec3_t line1end, line2end, axis[3], rgb, vel, dis;
vec3_t line1end, line2end, axis[3], vel, dis;
float dist;
VectorSubtract(le->refEntity.origin, le->addOrigin, dis);
@ -1014,8 +1009,6 @@ qboolean TorpedoPFX_Think(localEntity_t *le)
FX_AddLine( line1end, line2end, 1.0f, random() * 25 + 2, 0.0f, /*0.1 + random() * 0.2*/0.0f, 0.0f, 1, cgs.media.photonGlow);
//FX_AddSprite(line1end, NULL, qfalse, random() * 90 + 30, 4, 1.0f, 0.0f, 0, 0.0f, 1.0f, cgs.media.photonStar);
VectorSet( rgb, 1.0f, 0.45f, 0.15f ); // orange
FX_AddSprite( le->refEntity.origin, NULL,qfalse,random() * 60 + 30, 4, 0.5f, 0.0f, 0, 0.0f, 1.0f, cgs.media.photonRay);
//FX_AddSprite2(le->refEntity.origin, NULL,qfalse,random() * 10 + 60, 0.0f, 0.1f, 0.1f, rgb, rgb, 0.0f, 0.0f, 1, cgs.media.whiteRingShader);
FX_AddSprite( le->refEntity.origin, NULL,qfalse,random() * 40 + 8, 4, 0.5f, 0.0f, 0, 0.0f, 1.0f, cgs.media.photonGlow );
@ -1087,9 +1080,7 @@ qboolean ParticleFire_Think(localEntity_t *le) {
}
void CG_ParticleFire(vec3_t origin, int killtime, int size) {
localEntity_t *le;
le = FX_AddSpawner(origin, NULL, NULL, NULL, qfalse, 0, 0, killtime, ParticleFire_Think, 10);
//le->data.spawner.data1 = size;
FX_AddSpawner(origin, NULL, NULL, NULL, qfalse, 0, 0, killtime, ParticleFire_Think, 10);
}
qboolean ShowTrigger_Think(localEntity_t *le) {
@ -1560,13 +1551,16 @@ Creates an orange electricity bolt effect with a pulse that travels down the bea
======================
*/
/*void ForgeBoltFireback( vec3_t start, vec3_t end, vec3_t velocity, vec3_t user )
#if 0
void ForgeBoltFireback( vec3_t start, vec3_t end, vec3_t velocity, vec3_t user )
{
FX_AddElectricity( start, end, 1.0, user[DATA_RADIUS], 5.0, 1.0, 0.0, 200, cgs.media.pjBoltShader,
(int)user[DATA_EFFECTS], user[DATA_CHAOS] );
}
//---------------------------------------------------
#endif
#if 0
bool ForgeBoltPulse( FXPrimitive *fx, centity_t *ent )
{
vec3_t origin, new_org;
@ -1612,9 +1606,10 @@ bool ForgeBoltPulse( FXPrimitive *fx, centity_t *ent )
return true;
}
#endif
//-----------------------------
/*void CG_ForgeBolt( centity_t *cent )
#if 0
void CG_ForgeBolt( centity_t *cent )
{
qboolean pulse;
int effects;
@ -1676,6 +1671,7 @@ bool ForgeBoltPulse( FXPrimitive *fx, centity_t *ent )
BoltSparkSpew( cent->currentState.origin2, dir, cgs.media.dkorangeParticleShader );
}
}
#endif
/*
===========================
@ -1687,8 +1683,8 @@ Create directed and scaled plasma jet
void CG_Plasma( vec3_t start, vec3_t end, vec3_t sRGB, vec3_t eRGB, int startalpha, int endalpha )
{
vec3_t v, sp;
float detail, len, salpha = (startalpha / 255) , ealpha = (endalpha / 255);
vec3_t v;
float len, salpha = (startalpha / 255) , ealpha = (endalpha / 255);
//detail = FX_DetailLevel( start, 16, 1200 );
//if ( detail == 0 )
@ -1697,7 +1693,6 @@ void CG_Plasma( vec3_t start, vec3_t end, vec3_t sRGB, vec3_t eRGB, int startalp
// Orient the plasma
VectorSubtract( end, start, v );
len = VectorNormalize( v );
VectorMA( start, 0.5f, v, sp );
// Stash a quad at the base to make the effect look a bit more solid
//FX_AddQuad( sp, v, NULL, NULL, len * 0.36f, 0.0f, salpha, salpha, sRGB, sRGB, 0.0f, 45.0f, 0.0f, 200, cgs.media.prifleImpactShader );
@ -1724,7 +1719,8 @@ particle stream fx for STASIS level
======================
*/
/*bool particle_stream_think( FXPrimitive *fx, centity_t *ent )
#if 0
bool particle_stream_think( FXPrimitive *fx, centity_t *ent )
{
vec3_t old_org;
@ -1748,8 +1744,9 @@ particle stream fx for STASIS level
return true;
}
#endif
//------------------------------------------------------------------------------
#if 0
void CG_ParticleStream( centity_t *cent )
{
vec3_t vel, org, dir;
@ -1784,6 +1781,7 @@ void CG_ParticleStream( centity_t *cent )
0.0, 0.0, time, cgs.media.purpleParticleShader, 0, particle_stream_think );
}
}
#endif
/*
======================
@ -1794,7 +1792,8 @@ The particles will accelerate up to the half-way point of the cylinder, then dec
======================
*/
/*void CG_TransporterStream( centity_t *cent )
#if 0
void CG_TransporterStream( centity_t *cent )
{
vec3_t vel, accel, dir, pos, right, up;
float len, time, acceleration, scale, dis, vf;
@ -1871,6 +1870,7 @@ The particles will accelerate up to the half-way point of the cylinder, then dec
}
}
}
#endif
/*
-------------------------
@ -1878,7 +1878,8 @@ CG_ExplosionTrail
-------------------------
*/
/*qboolean explosionTrailThink( localEntity_t *fx )
#if 0
qboolean explosionTrailThink( localEntity_t *fx )
{
localEntity_t *le=0;
vec3_t direction, origin, new_org, angles, dir;
@ -1932,8 +1933,9 @@ CG_ExplosionTrail
return qtrue;
}
#endif
//------------------------------------------------------------------------------
#if 0
void CG_ExplosionTrail( centity_t *cent )
{
vec3_t dir;
@ -1946,6 +1948,7 @@ void CG_ExplosionTrail( centity_t *cent )
FX_AddParticle( cent->currentState.origin, dir, qfalse, 16, 0.0, 1.0, 1.0,
0.0, 0.0, 6000, cgs.media.ltblueParticleShader, explosionTrailThink );
}
#endif
/*
----------------------
@ -1955,7 +1958,8 @@ A scanning type beam
----------------------
*/
/*void CG_BorgEnergyBeam( centity_t *cent )
#if 0
void CG_BorgEnergyBeam( centity_t *cent )
{
vec3_t normal, angles, base, dir, dir2, rgb;
float len, alpha;
@ -2018,6 +2022,7 @@ A scanning type beam
VectorCopy( base, cent->gent->pos1 );
cent->gent->angle += cent->gent->speed * 0.08f;
}
#endif
/*
----------------------

View file

@ -558,7 +558,7 @@ static void ObjectivePrint_Line(int strIndex,int color,centity_t *cent)
int y,pixelLen,charLen;
char holdText[1024], holdText2[2];
char finalText[MAX_OBJ_LENGTH];
int len,len_s,maxPixLength,charHeight;
int len, maxPixLength, charHeight;
assert(cgs.objectives[strIndex].text);
@ -567,7 +567,6 @@ static void ObjectivePrint_Line(int strIndex,int color,centity_t *cent)
len = strlen(str);
len++;
Q_strncpyz(finalText,str,len);
len_s = strlen(str);
pixelLen = UI_ProportionalStringWidth(finalText,UI_SMALLFONT);
@ -658,7 +657,7 @@ static int Objective_LineCnt(int strIndex,centity_t *cent)
int pixelLen,charLen;
char holdText[1024], holdText2[2];
char finalText[MAX_OBJ_LENGTH];
int len,len_s,maxPixLength;
int len, maxPixLength;
int lineCnt;
assert(cgs.objectives[strIndex].text);
@ -667,7 +666,6 @@ static int Objective_LineCnt(int strIndex,centity_t *cent)
len = strlen(str);
len++;
Q_strncpyz(finalText,str,len);
len_s = strlen(str);
pixelLen = UI_ProportionalStringWidth(finalText,UI_SMALLFONT);
lineCnt = 0;

View file

@ -1838,8 +1838,8 @@ qboolean CG_Cvar_ClampInt( const char *name, vmCvar_t *vmCvar, int min, int max
const char *CG_ConfigString( int index );
const char *CG_Argv( int arg );
void QDECL CG_Printf( const char *msg, ... );
void QDECL CG_Error( const char *msg, ... );
void QDECL CG_Printf( const char *msg, ... ) __attribute__ ((format (printf, 1, 2)));
void QDECL CG_Error( const char *msg, ... ) __attribute__ ((format (printf, 1, 2)));
void CG_StartMusic( void );
void CG_UpdateCvars( void );

View file

@ -99,8 +99,8 @@ qboolean LoadLuaFile(char *path, int num_vm)
qboolean CG_LuaInit()
{
char fxfilename[MAX_QPATH];
fileHandle_t fxfile;
//char fxfilename[MAX_QPATH];
//fileHandle_t fxfile;
CG_Printf("------- CG_LuaInit -------\n");

View file

@ -426,7 +426,6 @@ int CG_LastAttacker( void ) {
return cg.snap->ps.persistant[PERS_ATTACKER];
}
void QDECL CG_Printf( const char *msg, ... ) {
va_list argptr;
char text[1024];
@ -2312,7 +2311,7 @@ qboolean CG_LoadUsablesStrings( void )
token = COM_Parse( &textPtr );
if ( Q_strncmp( token, "{", 1 ) != 0 )
{
CG_Printf( S_COLOR_RED "ERROR: UsableDescriptions had no opening brace ( { )!\n", fileRoute );
CG_Printf( S_COLOR_RED "ERROR: UsableDescriptions had no opening brace ( { )!\n" );
continue;
}

View file

@ -271,7 +271,7 @@ void ParseAnimationSndBlock(const char *filename, animsounds_t *animSounds, anim
}
else
{
animSounds->soundIndex[0] = trap_S_RegisterSound( va( soundString ) );
animSounds->soundIndex[0] = trap_S_RegisterSound( va( "%s", soundString ) );
#ifndef FINAL_BUILD
if ( !animSounds->soundIndex[0] )
{//couldn't register it - file not found
@ -952,7 +952,7 @@ static qboolean CG_ParseModelDataFile( clientInfo_t *ci, const char *charName,
fileHandle_t file;
int file_len;
char charText[20000];
char *textPtr, *prevValue;
char *textPtr;
char fileName[MAX_QPATH];
//char animPath[MAX_QPATH];
int i, n;
@ -1017,7 +1017,6 @@ static qboolean CG_ParseModelDataFile( clientInfo_t *ci, const char *charName,
}
while ( 1 ) {
prevValue = textPtr; //set a backup
token = COM_Parse( &textPtr );
if (!token[0] || !token ) { //we've hit the end of the file. w00t! exit!
@ -1204,38 +1203,6 @@ static qboolean CG_ParseModelDataFile( clientInfo_t *ci, const char *charName,
ci->hasRanks = qfalse;
continue;
}
//player footsteps.
//FIXME: Is it possible to make these things dynamic, so we can
//put in our own footstep sounds?
/*else if ( !Q_stricmp( token, "footsteps" ) ) {
token = COM_Parse( &textPtr );
if ( !token ) {
break;
}
if ( !Q_stricmp( token, "default" ) || !Q_stricmp( token, "normal" ) ) {
ci->footsteps = FOOTSTEP_NORMAL;
} else if ( !Q_stricmp( token, "borg" ) ) {
ci->footsteps = FOOTSTEP_BORG;
} else if ( !Q_stricmp( token, "reaver" ) ) {
ci->footsteps = FOOTSTEP_REAVER;
} else if ( !Q_stricmp( token, "species" ) ) {
ci->footsteps = FOOTSTEP_SPECIES;
} else if ( !Q_stricmp( token, "warbot" ) ) {
ci->footsteps = FOOTSTEP_WARBOT;
} else if ( !Q_stricmp( token, "boot" ) ) {
ci->footsteps = FOOTSTEP_BOOT;
} else if ( !Q_stricmp( token, "flesh" ) ) { // Old Q3 defaults, for compatibility. -PJL
ci->footsteps = FOOTSTEP_SPECIES;
} else if ( !Q_stricmp( token, "mech" ) ) { // Ditto
ci->footsteps = FOOTSTEP_BORG;
} else if ( !Q_stricmp( token, "energy" ) ) { // Ditto
ci->footsteps = FOOTSTEP_BORG;
} else {
CG_Printf( "Bad footsteps parm in %s: %s\n", fileName, token );
}
continue;
} */
//offset for player head in the scoreboard or whatever
else if ( !Q_stricmp( token, "headoffset" ) ) {
@ -1297,7 +1264,7 @@ static qboolean CG_ParseModelDataFile( clientInfo_t *ci, const char *charName,
if ( !skinSetFound )
{
if ( !CG_ParseSkinSetDataFile( ci, va("%s_*", modelName, skinName ), charName, skinName ) )
if ( !CG_ParseSkinSetDataFile( ci, va("%s_*", modelName ), charName, skinName ) )
{
CG_Printf( S_COLOR_RED "ERROR: Tried loading default skin set, however it failed.\n");
}
@ -1986,7 +1953,7 @@ void CG_NewClientInfo( int clientNum ) {
skin = "default";
}
Com_sprintf( model, len - strlen(skin), model);
Com_sprintf( model, len - strlen(skin), "%s", model);
}
}
@ -4541,10 +4508,10 @@ void CG_Player( centity_t *cent ) {
if ( cent->currentState.legsAnim != cg.fpsBody.anim ) {
refEntity_t ref;
vec3_t temp;
//vec3_t temp;
CG_PositionEntityOnTag( &ref, &torso, torso.hModel, "tag_head");
VectorSubtract( cg.refdef.vieworg, ref.origin, temp );
//VectorSubtract( cg.refdef.vieworg, ref.origin, temp );
//make the body smaller if need be
//if ( cg.refdef.vieworg[2] < ref.origin[2] )
@ -5042,7 +5009,7 @@ void CG_Player( centity_t *cent ) {
refEntity_t* target = NULL;
qhandle_t targetModel;
for (i = 0; ( ( i < MAX_BOLTONS ) || ( ci->boltonTags[i].tagModel || ci->boltonTags[i].tagName[0] ) ); i++ ) {
for (i = 0; ( ( i < MAX_BOLTONS ) && ( ci->boltonTags[i].tagModel || ci->boltonTags[i].tagName[0] ) ); i++ ) {
//if there's no data in there... no point to rendering it
//ROFL... uh, we can't use .modelBase since 0 is a valid entry for that one :P
if ( !ci->boltonTags[i].tagName[0] || !ci->boltonTags[i].tagModel ) {
@ -5309,7 +5276,7 @@ void CG_ResetPlayerEntity( centity_t *cent ) {
}
if ( cg_debugPosition.integer ) {
CG_Printf("%i ResetPlayerEntity yaw=%i\n", cent->currentState.number, cent->pe.torso.yawAngle );
CG_Printf("%i ResetPlayerEntity yaw=%i\n", cent->currentState.number, (int)cent->pe.torso.yawAngle );
}
}

View file

@ -17,7 +17,6 @@ If the ammo has gone low enough to generate the warning, play a sound
void CG_CheckAmmo( void ) {
int i;
int total;
int previous;
int weapons;
if ( cg.lowAmmoWarning > 2 )
@ -59,8 +58,6 @@ void CG_CheckAmmo( void ) {
}
}
previous = cg.lowAmmoWarning;
if ( total == 0 ) {
cg.lowAmmoWarning = 2;
} else {

View file

@ -249,8 +249,6 @@ static void CG_DrawClientScore_Big( int y, score_t *score, float *color, float f
//RPG-X: Not Needed without a head
//vec3_t headAngles;
clientInfo_t *ci;
int picSize;
float hcolor[4];
char *rpg_class;
vec4_t rpg_color;
vec_t *ping_txtcolor = NULL;
@ -258,213 +256,20 @@ static void CG_DrawClientScore_Big( int y, score_t *score, float *color, float f
ci = &cgs.clientinfo[score->client];
// Black background
/*if (cgs.gametype < GT_TEAM)
{
hcolor[0] = 0;
hcolor[1] = 0;
hcolor[2] = 0;
hcolor[3] = fade * 0.7;
if (cg.numScores > SB_MAXCLIENTS_BIG)
{
//CG_FillRect( SCOREBOARD_X, y,SB_TOPLINE_LENGTH , SB_NORMAL_HEIGHT+20, hcolor );
}
else
{
//CG_FillRect( SCOREBOARD_X, y,SB_TOPLINE_LENGTH , SB_NORMAL_HEIGHT_BIG+200, hcolor );
}
}*/
//RPG-X: RedTechie - Side Strips
CG_FillRect( SCOREBOARD_X-15, SB_HEADER+20, 15, SB_RPG_X_FIXHEIGHT-4, colorTable[CT_DKBLUE1] ); //RPG-X: RedTechie - Left Strip
CG_FillRect( SB_TOPLINE_LENGTH+53, SB_HEADER+20, 15, SB_RPG_X_FIXHEIGHT-4, colorTable[CT_DKBLUE1] ); //RPG-X: RedTechie - Right Strip
picSize = (SB_NORMAL_HEIGHT_BIG * .75);
// draw the handicap or bot skill marker (unless player has flag)
//RPG-X: RedTechie - Dont need this in RPG
/*if ( ci->powerups & ( 1 << PW_REDFLAG ) )
{
CG_DrawFlagModel( SB_BOTICON_X, y, picSize, picSize, TEAM_RED );
}
else if ( ci->powerups & ( 1 << PW_BORG_ADAPT ) )
{
CG_DrawFlagModel( SB_BOTICON_X, y, picSize, picSize, TEAM_BLUE );
}
else
{
if ( ci->pClass > PC_NOCLASS )
{
qhandle_t icon;
//Special hack: if it's Borg who has regen going, must be Borg queen
if ( ci->pClass == PC_BORG && (ci->powerups&(1<<PW_LASER)) )
{
if ( cg_drawIcons.integer )
{
icon = cgs.media.borgQueenIconShader;
CG_DrawPic( SB_BOTICON_X, y, picSize, picSize, icon );
}
}
else*/
//if ( ci->pClass > PC_NOCLASS )
//{
//icon = cgs.media.pClassShaders[ci->pClass];
//RPG-X: RedTechie - New class output
//VectorSet( rpg_color, 1.0, 1.0, 1.0 );
rpg_class = cgs.classData[ci->pClass].formalName;
rpg_color[0] = (float)cgs.classData[ci->pClass].radarColor[0] / 255.0f;
rpg_color[1] = (float)cgs.classData[ci->pClass].radarColor[1] / 255.0f;
rpg_color[2] = (float)cgs.classData[ci->pClass].radarColor[2] / 255.0f;
rpg_color[3] = 1.0f;
/*switch(ci->pClass){
case PC_COMMAND:
rpg_class = va("COMMAND");
//VectorSet( rpg_color, 0.604, 0, 0 );
rpg_color = colorTable[CT_RED];
break;
case PC_SECURITY:
rpg_class = va("SECURITY");
//VectorSet( rpg_color, 0.761, 0.537, 0.024 );
rpg_color = colorTable[CT_YELLOW];
break;
case PC_MEDICAL:
rpg_class = va("MEDICAL");
//VectorSet( rpg_color, 0.082, 0.337, 0.357 );
rpg_color = colorTable[CT_BLUE];
break;
case PC_ADMIN:
rpg_class = va("ADMIN");
rpg_color = colorTable[CT_LTORANGE];
//VectorCopy( colorTable[CT_LTORANGE], rpg_color );
break;
case PC_N00B:
rpg_class = va("N00b");
rpg_color = colorTable[CT_LTORANGE];
//VectorCopy( colorTable[CT_LTORANGE], rpg_color );
break;
case PC_SCIENCE:
rpg_class = va("SCIENCE");
rpg_color = colorTable[CT_BLUE];
//VectorSet( rpg_color, 0.082, 0.337, 0.357 );
break;
case PC_ENGINEER:
rpg_class = va("ENGINEER");
rpg_color = colorTable[CT_YELLOW];
//VectorSet( rpg_color, 0.761, 0.537, 0.024 );
break;
case PC_ALIEN:
rpg_class = va("ALIEN");
rpg_color = colorTable[CT_LTORANGE];
//VectorCopy( colorTable[CT_LTORANGE], rpg_color );
break;
case PC_ALPHAOMEGA22:
rpg_class = va("MARINE");
rpg_color = colorTable[CT_GREEN];
//VectorSet( rpg_color, 0.012, 0.443, 0.047 );
break;
case PC_NOCLASS:
rpg_class = va("<N/A>");
rpg_color = colorTable[CT_WHITE];
//VectorCopy( colorTable[CT_WHITE], rpg_color );
break;
}*/
//rpg_color[3] = 1.0f; //100% alpha
//}
//}
//RPG-X: RedTechie - Dont need this in RPG
/*else if ( ci->botSkill > 0 && ci->botSkill <= 5 )
{
if ( cg_drawIcons.integer )
{
CG_DrawPic( SB_BOTICON_X, y, picSize, picSize, cgs.media.botSkillShaders[ ci->botSkill - 1 ] );
}
}
else if ( ci->handicap < 100 )
{
Com_sprintf( string, sizeof( string ), "%i", ci->handicap );
if ( cgs.gametype == GT_TOURNAMENT )
{
// CG_DrawSmallStringColor( iconx, y - SMALLCHAR_HEIGHT/2, string, color );
UI_DrawProportionalString( SB_BOTICON_X, y - SMALLCHAR_HEIGHT/2, string, UI_SMALLFONT, color);
}
else
{
// CG_DrawSmallStringColor( iconx, y, string, color );
UI_DrawProportionalString( SB_BOTICON_X, y , string, UI_SMALLFONT, color);
}
}
// draw the wins / losses
if ( cgs.gametype == GT_TOURNAMENT ) {
Com_sprintf( string, sizeof( string ), "%i/%i", ci->wins, ci->losses );
if( ci->handicap < 100 && !ci->botSkill )
{
// CG_DrawSmallStringColor( iconx, y + SMALLCHAR_HEIGHT/2, string, color );
UI_DrawProportionalString( SB_BOTICON_X, y + SMALLCHAR_HEIGHT/2 , string, UI_SMALLFONT, color);
}
else
{
// CG_DrawSmallStringColor( iconx, y, string, color );
UI_DrawProportionalString( SB_BOTICON_X, y , string, UI_SMALLFONT, color);
}
}
}*/
//RPG-X: No face needed in new scoreboard
// draw the face
//VectorClear( headAngles );
//headAngles[YAW] = 180;
//CG_DrawHead( SB_HEAD_X, y, picSize, picSize, score->client, headAngles );
rpg_class = cgs.classData[ci->pClass].formalName;
rpg_color[0] = (float)cgs.classData[ci->pClass].radarColor[0] / 255.0f;
rpg_color[1] = (float)cgs.classData[ci->pClass].radarColor[1] / 255.0f;
rpg_color[2] = (float)cgs.classData[ci->pClass].radarColor[2] / 255.0f;
rpg_color[3] = 1.0f;
// highlight your position
if ( score->client == cg.snap->ps.clientNum )
{
int rank;
localClient = qtrue;
if ( cg.snap->ps.persistant[PERS_TEAM] == TEAM_SPECTATOR
|| cgs.gametype >= GT_TEAM )
{
rank = -1;
}
else
{
rank = cg.snap->ps.persistant[PERS_RANK] & ~RANK_TIED_FLAG;
}
if ( rank == 0 )
{
hcolor[0] = 0;
hcolor[1] = 0;
hcolor[2] = 0.7;
}
else if ( rank == 1 )
{
hcolor[0] = 0.7;
hcolor[1] = 0;
hcolor[2] = 0;
}
else if ( rank == 2 )
{
hcolor[0] = 0.7;
hcolor[1] = 0.7;
hcolor[2] = 0;
}
else
{
hcolor[0] = 0.7;
hcolor[1] = 0.7;
hcolor[2] = 0.7;
}
hcolor[3] = fade * 0.7;
//RPG-X: RedTechie No highlighting player info in rpg
/* CG_FillRect( SB_SCORELINE_X_BIG - SMALLCHAR_WIDTH, y,
SB_TOPLINE_LENGTH - ((SB_SCORELINE_X_BIG - SMALLCHAR_WIDTH) - SCOREBOARD_X), BIGCHAR_HEIGHT+1, hcolor );
*/
}
@ -550,79 +355,6 @@ static void CG_DrawClientScore_Big( int y, score_t *score, float *color, float f
}
/*//RPG-X: RedTechie - Connecting
if ( score->ping == -1 ) {
Com_sprintf(string,sizeof(string),"(%s)%s",ingame_text[IGT_CONNECTING],ci->name);
UI_DrawProportionalString( SB_NAME_X_BIG, y , string, UI_TINYFONT, colorTable[CT_WHITE]);
}
//J2J Book
//RPG-X: RedTechie - Spectator
else if ( ci->team == TEAM_SPECTATOR )
{
Com_sprintf(string,sizeof(string),"(%s)%s",ingame_text[IGT_SPECTABBREV],ci->name);
CG_NamePrep(string2,string,200,UI_TINYFONT); //RPG-X ADDED: RedTechie - 200 pixels in the name column use to be 184
UI_DrawProportionalString( SB_NAME_X_BIG, y , string2, UI_TINYFONT, colorTable[CT_WHITE]);
if(rpg_class && rpg_color){
UI_DrawProportionalString( SB_RPGCLASS_X_BIG, y , rpg_class, UI_TINYFONT, rpg_color); //CT_VLTPURPLE1 CT_WHITE
}
Com_sprintf(string,sizeof(string),"%5i",cg_entities[score->client].currentState.clientNum); //RPG-X: J2J Switched Scoore to Client No.
UI_DrawProportionalString( SB_SCORE_X_BIG, y , string, UI_TINYFONT, colorTable[CT_WHITE]);
Com_sprintf(string,sizeof(string),"%5i",score->time);
UI_DrawProportionalString( SB_TIME_X_BIG, y , string, UI_TINYFONT, colorTable[CT_WHITE]);
Com_sprintf(string,sizeof(string),"%5i",score->ping);
UI_DrawProportionalString( SB_PING_X_BIG, y, string, UI_TINYFONT, ping_txtcolor);
CG_DrawRank(SB_RANK_X_BIG, y-2,ci->pClass, score->score);
}
//RPG-X: RedTechie - Pinged out
else if ( score->ping >= 827 )
{
Com_sprintf(string,sizeof(string),"(%s)%s",ingame_text[IGT_PINGEDOUT],ci->name);
CG_NamePrep(string2,string,200,UI_TINYFONT); //RPG-X ADDED: RedTechie - 200 pixels in the name column use to be 184
UI_DrawProportionalString( SB_NAME_X_BIG, y , string2, UI_TINYFONT, colorTable[CT_WHITE]);
if(rpg_class && rpg_color){
UI_DrawProportionalString( SB_RPGCLASS_X_BIG, y , rpg_class, UI_TINYFONT, rpg_color); //CT_VLTPURPLE1 CT_WHITE
}
Com_sprintf(string,sizeof(string),"%5i",cg_entities[score->client].currentState.clientNum); //RPG-X: J2J Switched Scoore to Client No.
UI_DrawProportionalString( SB_SCORE_X_BIG, y , string, UI_TINYFONT, colorTable[CT_WHITE]);
Com_sprintf(string,sizeof(string),"%5i",score->time);
UI_DrawProportionalString( SB_TIME_X_BIG, y , string, UI_TINYFONT, colorTable[CT_WHITE]);
Com_sprintf(string,sizeof(string),"%5i",score->ping);
UI_DrawProportionalString( SB_PING_X_BIG, y, string, UI_TINYFONT, ping_txtcolor);
CG_DrawRank(SB_RANK_X_BIG, y-2,ci->pClass, score->score);
}
//RPG-X: RedTechie - Regular
else
{
//draw rank image
CG_DrawRank( SB_RANK_X_BIG, y-2,ci->pClass, score->score);
//draw player class name
if(rpg_class && rpg_color){
UI_DrawProportionalString( SB_RPGCLASS_X_BIG, y , rpg_class, UI_TINYFONT, rpg_color); //CT_VLTPURPLE1 CT_WHITE
}
//prep name and then render it
CG_NamePrep(string,ci->name,200,UI_TINYFONT); //RPG-X ADDED: RedTechie - 200 pixels in the name column use to be 184
UI_DrawProportionalString( SB_NAME_X_BIG, y , string, UI_TINYFONT, colorTable[CT_WHITE]);
//player client Num
Com_sprintf(string,sizeof(string),"%3i",cg_entities[score->client].currentState.clientNum); //RPG-X: J2J Switched Scoore to Client No.
UI_DrawProportionalString( SB_SCORE_X_BIG, y , string, UI_TINYFONT, colorTable[CT_WHITE]);
//player time
Com_sprintf(string,sizeof(string),"%5i",score->time);
UI_DrawProportionalString( SB_TIME_X_BIG, y , string, UI_TINYFONT, colorTable[CT_WHITE]);
//player ping
Com_sprintf(string,sizeof(string),"%3i",score->ping);
UI_DrawProportionalString( SB_PING_X_BIG, y, string, UI_TINYFONT, ping_txtcolor);
}*/
//RPG-X: RedTechie - Draw live divider after every client
CG_FillRect( SB_NAME_X_BIG, y+11, SB_TOPLINE_LENGTH-119, 1, colorTable[CT_VDKBLUE2] ); // y off - 10, thickness - 2 //150
@ -1043,9 +775,6 @@ qboolean CG_DrawScoreboard( void )
//char buf[64];
int maxClients;
int lineHeight;
int topBorderSize, bottomBorderSize;
int rankOfClient;
int tTeam/*, bTeam*/;
float hcolor[4];
int inIntermission;
char gamename[1024];
@ -1075,8 +804,6 @@ qboolean CG_DrawScoreboard( void )
return qfalse;
}
tTeam = TEAM_RED; // Compiler needed initialization here for some reason...
// FADE SETUP... ??
if ( cg.showScores || cg.predictedPlayerState.pm_type == PM_DEAD ||
inIntermission )
@ -1100,32 +827,9 @@ qboolean CG_DrawScoreboard( void )
// IN GAME SCOREBOARD HEADER STUFF
//---------------------------------
rankOfClient = cg.snap->ps.persistant[PERS_RANK];
if ( !inIntermission && cg.snap->ps.persistant[PERS_TEAM]!=TEAM_SPECTATOR)
{
// Display Your Rank / Your Team
//-----------------------------------------------
//RPG-X: RedTechie Dont need this for rpg This code prints out what team your on and if your winning when you call the scoreboard just takes up to much room (i'll probly muck it all up but here it goes
/*if (cgs.gametype<=GT_SINGLE_PLAYER)
{
if (rankOfClient & RANK_TIED_FLAG)
Com_sprintf( buf, sizeof(buf), "%s %i", ingame_text[IGT_TIED_FOR], (rankOfClient&~RANK_TIED_FLAG)+1);
else
Com_sprintf( buf, sizeof(buf), "%s %i", ingame_text[IGT_YOUR_RANK], (rankOfClient&~RANK_TIED_FLAG)+1);
UI_DrawProportionalString( 14, AWARD_Y, buf, UI_BIGFONT|UI_LEFT, colorTable[CT_LTGOLD1] );
}
if (cgs.gametype>GT_SINGLE_PLAYER)
{
if ( cg.teamScores[0] == cg.teamScores[1] )
s = va("%s %i", ingame_text[IGT_TEAMSARETIED],cg.teamScores[0] );
else if ( cg.teamScores[0] >= cg.teamScores[1] )
s = va("%s %i %s %i",ingame_text[IGT_REDTEAMLEADS],cg.teamScores[0],ingame_text[IGT_TO], cg.teamScores[1] );
else
s = va("%s %i %s %i",ingame_text[IGT_BLUETEAMLEADS],cg.teamScores[1],ingame_text[IGT_TO], cg.teamScores[0] );
UI_DrawProportionalString(14, AWARD_Y, s, UI_BIGFONT|UI_LEFT, colorTable[CT_LTGOLD1]);
}*/
// Display Who Killed You
//-----------------------------------------------
if ( cg.killerName[0] )
@ -1144,24 +848,11 @@ qboolean CG_DrawScoreboard( void )
// scoreboard
y = SB_HEADER;
// Top of scoreboard
//trap_R_SetColor( colorTable[CT_DKORANGE] );
// CG_DrawPic( SCOREBOARD_X, y + 27, 16, -32, cgs.media.corner_12_24 ); // Corner
// CG_DrawPic( SCOREBOARD_X, y, 16, 32, cgs.media.corner_12_24 ); // Corner
//RPG-X: Bookmark
//CG_FillRect( SCOREBOARD_X, y, SB_TOPLINE_LENGTH, 24, colorTable[CT_DKORANGE]);
// Black background
//if (cgs.gametype < GT_TEAM)
//{
hcolor[0] = 0;
hcolor[1] = 0;
hcolor[2] = 0;
hcolor[3] = fade * 0.7;
//CG_FillRect( SCOREBOARD_X, y + 20,SB_TOPLINE_LENGTH, 12, hcolor );
//RPG-X: RedTechie - Fixed black background height
CG_FillRect( SCOREBOARD_X, y + 5,SB_TOPLINE_LENGTH + 26, SB_RPG_X_FIXHEIGHT+15, hcolor );//RPG-X: RedTechie - Before CG_FillRect( SCOREBOARD_X, y + 20,SB_TOPLINE_LENGTH, SB_RPG_X_FIXHEIGHT, hcolor );
//}
hcolor[0] = 0;
hcolor[1] = 0;
hcolor[2] = 0;
hcolor[3] = fade * 0.7;
CG_FillRect( SCOREBOARD_X, y + 5,SB_TOPLINE_LENGTH + 26, SB_RPG_X_FIXHEIGHT+15, hcolor );//RPG-X: RedTechie - Before CG_FillRect( SCOREBOARD_X, y + 20,SB_TOPLINE_LENGTH, SB_RPG_X_FIXHEIGHT, hcolor );
trap_R_SetColor( colorTable[CT_DKBLUE1] );
CG_DrawPic( SCOREBOARD_X-15, SB_TOP-28, 25, 28, cgs.media.scoreboardtopleft ); //RPG-X: - RedTechie Top Left
@ -1169,14 +860,6 @@ qboolean CG_DrawScoreboard( void )
CG_DrawPic( SCOREBOARD_X-15, SB_TOP+325, 36, 28, cgs.media.scoreboardbotleft ); //RPG-X: - RedTechie Bottom Left
CG_DrawPic( SB_TOPLINE_LENGTH+32, SB_TOP+321, 36, 32, cgs.media.scoreboardbotright ); //RPG-X: - RedTechie Bottom Right
/*#define SB_RANK_X_BIG ( SB_SCORELINE_X_BIG + 6 ) //Before RPG-X: (SB_SCORELINE_X_BIG + 6) = 43
#define SB_RPGCLASS_X_BIG ( SB_RANK_X_BIG + 78 ) //70 = 121
#define SB_NAME_X_BIG ( SB_RPGCLASS_X_BIG + 46 ) //132 = 167
#define SB_LOC_X_BIG ( SB_NAME_X_BIG + 187 )
#define SB_SCORE_X_BIG ( SB_LOC_X_BIG + 148 ) //405 = 464 //335 //332
#define SB_TIME_X_BIG ( SB_SCORE_X_BIG + 44 ) // = 493
#define SB_PING_X_BIG ( SB_TIME_X_BIG + 35 ) //491 = 528*/
CG_FillRect( SCOREBOARD_X, y+5, ( SB_RPGCLASS_X_BIG - 5 ) - SCOREBOARD_X, 15, colorTable[CT_DKBLUE1]); //RPG-X: Rank Bar //75 //79
CG_FillRect( SB_RPGCLASS_X_BIG - 3, y+5, ( SB_NAME_X_BIG - 5 ) - ( SB_RPGCLASS_X_BIG - 3 ), 15, colorTable[CT_DKBLUE1]); //RPG-X: Class Bar //46 - 60
if ( cgs.locations ) {
@ -1191,40 +874,16 @@ qboolean CG_DrawScoreboard( void )
CG_FillRect( SB_TIME_X_BIG - 3, y+5, ( SB_PING_X_BIG - 5 ) - ( SB_TIME_X_BIG - 3 ), 15, colorTable[CT_DKBLUE1]); //RPG-X: Time Bar //34
CG_FillRect( SB_PING_X_BIG - 3, y+5, 602 - ( SB_PING_X_BIG - 3 ), 15, colorTable[CT_DKBLUE1]); //RPG-X: Ping Bar //35
//if ( inIntermission )
// {
// UI_DrawProportionalString( SB_BOTICON_X+26, SB_HEADERTEXT, ingame_text[IGT_READY],UI_TINYFONT, colorTable[CT_BLACK] );
// UI_DrawProportionalString( SB_NAME_X, SB_HEADERTEXT, ingame_text[IGT_SB_NAME],UI_TINYFONT, colorTable[CT_BLACK] );
// UI_DrawProportionalString( SB_SCORE_X, SB_HEADERTEXT, ingame_text[IGT_SB_SCORE],UI_TINYFONT, colorTable[CT_BLACK] );
// UI_DrawProportionalString( SB_TIME_X, SB_HEADERTEXT, ingame_text[IGT_SB_TIME],UI_TINYFONT, colorTable[CT_BLACK] );
// UI_DrawProportionalString( SB_PING_X, SB_HEADERTEXT, ingame_text[IGT_SB_PING],UI_TINYFONT, colorTable[CT_BLACK] );
// UI_DrawProportionalString( SB_KILLEDCNT_X, SB_HEADERTEXT,ingame_text[IGT_TITLEELIMINATED],UI_TINYFONT, colorTable[CT_BLACK] );
// UI_DrawProportionalString( SB_WORSTENEMY_X, SB_HEADERTEXT,ingame_text[IGT_WORSTENEMY],UI_TINYFONT, colorTable[CT_BLACK] );
// UI_DrawProportionalString( SB_FAVEWEAPON_X, SB_HEADERTEXT,ingame_text[IGT_FAVORITEWEAPON],UI_TINYFONT, colorTable[CT_BLACK] );
//}
//else
//{
//RPG-X: RedTechie (Rank BookMark)
UI_DrawProportionalString( SB_RANK_X_BIG, SB_HEADERTEXT, ingame_text[IGT_SB_RANK], UI_TINYFONT | UI_LEFT, colorTable[CT_BLACK] );
UI_DrawProportionalString( SB_RPGCLASS_X_BIG, SB_HEADERTEXT, ingame_text[IGT_SB_RPGCLASS],UI_TINYFONT | UI_LEFT, colorTable[CT_BLACK] );
UI_DrawProportionalString( SB_NAME_X_BIG, SB_HEADERTEXT, ingame_text[IGT_SB_NAME], UI_TINYFONT | UI_LEFT, colorTable[CT_BLACK] );
if ( cgs.locations ) {
UI_DrawProportionalString( SB_LOC_X_BIG, SB_HEADERTEXT, ingame_text[IGT_SB_LOC], UI_TINYFONT | UI_LEFT, colorTable[CT_BLACK] );
}
UI_DrawProportionalString( SB_SCORE_X_BIG, SB_HEADERTEXT, ingame_text[IGT_SB_SCORE], UI_TINYFONT | UI_LEFT, colorTable[CT_BLACK] );
UI_DrawProportionalString( SB_TIME_X_BIG, SB_HEADERTEXT, ingame_text[IGT_SB_TIME], UI_TINYFONT | UI_LEFT, colorTable[CT_BLACK] );
UI_DrawProportionalString( SB_PING_X_BIG, SB_HEADERTEXT, ingame_text[IGT_SB_PING], UI_TINYFONT | UI_LEFT, colorTable[CT_BLACK] );
//}
//trap_R_SetColor( colorTable[CT_DKORANGE] );
//CG_DrawPic( 605, y, 16, 32, cgs.media.scoreboardEndcap );
/*trap_R_SetColor( colorTable[CT_DKBLUE1] );
CG_DrawPic( SCOREBOARD_X-15, y-28, 25, 28, cgs.media.scoreboardtopleft ); //RPG-X: - RedTechie Top Left
CG_DrawPic( SB_TOPLINE_LENGTH+43, y-28, 25, 28, cgs.media.scoreboardtopright ); //RPG-X: - RedTechie Top Right
CG_DrawPic( SCOREBOARD_X-15, y+325, 36, 28, cgs.media.scoreboardbotleft ); //RPG-X: - RedTechie Bottom Left
CG_DrawPic( SB_TOPLINE_LENGTH+32, y+321, 36, 32, cgs.media.scoreboardbotright ); //RPG-X: - RedTechie Bottom Right
*/
//RPG-X: RedTechie (Rank BookMark)
UI_DrawProportionalString( SB_RANK_X_BIG, SB_HEADERTEXT, ingame_text[IGT_SB_RANK], UI_TINYFONT | UI_LEFT, colorTable[CT_BLACK] );
UI_DrawProportionalString( SB_RPGCLASS_X_BIG, SB_HEADERTEXT, ingame_text[IGT_SB_RPGCLASS],UI_TINYFONT | UI_LEFT, colorTable[CT_BLACK] );
UI_DrawProportionalString( SB_NAME_X_BIG, SB_HEADERTEXT, ingame_text[IGT_SB_NAME], UI_TINYFONT | UI_LEFT, colorTable[CT_BLACK] );
if ( cgs.locations ) {
UI_DrawProportionalString( SB_LOC_X_BIG, SB_HEADERTEXT, ingame_text[IGT_SB_LOC], UI_TINYFONT | UI_LEFT, colorTable[CT_BLACK] );
}
UI_DrawProportionalString( SB_SCORE_X_BIG, SB_HEADERTEXT, ingame_text[IGT_SB_SCORE], UI_TINYFONT | UI_LEFT, colorTable[CT_BLACK] );
UI_DrawProportionalString( SB_TIME_X_BIG, SB_HEADERTEXT, ingame_text[IGT_SB_TIME], UI_TINYFONT | UI_LEFT, colorTable[CT_BLACK] );
UI_DrawProportionalString( SB_PING_X_BIG, SB_HEADERTEXT, ingame_text[IGT_SB_PING], UI_TINYFONT | UI_LEFT, colorTable[CT_BLACK] );
y = SB_TOP;
@ -1235,77 +894,22 @@ qboolean CG_DrawScoreboard( void )
{// POSTGAME
maxClients = SB_MAXCLIENTS_NORMAL;
lineHeight = SB_NORMAL_HEIGHT;
topBorderSize = 16;
bottomBorderSize = 16;
}
else
{// INGAME
maxClients = SB_MAXCLIENTS_BIG;
lineHeight = SB_NORMAL_HEIGHT_BIG;
topBorderSize = 16;
bottomBorderSize = 16;
}
localClient = qfalse;
//TiM
/*if ( cgs.gametype >= GT_TEAM )
{
y-=6;
// TEAM PLAY
//----------
if ( cg.teamScores[0] >= cg.teamScores[1] )
{
tTeam = TEAM_RED;
bTeam = TEAM_BLUE;
}
else
{
tTeam = TEAM_BLUE;
bTeam = TEAM_RED;
}
n1 = CG_TeamScoreboard( y, TEAM_FREE, fade, maxClients, lineHeight );
y += (n1 * lineHeight);
maxClients -= n1;
// TOP TEAM
n1 = CG_GetTeamCount(tTeam, maxClients);
CG_DrawTeamBackground( SCOREBOARD_X+15, y, SB_TOPLINE_LENGTH - 14, n1*lineHeight, 0.33, tTeam, qtrue );
CG_TeamScoreboard( y, tTeam, fade, maxClients, lineHeight );
if(tTeam==TEAM_BLUE)
CG_FillRect( SCOREBOARD_X+12, y, 2, (n1*lineHeight), colorTable[CT_BLUE]);
else
CG_FillRect( SCOREBOARD_X+12, y, 2, (n1*lineHeight), colorTable[CT_RED]);
y += (n1*lineHeight);
maxClients -= n1;
// BOTTOM TEAM
n2 = CG_GetTeamCount(bTeam, maxClients);
CG_DrawTeamBackground( SCOREBOARD_X+15, y, SB_TOPLINE_LENGTH - 14, n2*lineHeight, 0.33, bTeam, qtrue );
CG_TeamScoreboard( y, bTeam, fade, maxClients, lineHeight );
if(bTeam==TEAM_BLUE)
CG_FillRect( SCOREBOARD_X+12, y, 2, (n2*lineHeight), colorTable[CT_BLUE]);
else
CG_FillRect( SCOREBOARD_X+12, y, 2, (n2*lineHeight), colorTable[CT_RED]);
y += (n2*lineHeight);
maxClients -= n2;
// SPECTATOR TEAM
n3 = CG_TeamScoreboard( y, TEAM_SPECTATOR, fade, maxClients, lineHeight );
y += (n3 * lineHeight);
maxClients -= n3;
}
else
{*/
// FREE FOR ALL
//-------------
n1 = CG_TeamScoreboard( y, TEAM_FREE, fade, maxClients, lineHeight );
y += (n1 * lineHeight);
maxClients -= n1;
n2 = CG_TeamScoreboard( y, TEAM_SPECTATOR, fade, maxClients, lineHeight );
y += (n2 * lineHeight);
maxClients -= n2;
//}
n2 = CG_TeamScoreboard( y, TEAM_SPECTATOR, fade, maxClients, lineHeight );
y += (n2 * lineHeight);
maxClients -= n2;
//LOCAL CLIENT AT BOTTOM OF SCOREBOARD
//------------------------------------
@ -1331,85 +935,15 @@ qboolean CG_DrawScoreboard( void )
}
// Bottom of scoreboard
//trap_R_SetColor( colorTable[CT_DKORANGE] );
//CG_DrawPic( 13, y-3, 16, 32, cgs.media.corner_12_24 ); // Corner
//RPG-X BookMark Bottum bar
CG_FillRect( SCOREBOARD_X, SB_RPG_X_FIXHEIGHT+60, SB_TOPLINE_LENGTH, 15, colorTable[CT_DKBLUE1]);
//trap_R_SetColor( colorTable[CT_DKORANGE] );
//CG_DrawPic( 605, y, 16, 32, cgs.media.scoreboardEndcap );
//RPG-X: - RedTechie no PRESS FIRE TO CONTINUE!
/*if ( inIntermission )
{
if ( cgs.gametype != GT_SINGLE_PLAYER)
{
static int flashTime = 0;
static int flashColor = CT_RED;
if ( cg.time - flashTime >= 500 )
{
flashTime = cg.time;
if ( flashColor == CT_RED )
{
flashColor = CT_BLACK;
}
else
{
flashColor = CT_RED;
}
}
UI_DrawProportionalString( SB_TOPLINE_LENGTH, y+10+BIGCHAR_HEIGHT, ingame_text[IGT_CLICK_PLAY_AGAIN], UI_RIGHT, colorTable[flashColor] );
}
}*/
//if (cgs.gametype < GT_TEAM)
s = va("%s: %i", ingame_text[IGT_PLAYERS], cg.numScores); // Number of Players
//}
//RPG-X: - RedTechie Dont need extra crap
//TiM: Yeah.... crap suxx. ;P
/*else
{
n1=n2=n3=0;
s = va("%s: %i", ingame_text[IGT_PLAYERS], cg.numScores); // Number of Players
for (i=0; i<cg.numScores; i++)
{
if (cgs.clientinfo[cg.scores[i].client].team==TEAM_RED)
n1++;
if (cgs.clientinfo[cg.scores[i].client].team==TEAM_BLUE)
n2++;
if (cgs.clientinfo[cg.scores[i].client].team==TEAM_SPECTATOR)
n3++;
}
s = va("%s: ^1%i ^4%i ^0%i", ingame_text[IGT_PLAYERS], n1, n2, n3);
}*/
Q_strncpyz( gamename, s, sizeof(gamename) );
strcat( gamename, " "S_COLOR_YELLOW );
//Game Type
//RPG-X: RedTechie Dont need Game Type in scoreboard
/*if ( cgs.gametype == GT_FFA )
{
strcat( gamename, ingame_text[IGT_GAME_FREEFORALL] );
}
else if ( cgs.gametype == GT_TOURNAMENT )
{
strcat( gamename, ingame_text[IGT_GAME_TOURNAMENT] );
}
else if ( cgs.gametype == GT_SINGLE_PLAYER )
{
strcat( gamename, ingame_text[IGT_GAME_SINGLEPLAYER] );
}
else if ( cgs.gametype == GT_TEAM )
{
strcat( gamename, ingame_text[IGT_GAME_TEAMHOLOMATCH] );
}
else if ( cgs.gametype == GT_CTF )
{
strcat( gamename, ingame_text[IGT_GAME_CAPTUREFLAG] );
}
*/
//CG_AddGameModNameToGameName( gamename );
//RPG-X: RedTechie - Number of Characters in server
UI_DrawProportionalString( SCOREBOARD_X+10, SB_RPG_X_FIXHEIGHT+63, gamename, UI_TINYFONT, colorTable[CT_BLACK]);
@ -1629,7 +1163,7 @@ typedef struct {
static postgameMenuInfo_t postgameMenuInfo;
static qboolean postGameMenuStructInited = qfalse;
void InitPostGameMenuStruct()
void InitPostGameMenuStruct(void)
{
if (qfalse == postGameMenuStructInited)
{
@ -1990,15 +1524,12 @@ static qboolean AW_Draw( void )
int timer;
int y=0, yfrom=0;
int len;
vec4_t white, red, blue, yellow, blueA; // new colors
vec4_t white, yellow; // new colors
// RED GREEN BLUE ALPHA
//-----------------------------------------------------------------------
white[0] = white[1] = white[2] = 1.0f; white[3] = 1.0f;
red[0] = 1.0f; red[1] = 0.5f; red[2] = 0.5f; red[3] = 1.0f;
blue[0] = 0.5f; blue[1] = 0.5f; blue[2] = 1.0f; blue[3] = 1.0f;
yellow[0]= 1.0f; yellow[1]= 1.0f; yellow[2]= 0.5f; yellow[3]= 1.0f;
blueA[0] = 0.367f; blueA[1] = 0.261f;blueA[2] = 0.722f; blueA[3] = 0.5f;
// REASONS NOT TO SHOW THE AWARDS CEREMONY:
//--------------------------------------------
@ -2021,53 +1552,6 @@ static qboolean AW_Draw( void )
if (postgameMenuInfo.starttime==0)
return qtrue;
//RPG-X: RedTechie Dont need this aswell this also prints out what team your on and if your winning just takes up to much room
// ALL PHASES
// Display Your Rank / Your Team Wins
//-----------------------------------------------
/*if (cg.snap->ps.persistant[PERS_TEAM]!=TEAM_SPECTATOR)
{
if (cgs.gametype <= GT_SINGLE_PLAYER )
{
if (postgameMenuInfo.playerTied)
Com_sprintf( buf, sizeof(buf), "%s %i", ingame_text[IGT_TIED_FOR], postgameMenuInfo.playerTied);
else
Com_sprintf( buf, sizeof(buf), "%s %i", ingame_text[IGT_YOUR_RANK], postgameMenuInfo.playerGameRank+1);
UI_DrawProportionalString( 14, AWARD_Y, buf, UI_BIGFONT|UI_LEFT, white );
}
else
{
char *teamName = NULL;
switch ( cg.snap->ps.persistant[PERS_TEAM] )
{
case TEAM_RED:
teamName = (char *)CG_ConfigString( CS_RED_GROUP );
break;
case TEAM_BLUE:
teamName = (char *)CG_ConfigString( CS_BLUE_GROUP );
break;
}
if ( teamName == NULL || teamName[0] == 0 )
{
teamName = ingame_text[IGT_YOUR_TEAM];
}
if (postgameMenuInfo.playersTeamWon)
Com_sprintf( buf, sizeof(buf), "%s %s", teamName, ingame_text[IGT_WON]);
else
Com_sprintf( buf, sizeof(buf), "%s %s", teamName, ingame_text[IGT_LOST]);
if (postgameMenuInfo.playerGameRank == 2)
Com_sprintf( buf, sizeof(buf), "%s", ingame_text[IGT_TEAMS_TIED]);
UI_DrawProportionalString( 14, AWARD_Y, buf, UI_BIGFONT|UI_LEFT, white );
}
}*/
// PHASES I & II & III
// Draw Character / Team names by podiums
//-----------------------------------------------
@ -2111,9 +1595,9 @@ static qboolean AW_Draw( void )
// THE TOP BAR
y=130;
if (cgs.gametype == GT_CTF)
Com_sprintf( buf, sizeof(buf), ingame_text[IGT_GAME_CAPTUREFLAG] );
Com_sprintf( buf, sizeof(buf), "%s", ingame_text[IGT_GAME_CAPTUREFLAG] );
else
Com_sprintf( buf, sizeof(buf), ingame_text[IGT_GAME_TEAMHOLOMATCH] );
Com_sprintf( buf, sizeof(buf), "%s", ingame_text[IGT_GAME_TEAMHOLOMATCH] );
len = UI_ProportionalStringWidth( buf, UI_SMALLFONT );
trap_R_SetColor( colorTable[CT_DKORANGE] );
@ -2538,7 +2022,7 @@ void AW_SPPostgameMenu_f( void ) {
postgameMenuInfo.winnerSound = trap_S_RegisterSound( va( "sound/voice/computer/misc/%s_wins.wav", skin ) );
if (0 == postgameMenuInfo.winnerSound)
{
postgameMenuInfo.winnerSound = trap_S_RegisterSound( va( "sound/voice/computer/misc/progcomp.wav", skin ) );
postgameMenuInfo.winnerSound = trap_S_RegisterSound( va( "%s", "sound/voice/computer/misc/progcomp.wav" ) );
}
postgameMenuInfo.winnerDelay = 2500;
if (1 == playerGameRank || postgameMenuInfo.playerTied==2)

View file

@ -24,5 +24,5 @@ extern screenFX_t theScreenFX;
void CG_AddFullScreenEffect(int screenfx, int clientNum);
void CG_DrawFullScreenFX();
void CG_DrawFullScreenFX(void);

View file

@ -813,7 +813,7 @@ static void CG_ServerCommand( void ) {
//TiM - client received a command from a turbolift ent
//Show the decks UI
if ( !strcmp( cmd, "lift" ) ) {
trap_SendConsoleCommand( va( "ui_turbolift %i", CG_Argv( 1 ) ) );
trap_SendConsoleCommand( va( "ui_turbolift %s", CG_Argv( 1 ) ) );
return;
}
@ -896,13 +896,13 @@ static void CG_ServerCommand( void ) {
}
if(!strcmp(cmd, "ui_holodeck")) {
trap_SendClientCommand(va("ui_holodeck %i", CG_Argv(1)));
trap_SendClientCommand(va("ui_holodeck %s", CG_Argv(1)));
return;
}
/* TODO remove me? */
if(!strcmp(cmd, "sqlkey")) {
trap_SendClientCommand(va("sqlkey %i", CG_Argv(1)));
trap_SendClientCommand(va("sqlkey %s", CG_Argv(1)));
return;
}

View file

@ -981,7 +981,6 @@ void CG_CoffeeSteamThirdPerson ( refEntity_t* parent, weaponInfo_t *weapon) {
void CG_CoffeeSteam( refEntity_t* parent, weaponInfo_t *weapon, qboolean thirdperson ) {
refEntity_t steam;
localEntity_t *le;
vec3_t angle = { 0.0, 0.0, 10.0 };
@ -1002,7 +1001,7 @@ void CG_CoffeeSteam( refEntity_t* parent, weaponInfo_t *weapon, qboolean thirdpe
parent->renderfx &= ~RF_DEPTHHACK;
if (cg.time % 10 == 0 ) { //release a sprite every .01 of a second
le = FX_AddSprite( steam.origin,
FX_AddSprite( steam.origin,
angle, qfalse,
( thirdperson ? random() * 1.2 + 0.5 : random() * 1 + 1), ( thirdperson ? 7 : 10), //random() * 4 + 2 //12
0.05 + random() * 0.1, 0.0,
@ -1618,7 +1617,7 @@ void CG_DrawWeaponSelect( void ) {
int i, rowCount, cellCount;
int bits;
//int count;
int x, y, w, defaultX, defaultY;
int x, y, defaultX, defaultY;
char *name;
float *color;
qboolean WeapOnThisRow = qfalse;
@ -1694,7 +1693,7 @@ void CG_DrawWeaponSelect( void ) {
if ( cg_weapons[ cg.weaponSelect ].item ) {
name = cg_weapons[ cg.weaponSelect ].item->pickup_name;
if ( name ) {
w= UI_ProportionalStringWidth(name,UI_SMALLFONT);
UI_ProportionalStringWidth(name,UI_SMALLFONT);
UI_DrawProportionalString(x, y, name, UI_SMALLFONT,color);
}
@ -2353,29 +2352,14 @@ extern qboolean PM_PlayerCrouching ( int legsAnim );
qboolean CG_CalcMuzzlePoint( centity_t *cent, vec3_t muzzle, qboolean isDecoy ) {
vec3_t forward;
//centity_t *cent;
int anim;
/*if ( entityNum == cg.snap->ps.clientNum && !isDecoy ) {
VectorCopy( cg.snap->ps.origin, muzzle );
muzzle[2] += cg.snap->ps.viewheight;
AngleVectors( cg.snap->ps.viewangles, forward, NULL, NULL );
VectorMA( muzzle, 14, forward, muzzle );
return qtrue;
}*/
//cent = &cg_entities[entityNum];
if ( !cent->currentValid ) {
return qfalse;
}
//if ( !isDecoy )
VectorCopy( cent->currentState.pos.trBase, muzzle );
//else
// VectorCopy( cent->currentState.origin, muzzle );
VectorCopy( cent->currentState.pos.trBase, muzzle );
AngleVectors( cent->currentState.apos.trBase, forward, NULL, NULL );
anim = cent->currentState.legsAnim & ~ANIM_TOGGLEBIT;
if ( PM_PlayerCrouching( cent->currentState.legsAnim ) ) {
muzzle[2] += CROUCH_VIEWHEIGHT;
} else {
@ -2407,7 +2391,7 @@ void CG_SurfaceExplosion( vec3_t origin, vec3_t normal, float radius, float shak
vec3_t direction, new_org;
vec3_t sprayvel, velocity = { 0, 0, 0 };
vec3_t temp_org, temp_vel;
float scale, dscale;
float scale;
int i, numSparks;
//Sparks
@ -2419,7 +2403,6 @@ void CG_SurfaceExplosion( vec3_t origin, vec3_t normal, float radius, float shak
for ( i = 0; i < numSparks; i++ )
{
scale = 0.25f + (random() * 2.0f);
dscale = -scale*0.5;
FXE_Spray( normal, 500, 150, 1.0f, sprayvel);

View file

@ -145,7 +145,7 @@ void FX_CompressionExplosion( vec3_t start, vec3_t origin, vec3_t normal, qboole
vec3_t dir;
vec3_t velocity; //, shot_dir;
vec3_t hitpos;
float scale, dscale;
float scale;
int i, j, numSparks;
weaponInfo_t *weaponInfo = &cg_weapons[WP_6];
float distance;
@ -173,9 +173,8 @@ void FX_CompressionExplosion( vec3_t start, vec3_t origin, vec3_t normal, qboole
for ( i = 0; i < numSparks; i++ )
{
scale = 10.0f + (random() * 1.0f); //.25
dscale = -scale;
//Randomize the direction
//Randomize the direction
for (j = 0; j < 3; j ++ )
{
//if ( j !=5 )

View file

@ -252,7 +252,7 @@ void FX_fxfunc_Explosion( vec3_t start, vec3_t origin, vec3_t normal )
vec3_t velocity;
// vec3_t end;
// trace_t trace;
float scale, dscale;
float scale;
int i, j, numSparks;
//weaponInfo_t *weaponInfo = &cg_weapons[WP_6];
//float scale, dscale;
@ -265,9 +265,8 @@ void FX_fxfunc_Explosion( vec3_t start, vec3_t origin, vec3_t normal )
for ( i = 0; i < numSparks; i++ )
{
scale = 0.25f + (random() * 1.0f);
dscale = -scale;
//Randomize the direction
//Randomize the direction
for (j = 0; j < 3; j ++ )
{
dir[j] = normal[j] + (0.75 * crandom());

View file

@ -15,7 +15,7 @@ TiM: Fixed! An improperly formatted directional vector was being sent. it's al
void FX_HypoSpray( vec3_t origin, vec3_t dir, qboolean red ) // When not red, it'll be blue
{
vec3_t color, vel, accel, angles, work;
vec3_t vel, angles, work;
float scale, dscale;
int i;
localEntity_t *le;
@ -24,14 +24,6 @@ void FX_HypoSpray( vec3_t origin, vec3_t dir, qboolean red ) // When not red, i
for ( i = 0; i < NUM_HYPO_PUFFS; i++ )
{
if ( red )
{
VectorSet( color, 1.0f, random() * 0.4f, random() * 0.4f ); // mostly red
}
else
{
VectorSet( color, random() * 0.5f, random() * 0.5f + 0.5f, 1.0f ); // mostly blue
}
VectorCopy( angles, work );
@ -43,7 +35,6 @@ void FX_HypoSpray( vec3_t origin, vec3_t dir, qboolean red ) // When not red, i
scale = random() * 256.0f + 128.0f;
VectorScale( vel, scale, vel );
VectorScale( vel, random() * -0.3f, accel );
scale = random() * 4.0f + 2.0f;
dscale = random() * 64.0f + 24.0f;

View file

@ -181,11 +181,10 @@ void FX_Detpack(vec3_t origin)
//RPG-X ToDo: Modify force field Code Here
void FX_DrawPortableShield(centity_t *cent)
{
int xaxis, height, posWidth, negWidth, team; // light;
int xaxis, height, posWidth, negWidth; // light;
vec3_t start, end, normal;
//vec4_t RGBA;
float halfHeight;
localEntity_t *le;
qhandle_t shader;
if (cent->currentState.eFlags & EF_NODRAW)
@ -200,107 +199,45 @@ void FX_DrawPortableShield(centity_t *cent)
height = ((cent->currentState.time2 >> 20) & 1023); //16
posWidth = ((cent->currentState.time2 >> 10) & 1023); //8
negWidth = (cent->currentState.time2 & 1023);
team = (cent->currentState.otherEntityNum2);
halfHeight = (float)height * .5;
/*if ( !vert )
{*/
VectorCopy(cent->lerpOrigin, start);
VectorCopy(cent->lerpOrigin, end);
start[2] += halfHeight;
end[2] += halfHeight;
VectorCopy(cent->lerpOrigin, start);
VectorCopy(cent->lerpOrigin, end);
start[2] += halfHeight;
end[2] += halfHeight;
VectorClear(normal);
if (xaxis) // drawing along x-axis
{
start[0] -= negWidth;
end[0] += posWidth;
normal[1] = 1;
}
else
{
start[1] -= negWidth;
end[1] += posWidth;
normal[0] = 1;
}
//}
//else
//{
// VectorCopy(cent->lerpOrigin, start);
// VectorCopy(cent->lerpOrigin, end);
// if ( xaxis ) {
// start[1] += halfHeight;
// end[1] += halfHeight;
// }
// else
// {
// start[0] += halfHeight;
// end[0] += halfHeight;
// }
// VectorClear(normal);
// if (xaxis) // drawing along x-axis
// {
// start[0] -= negWidth;
// end[0] += posWidth;
// normal[2] = 1;
// }
// else
// {
// start[1] -= negWidth;
// end[1] += posWidth;
// normal[2] = 1;
// }
//}
// draw a rectangle o' shieldness
/*
if (team == TEAM_RED)
VectorClear(normal);
if (xaxis) // drawing along x-axis
{
if (cent->currentState.eFlags & EF_ITEMPLACEHOLDER)
{ // Damaged.
shader = cgs.media.shieldDamageShaderRed;
}
else
{
shader = cgs.media.shieldActivateShaderRed;
}
start[0] -= negWidth;
end[0] += posWidth;
normal[1] = 1;
}
else
{*/
{
start[1] -= negWidth;
end[1] += posWidth;
normal[0] = 1;
}
//TiM - Show the forcefield when the place flag is active only
//This way, we canhave it flare on events, and invisible the rest of the time
//TiM - Show the forcefield when the place flag is active only
//This way, we canhave it flare on events, and invisible the rest of the time
//tho make sure admins can see it
if((int)cent->currentState.origin2[0] == 1) {
shader = cgs.media.shieldActivateShaderBorg;
}
else if((int)cent->currentState.origin2[0] == 2) {
shader = cgs.media.shieldActivateShaderYellow;
}
else if((int)cent->currentState.origin2[0] == 3) {
shader = cgs.media.shieldActivateShaderRed;
}
else {
shader = cgs.media.shieldActivateShaderBlue;
}
if ( cent->currentState.eFlags & EF_ITEMPLACEHOLDER || cgs.clientinfo[cg.snap->ps.clientNum].isAdmin/*cg.snap->ps.persistant[PERS_CLASS] == PC_ADMIN*/ )
le = FX_AddOrientedLine(start, end, normal, 1.0f, height, 0.0f, 1.0f, 1.0f, 50.0, shader);
//TiM
//if (cent->currentState.eFlags & EF_ITEMPLACEHOLDER)
//{ // Damaged.
// shader = cgs.media.shieldDamageShaderBlue;
//}
//else
//{
// shader = cgs.media.shieldActivateShaderBlue;
//}
//-
// }
//le = FX_AddOrientedLine(start, end, normal, 1.0f, height, 0.0f, 1.0f, 1.0f, 50.0, shader);
// le->leFlags |= LEF_ONE_FRAME;
//tho make sure admins can see it
if((int)cent->currentState.origin2[0] == 1) {
shader = cgs.media.shieldActivateShaderBorg;
}
else if((int)cent->currentState.origin2[0] == 2) {
shader = cgs.media.shieldActivateShaderYellow;
}
else if((int)cent->currentState.origin2[0] == 3) {
shader = cgs.media.shieldActivateShaderRed;
}
else {
shader = cgs.media.shieldActivateShaderBlue;
}
if ( cent->currentState.eFlags & EF_ITEMPLACEHOLDER || cgs.clientinfo[cg.snap->ps.clientNum].isAdmin/*cg.snap->ps.persistant[PERS_CLASS] == PC_ADMIN*/ )
FX_AddOrientedLine(start, end, normal, 1.0f, height, 0.0f, 1.0f, 1.0f, 50.0, shader);
}

View file

@ -13,11 +13,9 @@ void FX_TetrionShot( vec3_t start, vec3_t forward ) // TODO check whether I'm ne
vec3_t end, dir, new_start, new_end, radial, start2, spreadFwd;
float off, len, i, numBullets = 3;
float firingRadius = 6, minDeviation = 0.95, maxDeviation = 1.1;
qboolean render_impact = qtrue;
for (i = 0; i < numBullets; i++)
{
render_impact = qtrue;
// determine new firing position
fxRandCircumferencePos(start, forward, firingRadius, new_start);
VectorSubtract(new_start, start, radial);
@ -43,14 +41,5 @@ void FX_TetrionShot( vec3_t start, vec3_t forward ) // TODO check whether I'm ne
FX_AddLine( new_end, new_start, 1.0f, 1.5f + random(), 0.0f, flrandom(0.3,0.6), 0.0,
flrandom(300,500), cgs.media.borgFlareShader );
}
// put the impact effect where this tracer hits
if (len >= 32)
{
// Rendering things like impacts when hitting a sky box would look bad, but you still want to see the tracer
if ( trace.surfaceFlags & SURF_NOIMPACT )
{
render_impact = qfalse;
}
}
}
}

View file

@ -55,10 +55,10 @@ static int Refent_GetType(lua_State *L) {
}
static int Refent_SetType(lua_State *L) {
rent_t *rent;
//rent_t *rent;
refEntityType_t type;
rent = Lua_GetRent(L, 1);
//rent = Lua_GetRent(L, 1);
type = (refEntityType_t)((int)luaL_checknumber(L, 2));
if(type < 0 || type >= RT_MAX_REF_ENTITY_TYPE)

View file

@ -1280,8 +1280,8 @@ qboolean LuaHook_G_EntityReached(char *function, int entnum);
qboolean LuaHook_G_EntityReachedAngular(char *function, int entnum);
void G_LuaStatus(gentity_t * ent);
qboolean G_LuaInit();
void G_LuaShutdown();
qboolean G_LuaInit(void);
void G_LuaShutdown(void);
extern vmCvar_t g_debugLua;
extern vmCvar_t lua_allowedModules;

View file

@ -54,7 +54,7 @@ typedef struct list_iter * list_iter_p;
/* Create a linked_list object. This pointer is created on the heap and must be
cleared with a call to destroy_list to avoid memory leaks */
list_p create_list();
list_p create_list(void);
/* Create a list_iter object for the linked_list list. The flag init can be
either FRONT or BACK and indicates whether to start the iterator from the first

View file

@ -653,7 +653,7 @@ void Parse1DMatrix (char **buf_p, int x, float *m);
void Parse2DMatrix (char **buf_p, int y, int x, float *m);
void Parse3DMatrix (char **buf_p, int z, int y, int x, float *m);
void QDECL Com_sprintf (char *dest, int size, const char *fmt, ...);
void QDECL Com_sprintf (char *dest, int size, const char *fmt, ...) __attribute__ ((format (printf, 3, 4)));
// mode parm for FS_FOpenFile
@ -724,7 +724,7 @@ float LittleFloat (float l);
void Swap_Init (void);
char * QDECL va(char *format, ...);
char * QDECL va(char *format, ...) __attribute__ ((format (printf, 1, 2)));
//=============================================
@ -740,8 +740,8 @@ qboolean Info_Validate( const char *s );
void Info_NextPair( const char **s, char key[MAX_INFO_KEY], char value[MAX_INFO_VALUE] );
// this is only here so the functions in q_shared.c and bg_*.c can link
void QDECL Com_Error( int errlevel, const char *error, ... );
void QDECL Com_Printf( const char *msg, ... );
void QDECL Com_Error( int errlevel, const char *error, ... ) __attribute__ ((format(printf, 2, 3)));
void QDECL Com_Printf( const char *msg, ... ) __attribute__ ((format (printf, 1, 2)));
/*