Sync with rpgxEF repo ...

How long will we keep syncing these back?
This commit is contained in:
Walter Julius 'GSIO01' Hennecke 2012-09-10 21:29:23 +02:00
parent 350a734c14
commit 6bde5fb79e
63 changed files with 280 additions and 2648 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

@ -315,9 +315,8 @@ BotVisibleEnemies
==================
*/
int BotVisibleEnemies(bot_state_t *bs) {
float vis, dist;
float vis;
int i;
vec3_t dir;
aas_entityinfo_t entinfo;
for (i = 0; i < MAX_CLIENTS; i++) {
@ -333,9 +332,7 @@ int BotVisibleEnemies(bot_state_t *bs) {
if (EntityIsInvisible(&entinfo) && !EntityIsShooting(&entinfo)) {
continue;
}
//calculate the distance towards the enemy
VectorSubtract(entinfo.origin, bs->origin, dir);
dist = VectorLength(dir);
//if on the same team
if (BotSameTeam(bs, i)) continue;
//check if the enemy is visible
@ -895,9 +892,6 @@ BotChatTime
==================
*/
float BotChatTime(bot_state_t *bs) {
int cpm;
cpm = 4000;
return 4000;
}

View file

@ -893,14 +893,12 @@ void BotMatch_CheckPoint(bot_state_t *bs, bot_match_t *match) {
char buf[MAX_MESSAGE_SIZE];
vec3_t position;
bot_waypoint_t *cp;
int i;
if (!TeamPlayIsOn()) return;
//
trap_BotMatchVariable(match, POSITION, buf, MAX_MESSAGE_SIZE);
VectorClear(position);
//BotGPSToPosition(buf, position);
i = sscanf(buf, "%f %f %f", &position[0], &position[1], &position[2]);
position[2] += 0.5;
areanum = BotPointAreaNum(position);
if (!areanum) {
@ -1181,7 +1179,7 @@ BotMatch_WhereAreYou
*/
void BotMatch_WhereAreYou(bot_state_t *bs, bot_match_t *match) {
float dist, bestdist;
int i, bestitem, redflagtt, blueflagtt, redtobluett;
int i, bestitem, redflagtt, blueflagtt;
bot_goal_t goal;
char *nearbyitems[] = {
"Phaser Compression Rifle",
@ -1222,7 +1220,6 @@ void BotMatch_WhereAreYou(bot_state_t *bs, bot_match_t *match) {
if (gametype == GT_CTF) {
redflagtt = trap_AAS_AreaTravelTimeToGoalArea(bs->areanum, bs->origin, ctf_redflag.areanum, TFL_DEFAULT);
blueflagtt = trap_AAS_AreaTravelTimeToGoalArea(bs->areanum, bs->origin, ctf_blueflag.areanum, TFL_DEFAULT);
redtobluett = trap_AAS_AreaTravelTimeToGoalArea(ctf_redflag.areanum, ctf_redflag.origin, ctf_blueflag.areanum, TFL_DEFAULT);
if (redflagtt < (redflagtt + blueflagtt) * 0.4) {
BotAI_BotInitialChat(bs, "ctflocation", nearbyitems[bestitem], "red", NULL);
}

View file

@ -65,7 +65,7 @@ void BotDumpNodeSwitches(bot_state_t *bs) {
ClientName(bs->client, netname, sizeof(netname));
BotAI_Print(PRT_MESSAGE, "%s at %1.1f switched more than %d AI nodes\n", netname, trap_AAS_Time(), MAX_NODESWITCHES);
for (i = 0; i < numnodeswitches; i++) {
BotAI_Print(PRT_MESSAGE, nodeswitch[i]);
BotAI_Print(PRT_MESSAGE, "%s", nodeswitch[i]);
}
BotAI_Print(PRT_FATAL, "");
}

View file

@ -640,7 +640,7 @@ BotShouldDetonateDetPack
qboolean BotShouldDetonateDetPack(bot_state_t *bs)
{
int botNum = 0, detWeight = 0;
vec3_t packOrg, dir;
vec3_t packOrg = { 0.0f, 0.0f, 0.0f }, dir;
float dist;
aas_entityinfo_t botinfo;
@ -1014,7 +1014,6 @@ BotCanAndWantsToRocketJump
==================
*/
int BotCanAndWantsToRocketJump(bot_state_t *bs) {
float rocketjumper;
//if rocket jumping is disabled
if (!bot_rocketjump.integer) return qfalse;
@ -1048,7 +1047,6 @@ int BotCanAndWantsToRocketJump(bot_state_t *bs) {
}
}
}
rocketjumper = 1;
return qtrue;
}
@ -1084,8 +1082,6 @@ BotWantsToCamp
==================
*/
int BotWantsToCamp(bot_state_t *bs) {
float camper;
camper = 0;
return qfalse;
}

View file

@ -217,7 +217,7 @@ int NumBots(void);
void BotEntityInfo(int entnum, aas_entityinfo_t *info);
// from the game source
void QDECL BotAI_Print(int type, char *fmt, ...);
void QDECL BotAI_Print(int type, char *fmt, ...) __attribute__ ((format (printf, 2, 3)));
void QDECL QDECL BotAI_BotInitialChat( bot_state_t *bs, char *type, ... );
void BotAI_Trace(bsp_trace_t *bsptrace, vec3_t start, vec3_t mins, vec3_t maxs, vec3_t end, int passent, int contentmask);
int BotAI_GetClientState( int clientNum, playerState_t *state );

View file

@ -1467,7 +1467,7 @@ void ShieldTouch(gentity_t *self, gentity_t *other, trace_t *trace)
void CreateShield(gentity_t *ent)
{
trace_t tr;
vec3_t mins, maxs, end, posTraceEnd, negTraceEnd, start;
vec3_t end, posTraceEnd, negTraceEnd, start;
int height, posWidth, negWidth, halfWidth = 0;
qboolean xaxis;
int paramData = 0;
@ -1481,8 +1481,6 @@ void CreateShield(gentity_t *ent)
height = (int)(MAX_SHIELD_HEIGHT * tr.fraction);
// use angles to find the proper axis along which to align the shield
VectorSet(mins, -SHIELD_HALFTHICKNESS, -SHIELD_HALFTHICKNESS, 0);
VectorSet(maxs, SHIELD_HALFTHICKNESS, SHIELD_HALFTHICKNESS, height);
VectorCopy(ent->r.currentOrigin, posTraceEnd);
VectorCopy(ent->r.currentOrigin, negTraceEnd);
@ -1536,15 +1534,6 @@ void CreateShield(gentity_t *ent)
}
ent->clipmask = MASK_SHOT;
// scanable forcefield
/*if(rpg_scannableForceField.integer) {
VectorCopy(maxs, ent->s.origin2);
VectorCopy(mins, ent->s.angles2);
trap_LinkEntity(ent);
}*/
// Information for shield rendering.
// xaxis - 1 bit
// height - 0-254 8 bits //10
// posWidth - 0-255 8 bits //10
@ -2415,7 +2404,7 @@ void ClientEvents( gentity_t *ent, int oldEventSequence ) {
//VectorCopy(ps->origin, TransDat[ps->clientNum].pTransCoord);
//VectorCopy(ps->viewangles, TransDat[ps->clientNum].pTransCoordRot);
//TransDat[ps->clientNum].pUsed = qtrue;
trap_SendServerCommand( ent-g_entities, va("chat \"Site to Site Transporter Location Confirmed.\nPress again to Energize.\"", Q_COLOR_ESCAPE));
trap_SendServerCommand( ent-g_entities, va("chat \"Site to Site Transporter Location Confirmed.\nPress again to Energize.\""));
//trap_SendConsoleCommand( EXEC_APPEND, va("echo Site to Site Transporter Location Confirmed.\necho Press again to Energize.") );
ps->stats[STAT_HOLDABLE_ITEM] = BG_FindItemForHoldable( HI_TRANSPORTER ) - bg_itemlist;
ps->stats[STAT_USEABLE_PLACED] = 2; // = 1
@ -2430,7 +2419,7 @@ void ClientEvents( gentity_t *ent, int oldEventSequence ) {
memset( &TransDat[ps->clientNum].storedCoord[TPT_PORTABLE], 0, sizeof( TransDat[ps->clientNum].storedCoord[TPT_PORTABLE]) );
}
else {
trap_SendServerCommand( ent-g_entities, va("chat \"Unable to comply. Already within transport cycle.\"", Q_COLOR_ESCAPE));
trap_SendServerCommand( ent-g_entities, va("chat \"Unable to comply. Already within transport cycle.\""));
}
ps->stats[STAT_USEABLE_PLACED] = 0;
@ -2639,7 +2628,6 @@ ClientThink
void ClientThink_real( gentity_t *ent ) {
gclient_t *client;
pmove_t pm;
vec3_t oldOrigin;
int oldEventSequence;
int msec;
usercmd_t *ucmd;
@ -2889,12 +2877,10 @@ void ClientThink_real( gentity_t *ent ) {
//pm.admin = IsAdmin(ent); // we use this way now the old way didn't work for adminlogin
// y call a function though???
pm.admin = g_classData[client->sess.sessionClass].isAdmin || client->LoggedAsAdmin;
pm.admin = (qboolean)(g_classData[client->sess.sessionClass].isAdmin || client->LoggedAsAdmin);
//pm.admin = g_classData[client->sess.sessionClass].isAdmin;
pm.medic = g_classData[client->sess.sessionClass].isMedical;
pm.borg = g_classData[client->sess.sessionClass].isBorg;
VectorCopy( ps->origin, oldOrigin );
pm.medic = (qboolean)g_classData[client->sess.sessionClass].isMedical;
pm.borg = (qboolean)g_classData[client->sess.sessionClass].isBorg;
// perform a pmove
Pmove (&pm);
@ -3110,7 +3096,6 @@ ClientEndFrame
*/
void ClientEndFrame( gentity_t *ent ) {
int i;
clientPersistant_t *pers;
playerState_t *ps = &ent->client->ps;
if ( ent->client->sess.sessionTeam == TEAM_SPECTATOR /*|| (ps->eFlags&EF_ELIMINATED)*/ ) {
@ -3119,8 +3104,6 @@ void ClientEndFrame( gentity_t *ent ) {
return;
}
pers = &ent->client->pers;
// turn off any expired powerups
for ( i = 0 ; i < MAX_POWERUPS ; i++ ) {
if ( ps->powerups[ i ] < level.time ) {

View file

@ -1,10 +1,11 @@
#ifndef _G_CIN_H_
#define _G_CIN_H_
#include "g_local.h"
// g_cinematic.h
#ifndef _G_CINEMATIC_H
#define _G_CINEMATIC_H
void Cinematic_ActivateCameraMode(gentity_t *ent, gentity_t *target);
void Cinematic_DeactivateCameraMode(gentity_t *ent);
void Cinematic_ActivateGlobalCameraMode(gentity_t *target);
void Cinematic_DeactivateGlobalCameraMode(void);
#endif //_G_CIN_H_
#endif // _G_CINEMATIC_H

View file

@ -964,16 +964,12 @@ ClientUserInfoChanged
void ClientUserinfoChanged( int clientNum ) {
gentity_t *ent;
int i;
char *s; //, *oldModel;
char *s;
char model[MAX_QPATH];
char oldname[MAX_STRING_CHARS];
gclient_t *client;
char *c1;
char userinfo[MAX_INFO_STRING];
qboolean reset;
//char *sex;
// int pickborg = 0;
char *borgytype;
float weight, height;
char age[MAX_NAME_LENGTH];
char race[MAX_NAME_LENGTH];
@ -981,12 +977,9 @@ void ClientUserinfoChanged( int clientNum ) {
qboolean changeName = qtrue; //TiM : For the name filter
char sHeight[10];
char sWeight[10];
//int silentCloak;
clientPersistant_t *pers;
clientSession_t *sess;
borgytype = "borg";
model[0] = 0;
ent = g_entities + clientNum;
@ -1201,9 +1194,6 @@ void ClientUserinfoChanged( int clientNum ) {
client->noAdminChat = qfalse;
}
// colors
c1 = Info_ValueForKey( userinfo, "color" );
// teamInfo
s = Info_ValueForKey( userinfo, "teamoverlay" );
if ( ! *s || atoi( s ) != 0 ) {
@ -1590,7 +1580,7 @@ void transTent_think(gentity_t *ent) {
if(!temp[0])
Com_sprintf(temp, sizeof(temp), "a%i\\%s\\", i, mapChangeData.name[i]);
else
Com_sprintf(temp, sizeof(temp), "%sa%i\\%s\\", i, mapChangeData.name[i]);
Com_sprintf(temp, sizeof(temp), "%sa%i\\%s\\", temp, i, mapChangeData.name[i]);
}
trap_SendServerCommand(ent-g_entities, va("ui_trdata \"%s\"", temp));

View file

@ -1114,7 +1114,6 @@ static void Cmd_Class_f( gentity_t *ent ) {
int j;
char send[100];
gentity_t *other;
qboolean check = qtrue;
char *className;
gclient_t *client;
clientSession_t *sess;
@ -1157,7 +1156,6 @@ static void Cmd_Class_f( gentity_t *ent ) {
if ( trap_Argc() == 1 )
{
className = g_classData[sess->sessionClass].formalName;
check = qfalse;
trap_SendServerCommand( ent-g_entities, va( "print \"\nCurrent Class: %s\nUsage: Changes the user to a different class\nCommand: Class <Class Name>\n\nType '/classlist' into the console for a more complete list\n\"", className ) );
return;
@ -2063,15 +2061,12 @@ Cmd_ForceName_f
*/
void Cmd_ForceName_f( gentity_t *ent ) {
gclient_t *cl;
gclient_t *client;
gentity_t *other;
gentity_t *sayA;
int j;
char send[100];
char str[MAX_TOKEN_CHARS];
char *str2;
//char str2[MAX_TOKEN_CHARS];
//char userinfo[MAX_INFO_STRING];
char clientCmd[MAX_INFO_STRING];
#ifndef SQL
@ -2099,7 +2094,6 @@ void Cmd_ForceName_f( gentity_t *ent ) {
return;
}
other = g_entities + cl->ps.clientNum;
client = other->client;
//Get there new name
str2 = ConcatArgs( 2 );
@ -2341,7 +2335,7 @@ void Cmd_ForceKill_f( gentity_t *ent ) {
int targetNum;
int j, p;
char send[80];
gentity_t *target;
gentity_t *target = NULL;
gentity_t *other;
char arg[MAX_TOKEN_CHARS];
playerState_t *ps;
@ -2498,7 +2492,7 @@ void Cmd_ForceKillRadius_f( gentity_t *ent)
if( ( rpg_forcekillradiuswaittime.integer - (level.time - LastFKRadius[clientNum]) > 0) )
{
//Send message to client informing them so they can't flood.
trap_SendServerCommand( clientNum, va("cp \"Cannot use Force Kill Radius Command for %d seconds", ( rpg_forcekillradiuswaittime.integer - (level.time - LastFKRadius[clientNum]) ) * 0.001 )); // GSIO was / 1000
trap_SendServerCommand( clientNum, va("cp \"Cannot use Force Kill Radius Command for %d seconds", (int)(( rpg_forcekillradiuswaittime.integer - (level.time - LastFKRadius[clientNum]) ) * 0.001 ))); // GSIO was / 1000
return;
}
@ -2884,7 +2878,7 @@ DragCheck (RPG-X: J2J)
=================
*/
//This is used internally and run every frame to check for clients that need to be draged by someone.
void DragCheck()
void DragCheck(void)
{
gentity_t *ent = NULL;
gentity_t *target = NULL;
@ -2953,7 +2947,6 @@ void Cmd_disarm_f( gentity_t *ent)
gentity_t *tripwire = NULL;
int foundTripWires[MAX_GENTITIES] = {ENTITYNUM_NONE};
int tripcount = 0;
int mineornot;
int i;
char arg[MAX_TOKEN_CHARS];
@ -2972,7 +2965,6 @@ void Cmd_disarm_f( gentity_t *ent)
#endif
trap_Argv( 1, arg, sizeof( arg ) );
mineornot = atoi( arg );
if(arg == NULL){ //J2J
//Just mine
@ -3494,7 +3486,7 @@ void Cmd_Revive_f( gentity_t *ent)
G_LogPrintf( "%s revived everyone (%s)\n", pers->netname, pers->ip);
Com_sprintf (send, sizeof(send), "%s revived everyone\n", pers->netname, pla_str);
Com_sprintf (send, sizeof(send), "%s revived everyone\n", pers->netname);
for (j = MAX_CLIENTS - 1; j > -1; j--) { // again j++ to j-- and 1023 to MAX_CLIENTS
if(g_entities[j].client){
@ -6267,7 +6259,7 @@ static void Cmd_alert_f(gentity_t *ent) {
i = 0;
}
else {
G_PrintfClient(ent, "Invalid alert condition %s. Valid conditions: red, blue, yellow, green.\n");
G_PrintfClient(ent, "Invalid alert condition \'%s\'. Valid conditions: red, blue, yellow, green.\n", arg);
return;
}
if(i == 1) {
@ -6472,18 +6464,18 @@ static void Cmd_shiphealth_f(gentity_t *ent) {
RSS = floor((CSS / TSS * 100));
if(CHS == 0){
trap_SendServerCommand( ent-g_entities, va("print \"^4The Ship is destroyed, what do you want?\n\"", RHS, CHS, THS) );
trap_SendServerCommand( ent-g_entities, "print \"^4The Ship is destroyed, what do you want?\n\"" );
} else {
if(SI == 1){
trap_SendServerCommand( ent-g_entities, va("print \"^4Shields are online\n\"", RHS, CHS, THS) );
trap_SendServerCommand( ent-g_entities, "print \"^4Shields are online\n\"" );
trap_SendServerCommand( ent-g_entities, va("print \"^4Shield Capactiy at %i Percent (%i of %i Points)\n\"", RSS, CSS, TSS) );
trap_SendServerCommand( ent-g_entities, va("print \"^4Structual Integrity at %i Percent (%i of %i Points)\n\"", RHS, CHS, THS) );
} else if(SI == 0){
trap_SendServerCommand( ent-g_entities, va("print \"^4Shields are offline\n\"", RHS, CHS, THS) );
trap_SendServerCommand( ent-g_entities, "print \"^4Shields are offline\n\"" );
trap_SendServerCommand( ent-g_entities, va("print \"^4Shield Capactiy at %i Percent (%i of %i Points)\n\"", RSS, CSS, TSS) );
trap_SendServerCommand( ent-g_entities, va("print \"^4Structual Integrity at %i Percent (%i of %i Points)\n\"", RHS, CHS, THS) );
} else {
trap_SendServerCommand( ent-g_entities, va("print \"^4Shields are inoperable\n\"", RHS, CHS, THS) );
trap_SendServerCommand( ent-g_entities, "print \"^4Shields are inoperable\n\"" );
trap_SendServerCommand( ent-g_entities, va("print \"^4Structual Integrity at %i Percent (%i of %i Points)\n\"", RHS, CHS, THS) );
}
}

View file

@ -384,7 +384,7 @@ void player_die( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int
if (rpg_kickAfterXkills.integer < 1)
{
trap_SendServerCommand( attacker-g_entities, va("print \"^7Server: You have been caught n00bing, you have been temporary put in the n00b class.\n\"", (rpg_kickAfterXkills.integer - attacker->n00bCount) ) );
trap_SendServerCommand( attacker-g_entities, va("print \"^7Server: You have been caught n00bing, you have been temporary put in the n00b class.\n\"" ) );
} else {
trap_SendServerCommand( attacker-g_entities, va("print \"^7Server: You have been caught n00bing, %i more times and you will be kicked.\n\"", (rpg_kickAfterXkills.integer - attacker->n00bCount) ) );
}
@ -409,7 +409,7 @@ void player_die( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int
{
if ( g_classData[i].isn00b) {
char conName[64];
trap_Cvar_VariableStringBuffer( va( "rpg_%sPass" ), conName, sizeof(conName) );
trap_Cvar_VariableStringBuffer( va( "rpg_%sPass", conName ), conName, sizeof(conName) );
Q_strncpyz(attacker->client->origClass, ClassNameForValue( attacker->client->sess.sessionClass ), sizeof(attacker->client->origClass));
attacker->client->n00bTime = level.time + 10000;
@ -1238,7 +1238,6 @@ void G_Damage( gentity_t *targ, gentity_t *inflictor, gentity_t *attacker,
vec3_t dir, vec3_t point, int damage, int dflags, int mod ) {
gclient_t *client;
int take=0;
int save;
// int asave;
int knockback;
qboolean bFriend = (targ && attacker)?OnSameTeam( targ, attacker ):qfalse;
@ -1474,7 +1473,6 @@ void G_Damage( gentity_t *targ, gentity_t *inflictor, gentity_t *attacker,
}
take = damage;
save = 0;
// save some from armor
//RPG-X: - RedTechie No armor in RPG

View file

@ -189,8 +189,6 @@ void steam_link( gentity_t *ent )
{
gentity_t *target = NULL;
vec3_t dir;
float len;
//trace_t *tr;
if (ent->target)
{
@ -209,7 +207,7 @@ void steam_link( gentity_t *ent )
VectorSubtract( target->s.origin, ent->s.origin, dir );
len = VectorNormalize(dir);
VectorNormalize(dir);
VectorCopy(dir, ent->s.angles2);
//vectoangles(dir, ent->s.angles2); //GSIO01: haha funny thing this made steam buggy
VectorShort(ent->s.angles2);
@ -331,7 +329,6 @@ void bolt_link( gentity_t *ent )
{
gentity_t *target = NULL;
vec3_t dir;
float len;
if (ent->target)
{
@ -349,7 +346,7 @@ void bolt_link( gentity_t *ent )
}
VectorSubtract( target->s.origin, ent->s.origin, dir );
len = VectorNormalize( dir );
VectorNormalize( dir );
vectoangles( dir, ent->s.angles );
VectorCopy( target->s.origin, ent->s.origin2 );
@ -1349,7 +1346,6 @@ void forge_bolt_link( gentity_t *ent )
{
gentity_t *target = NULL;
vec3_t dir;
float len;
target = G_Find (target, FOFS(targetname), ent->target);
@ -1364,7 +1360,7 @@ void forge_bolt_link( gentity_t *ent )
}
VectorSubtract( target->s.origin, ent->s.origin, dir );
len = VectorNormalize( dir );
VectorNormalize( dir );
vectoangles( dir, ent->s.angles );
VectorCopy( target->s.origin, ent->s.origin2 );
@ -2087,7 +2083,7 @@ void borg_bolt_link( gentity_t *ent )
if (!target2)
{
Com_Printf("borg_bolt_link: unable to find target2 %s falling back to using ent's origin\n", ent->parent );
Com_Printf("borg_bolt_link: unable to find target2 %s falling back to using ent's origin\n", ent->target );
}
else
{

View file

@ -900,7 +900,7 @@ void FinishSpawningItem( gentity_t *ent ) {
ent->use = Use_Item;
Com_Printf(va("print \"giType %i!\n\"", ent->item->giType));
Com_Printf("print \"giType %i!\n\"", ent->item->giType);
//Commeted out because if statement causes sharing vialation
/*if ( ent->item->giType == IT_TEAM )
{

View file

@ -967,10 +967,10 @@ void SP_fx_spark( gentity_t *ent );
void FindIntermissionPoint( void );
void G_RunThink (gentity_t *ent);
void SendScoreboardMessageToAllClients( void );
void QDECL G_Printf( const char *fmt, ... );
void QDECL G_Error( const char *fmt, ... );
void QDECL G_PrintfClient( gentity_t *ent, const char *fmt, ...);
void QDECL G_PrintfClientAll(const char *fmt, ...);
void QDECL G_Printf( const char *fmt, ... ) __attribute__ ((format (printf, 1, 2)));
void QDECL G_Error( const char *fmt, ... ) __attribute__ ((format (printf, 1, 2)));
void QDECL G_PrintfClient( gentity_t *ent, const char *fmt, ...) __attribute__ ((format (printf, 2, 3)));
void QDECL G_PrintfClientAll(const char *fmt, ...) __attribute__ ((format (printf, 1, 2)));
//
// g_sql.c
@ -1129,7 +1129,7 @@ typedef enum
#define AWARDS_MSG_LENGTH 256
void QDECL G_LogPrintf( const char *fmt, ... );
void QDECL G_LogPrintf( const char *fmt, ... ) __attribute__ ((format (printf, 1, 2)));
void QDECL G_LogWeaponPickup(int client, int weaponid);
void QDECL G_LogWeaponFire(int client, int weaponid);
void QDECL G_LogWeaponDamage(int client, int mod, int amount);
@ -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

@ -1162,6 +1162,9 @@ qboolean CalculateTactician(gentity_t *ent, int *kills)
while( weapon<WP_NUM_WEAPONS && (!wasPickedUpBySomeone[weapon] || killsWithWeapon[weapon]>0) )
{
weapon++;
if(weapon>=WP_NUM_WEAPONS) {
break;
}
nKills+=killsWithWeapon[weapon]; // Update the number of kills
}
//

View file

@ -1204,7 +1204,6 @@ static void G_LoadServerChangeFile(void) {
char *buffer;
int file_len;
char *txtPtr, *token;
char *temp;
int cnt = 0;
int i = 0;
@ -1269,17 +1268,6 @@ static void G_LoadServerChangeFile(void) {
if(cnt > 12) break;
temp = G_NewString(token);
/*if(!infoString[0])
Com_sprintf(infoString, sizeof(infoString), "i%i\\%s\\", cnt, temp);
else {
if(cnt % 2 == 0)
Com_sprintf(infoString, sizeof(infoString), "%si%i\\%s\\", infoString, i, temp);
else
Com_sprintf(infoString, sizeof(infoString), "%sd%i\\%s\\", infoString, i, temp);
}*/
if(cnt % 2 == 0)
Q_strncpyz(srvChangeData.ip[i], token, sizeof(srvChangeData.ip[i]));
else
@ -1309,7 +1297,6 @@ static void G_LoadMapChangeFile(void) {
char *buffer;
int file_len;
char *txtPtr, *token;
char *temp;
int cnt = 0;
int i = 0;
@ -1374,17 +1361,6 @@ static void G_LoadMapChangeFile(void) {
if(cnt > 12) break;
temp = G_NewString(token);
/*if(!infoString[0])
Com_sprintf(infoString, sizeof(infoString), "i%i\\%s\\", cnt, temp);
else {
if(cnt % 2 == 0)
Com_sprintf(infoString, sizeof(infoString), "%si%i\\%s\\", infoString, i, temp);
else
Com_sprintf(infoString, sizeof(infoString), "%sd%i\\%s\\", infoString, i, temp);
}*/
if(cnt % 2 == 0)
Q_strncpyz(mapChangeData.name[i], token, sizeof(mapChangeData.name[i]));
else
@ -1474,7 +1450,7 @@ static void G_LoadLocationsFile( void )
token = COM_Parse( &textPtr );
if ( Q_strncmp( token, "{", 1 ) != 0 )
{
G_Printf( S_COLOR_RED "ERROR: LocationsList2 had no opening brace ( { )!\n", fileRoute );
G_Printf( S_COLOR_RED "ERROR: LocationsList2 had no opening brace ( { )!\n" );
continue;
}
@ -1559,7 +1535,7 @@ static void G_LoadLocationsFile( void )
token = COM_Parse( &textPtr );
if ( Q_strncmp( token, "{", 1 ) != 0 )
{
G_Printf( S_COLOR_RED "ERROR: LocationsList had no opening brace ( { )!\n", fileRoute );
G_Printf( S_COLOR_RED "ERROR: LocationsList had no opening brace ( { )!\n" );
continue;
}
@ -1717,7 +1693,7 @@ char *G_searchGroupList(const char *name)
}
else
{
Com_sprintf(races, sizeof(races), text_p);
Com_sprintf(races, sizeof(races), "%s", text_p);
}
return races;
@ -1898,9 +1874,7 @@ extern int LastFKRadius[]; //(RPG-X J2J) added so array can be initialised t
extern RPGX_SiteTOSiteData TransDat[]; //(RPG-X J2J) added for tricorder transporter
extern RPGX_DragData DragDat[];
void G_InitGame( int levelTime, int randomSeed, int restart ) {
int i;//,j;
//vec3_t Zero = {0.0,0.0,0.0}; //RPG-X J2J //TiM - use vec3_origin instead
gentity_t* SpawnPnt; //RPG-X J2J
int i;
char fileName[MAX_QPATH];
float messageTime;
@ -2077,7 +2051,6 @@ void G_InitGame( int levelTime, int randomSeed, int restart ) {
/*RPG-X J2J************************************************************************************/
G_Printf ("Initializing RPG-X Globals...");
SpawnPnt = SelectRandomSpawnPoint(); //Grab a random spawn point.
//TiM : Reset teh recon system on game init.
//Leave this out for now to make this data persistant.
@ -2657,7 +2630,7 @@ void FindIntermissionPoint( void ) {
ClearFiringFlags
==================
*/
void ClearFiringFlags()
void ClearFiringFlags(void)
{
int i = 0;
gentity_t *ent = NULL;
@ -2956,119 +2929,13 @@ void CheckTournement( void ) {
}
if ( g_gametype.integer == GT_TOURNAMENT ) {
// pull in a spectator if needed
//RPG-X: RedTechie - pulling on people isnt nice
/*if ( level.numPlayingClients < 2 ) {
AddTournamentPlayer();
}*/
// if we don't have two players, go back to "waiting for players"
//RPG-X: RedTechie - No warmup!
/*if ( level.numPlayingClients != 2 ) {
if ( level.warmupTime != -1 ) {
level.warmupTime = -1;
trap_SetConfigstring( CS_WARMUP, va("%i", level.warmupTime) );
G_LogPrintf( "Warmup:\n" );
}
return;
}*/
if ( level.warmupTime == 0 || level.warmupTime != 0) {//RPG-X: RedTechie - No warmup Fail safe
return;
}
// if the warmup is changed at the console, restart it
//RPG-X: RedTechie - No warmup!
/*if ( g_warmup.modificationCount != level.warmupModificationCount ) {
level.warmupModificationCount = g_warmup.modificationCount;
level.warmupTime = -1;
}*/
// if all players have arrived, start the countdown
//RPG-X: RedTechie - No warmup!
/*if ( level.warmupTime < 0 )
{
if ( level.numPlayingClients == 2 )
{
if ( g_warmup.integer > 1 )
{
// fudge by -1 to account for extra delays
level.warmupTime = level.time + ( g_warmup.integer - 1 ) * 1000;
trap_SetConfigstring( CS_WARMUP, va("%i", level.warmupTime) );
}
else
{
level.warmupTime = 0;
}
}
return;
}*/
//RPG-X: RedTechie - No warmup!
// if the warmup time has counted down, restart
/*if ( level.time > level.warmupTime ) {
level.warmupTime += 10000;
trap_Cvar_Set( "g_restarted", "1" );
trap_SendConsoleCommand( EXEC_APPEND, "map_restart 0\n" );
level.restarted = qtrue;
return;
}*/
} else if ( g_gametype.integer != GT_SINGLE_PLAYER /*&& g_doWarmup.integer*/ ) { //RPG-X: RedTechie - No warmup!
int counts[TEAM_NUM_TEAMS];
//qboolean notEnough = qfalse;
if ( g_gametype.integer > GT_TEAM ) {
counts[TEAM_BLUE] = TeamCount( -1, TEAM_BLUE );
counts[TEAM_RED] = TeamCount( -1, TEAM_RED );
//RPG-X: RedTechie - Enough players always
/* if (counts[TEAM_RED] < 1 || counts[TEAM_BLUE] < 1) {
notEnough = qtrue;
}
} else if ( level.numPlayingClients < 2 ) {
notEnough = qtrue;
}*/
//RPG-X: RedTechie - No warmup!
/*if ( notEnough ) {
if ( level.warmupTime != -1 ) {
level.warmupTime = -1;
trap_SetConfigstring( CS_WARMUP, va("%i", level.warmupTime) );
G_LogPrintf( "Warmup:\n" );
}
return; // still waiting for team members
}*/
} else if ( g_gametype.integer != GT_SINGLE_PLAYER /*&& g_doWarmup.integer*/ ) { //RPG-X: RedTechie - No warmup!
if ( level.warmupTime == 0) {
return;
}
// if the warmup is changed at the console, restart it
//RPG-X: RedTechie - No warmup!
/*if ( g_warmup.modificationCount != level.warmupModificationCount ) {
level.warmupModificationCount = g_warmup.modificationCount;
level.warmupTime = -1;
}*/
// if all players have arrived, start the countdown
//RPG-X: RedTechie - No warmup!
/*if ( level.warmupTime < 0 ) {
// fudge by -1 to account for extra delays
level.warmupTime = level.time + ( g_warmup.integer - 1 ) * 1000;
trap_SetConfigstring( CS_WARMUP, va("%i", level.warmupTime) );
return;
}*/
// if the warmup time has counted down, restart
//RPG-X: RedTechie - No warmup!
/*if ( level.time > level.warmupTime ) {
level.warmupTime += 10000;
trap_Cvar_Set( "g_restarted", "1" );
trap_SendConsoleCommand( EXEC_APPEND, "map_restart 0\n" );
level.restarted = qtrue;
return;*/
}
}
}
@ -3172,8 +3039,6 @@ void G_RunFrame( int levelTime ) {
gclient_t *client;
playerState_t *ps;
entityState_t *es;
int msec;
int start, end;
// if we are waiting for the level to restart, do nothing
if ( level.restarted ) {
@ -3183,7 +3048,6 @@ int start, end;
level.framenum++;
level.previousTime = level.time;
level.time = levelTime;
msec = level.time - level.previousTime;
// get any cvar changes
G_UpdateCvars();
@ -3191,7 +3055,6 @@ int start, end;
//
// go through all allocated objects
//
start = trap_Milliseconds();
ent = &g_entities[0];
for (i=0 ; i<level.num_entities ; i++, ent++) {
if ( !ent->inuse ) {
@ -3263,9 +3126,7 @@ start = trap_Milliseconds();
G_RunThink( ent );
}
end = trap_Milliseconds();
start = trap_Milliseconds();
// perform final fixups on the players
ent = &g_entities[0];
for (i=0 ; i < level.maxclients ; i++, ent++ ) {
@ -3273,7 +3134,6 @@ start = trap_Milliseconds();
ClientEndFrame( ent );
}
}
end = trap_Milliseconds();
// see if it is time to do a tournement restart
CheckTournement();

View file

@ -153,11 +153,7 @@ G_MissileStick
void G_MissileStick( gentity_t *ent, trace_t *trace )
{
vec3_t org, dir;
gentity_t *tent = NULL;
gentity_t *other = NULL;
gclient_t *client;
client = ent->client;
gentity_t *other = NULL;
other = &g_entities[trace->entityNum];
@ -170,7 +166,7 @@ void G_MissileStick( gentity_t *ent, trace_t *trace )
}
// send client a message to start the grenade a-beepin'
tent = G_TempEntity( ent->r.currentOrigin, EV_GRENADE_SHRAPNEL );
G_TempEntity( ent->r.currentOrigin, EV_GRENADE_SHRAPNEL );
// Back away from the wall
//VectorMA( trace->endpos, 3.5, trace->plane.normal, org );

View file

@ -51,13 +51,12 @@ Called on a reconnect
void G_ReadSessionData( gclient_t *client ) {
char s[MAX_STRING_CHARS];
const char *var;
int i;
int team, spec;
var = va( "session%i", client - level.clients );
trap_Cvar_VariableStringBuffer( var, s, sizeof(s) );
i = sscanf( s, "%i %i %i %i %i %i %i",
sscanf( s, "%i %i %i %i %i %i %i",
&team,
&client->sess.sessionClass,
&client->sess.spectatorTime,

View file

@ -108,10 +108,9 @@ qboolean G_SpawnInt( const char *key, const char *defaultString, int *out ) {
qboolean G_SpawnVector( const char *key, const char *defaultString, float *out ) {
char *s;
qboolean present;
int i;
present = G_SpawnString( key, defaultString, &s );
i = sscanf( s, "%f %f %f", &out[0], &out[1], &out[2] );
sscanf( s, "%f %f %f", &out[0], &out[1], &out[2] );
return present;
}
@ -581,7 +580,6 @@ qboolean G_ParseField( const char *key, const char *value, gentity_t *ent ) {
float v;
vec3_t vec;
vec4_t vec4;
int i;
for ( f=fields ; f->name ; f++ ) {
if ( !Q_stricmp(f->name, key) ) {
@ -593,13 +591,13 @@ qboolean G_ParseField( const char *key, const char *value, gentity_t *ent ) {
*(char **)(b+f->ofs) = G_NewString (value);
break;
case F_VECTOR:
i = sscanf (value, "%f %f %f", &vec[0], &vec[1], &vec[2]);
sscanf (value, "%f %f %f", &vec[0], &vec[1], &vec[2]);
((float *)(b+f->ofs))[0] = vec[0];
((float *)(b+f->ofs))[1] = vec[1];
((float *)(b+f->ofs))[2] = vec[2];
break;
case F_VECTOR4:
i = sscanf (value, "%f %f %f %f", &vec4[0], &vec[1], &vec[2], &vec[3]);
sscanf (value, "%f %f %f %f", &vec4[0], &vec[1], &vec[2], &vec[3]);
((float *)(b+f->ofs))[0] = vec4[0];
((float *)(b+f->ofs))[0] = vec4[1];
((float *)(b+f->ofs))[0] = vec4[2];

View file

@ -299,7 +299,7 @@ static void UpdateIDBans (void)
//}
//When parsed back in, the line breaks will be used to divide it up
Com_sprintf( buffer, sizeof( buffer ), "%i\n{\n\t%ul\n\t\"%s\"\n\t\"%s\"\n}\n\n", i, id->playerID, id->playerName, id->banReason );
Com_sprintf( buffer, sizeof( buffer ), "%i\n{\n\t%lu\n\t\"%s\"\n\t\"%s\"\n}\n\n", i, id->playerID, id->playerName, id->banReason );
trap_FS_Write( buffer, strlen(buffer), f );
}
@ -523,7 +523,7 @@ void Svcmd_FindID_f ( void )
{
G_Printf( "%-4.4s %-16.16s %-45.45s\n", "ID:", "Name:", "Reason:" );
G_Printf( "%-4.4s %-16.16s %-45.45s\n", "----", "-----------------", "-------------------------------------" );
G_Printf( outputBuf );
G_Printf( "%s", outputBuf );
}
}

View file

@ -1681,7 +1681,7 @@ void target_doorLock_use(gentity_t *ent, gentity_t *other, gentity_t* activator)
void SP_target_doorLock(gentity_t *ent) {
char *temp;
if(!ent->target) {
DEVELOPER(G_Printf(S_COLOR_YELLOW "[Entity-Error] target_doorlock at %s without target!\n"););
DEVELOPER(G_Printf(S_COLOR_YELLOW "[Entity-Error] target_doorlock at %s without target!\n", vtos(ent->s.origin)););
G_FreeEntity(ent);
return;
}
@ -2578,7 +2578,7 @@ spawnflags: 1 tells ent to free once aborted
*/
static int target_selfdestruct_get_unsafe_players(gentity_t *ents[MAX_GENTITIES]) {
int i, n, num, cur = 0, cur2 = 0;
list_iter_p iter;
list_iter_p iter = NULL;
safeZone_t* sz;
int entlist[MAX_GENTITIES];
gentity_t *safePlayers[MAX_GENTITIES];
@ -2617,7 +2617,9 @@ static int target_selfdestruct_get_unsafe_players(gentity_t *ents[MAX_GENTITIES]
}
}
free(iter);
if(iter != NULL) {
free(iter);
}
return cur2;
}
@ -2634,7 +2636,7 @@ void target_selfdestruct_use(gentity_t *ent, gentity_t *other, gentity_t *activa
void target_selfdestruct_think(gentity_t *ent) {
gentity_t* client;
double ETAmin, ETAsec, temp;
double ETAmin, ETAsec, temp = 0.0f;
int i = 0;
//now we have 3 destinct stages the entity can think about.
@ -2940,7 +2942,7 @@ falsename: redname for target_alert
*/
static int target_shiphealth_get_unsafe_players(gentity_t *ents[MAX_GENTITIES]) {
int i, n, num, cur = 0, cur2 = 0;
list_iter_p iter;
list_iter_p iter = NULL;
safeZone_t* sz;
int entlist[MAX_GENTITIES];
gentity_t *safePlayers[MAX_GENTITIES];
@ -2979,7 +2981,9 @@ static int target_shiphealth_get_unsafe_players(gentity_t *ents[MAX_GENTITIES])
}
}
free(iter);
if(iter != NULL) {
free(iter);
}
return cur2;
}

View file

@ -77,6 +77,7 @@ const char *TeamColorString(int team) {
}
// NULL for everyone
void QDECL PrintMsg( gentity_t *ent, const char *fmt, ... ) __attribute__ ((format (printf, 2, 3)));
void QDECL PrintMsg( gentity_t *ent, const char *fmt, ... ) {
char msg[1024];
va_list argptr;
@ -84,7 +85,7 @@ void QDECL PrintMsg( gentity_t *ent, const char *fmt, ... ) {
va_start (argptr,fmt);
if (vsprintf (msg, fmt, argptr) > sizeof(msg)) {
G_Error ( "PrintMsg overrun" );
G_Error ( "%s", "PrintMsg overrun" );
}
va_end (argptr);
@ -864,7 +865,6 @@ void TeamplayInfoMessage( gentity_t *ent ) {
gentity_t *player;
int cnt;
//int h, a;
int clients[TEAM_MAXOVERLAY];
//TiM : Send data regardless
/*if ( ! ent->client->pers.teamInfo )
@ -881,7 +881,6 @@ void TeamplayInfoMessage( gentity_t *ent ) {
player = g_entities + level.sortedClients[i];
if (player->inuse && player->client->sess.sessionTeam ==
ent->client->sess.sessionTeam ) {
clients[cnt++] = level.sortedClients[i];
}
}

View file

@ -351,7 +351,6 @@ void turret_aim( gentity_t *self )
vec3_t enemyDir;
vec3_t desiredAngles;
float diffAngle, armAngleDiff, headAngleDiff;
int upTurn = 0;
int yawTurn = 0;
gentity_t *lastEnemy = self->lastEnemy;
@ -430,7 +429,6 @@ void turret_aim( gentity_t *self )
{/* Add the increment */
lastEnemy->lastEnemy->r.currentAngles[0] += (diffAngle < 0) ? -self->speed : self->speed;
}
upTurn = (diffAngle > 0) ? 1 : -1;
}
/* Cap the range */
headAngleDiff = AngleSubtract(self->r.currentAngles[0], lastEnemy->lastEnemy->r.currentAngles[0]);

View file

@ -434,7 +434,7 @@ qboolean G_SetupUsablesStrings( void )
token = COM_Parse( &textPtr );
if ( Q_strncmp( token, "{", 1 ) != 0 )
{
G_Printf( S_COLOR_RED "ERROR: UsableDescriptions had no opening brace ( { )!\n", fileRoute );
G_Printf( S_COLOR_RED "ERROR: UsableDescriptions had no opening brace ( { )!\n" );
continue;
}
@ -453,7 +453,7 @@ qboolean G_SetupUsablesStrings( void )
token = COM_Parse( &textPtr );
if ( Q_strncmp( token, "{", 1 ) )
{
G_Printf( S_COLOR_RED "ERROR: UsableEntities had no opening brace ( { )!\n", fileRoute );
G_Printf( S_COLOR_RED "ERROR: UsableEntities had no opening brace ( { )!\n" );
continue;
}

View file

@ -359,7 +359,7 @@ void G_UseTargets2( gentity_t *ent, gentity_t *activator, char *target ) {
t = NULL;
while ( (t = G_Find (t, FOFS(targetname), target)) != NULL ) {
if ( t == ent ) {
G_Printf (va("WARNING: Entity %i used itself.\n", t->s.number)); /* RPG-X | GSIO01 | 22.10.09: a little bit more information for the mapper */
G_Printf ("WARNING: Entity %i used itself.\n", t->s.number); /* RPG-X | GSIO01 | 22.10.09: a little bit more information for the mapper */
} else {
if ( t->use ) {
t->use (t, ent, activator);
@ -379,7 +379,7 @@ void G_UseTargets2( gentity_t *ent, gentity_t *activator, char *target ) {
}
}
if ( !ent->inuse ) {
G_Printf(va("Entity %i was removed while using targets\n", t->s.number)); /* RPG-X | GSIO01 | 22.10.09: a little bit more information for the mapper */
G_Printf("Entity %i was removed while using targets\n", t->s.number); /* RPG-X | GSIO01 | 22.10.09: a little bit more information for the mapper */
return;
}
}
@ -392,7 +392,7 @@ void G_UseTargets2( gentity_t *ent, gentity_t *activator, char *target ) {
t = NULL;
while ( (t = G_Find (t, FOFS(swapname), target)) != NULL ) {
if ( t == ent ) {
G_Printf (va("WARNING: Entity %i used itself.\n", t->s.number)); /* RPG-X | GSIO01 | 22.10.09: a little bit more information for the mapper */
G_Printf ("WARNING: Entity %i used itself.\n", t->s.number); /* RPG-X | GSIO01 | 22.10.09: a little bit more information for the mapper */
} else {
if ( t->use ) {
t->use (t, ent, activator);
@ -412,7 +412,7 @@ void G_UseTargets2( gentity_t *ent, gentity_t *activator, char *target ) {
}
}
if ( !ent->inuse ) {
G_Printf(va("Entity %i was removed while using targets\n", t->s.number)); /* RPG-X | GSIO01 | 22.10.09: a little bit more information for the mapper */
G_Printf("Entity %i was removed while using targets\n", t->s.number); /* RPG-X | GSIO01 | 22.10.09: a little bit more information for the mapper */
return;
}
}
@ -420,7 +420,7 @@ void G_UseTargets2( gentity_t *ent, gentity_t *activator, char *target ) {
t = NULL;
while ( (t = G_Find (t, FOFS(truename), target)) != NULL ) {
if ( t == ent ) {
G_Printf (va("WARNING: Entity %i used itself.\n", t->s.number)); /* RPG-X | GSIO01 | 22.10.09: a little bit more information for the mapper */
G_Printf ("WARNING: Entity %i used itself.\n", t->s.number); /* RPG-X | GSIO01 | 22.10.09: a little bit more information for the mapper */
} else {
if ( t->use ) {
t->use (t, ent, activator);
@ -440,7 +440,7 @@ void G_UseTargets2( gentity_t *ent, gentity_t *activator, char *target ) {
}
}
if ( !ent->inuse ) {
G_Printf(va("Entity %i was removed while using targets\n", t->s.number)); /* RPG-X | GSIO01 | 22.10.09: a little bit more information for the mapper */
G_Printf("Entity %i was removed while using targets\n", t->s.number); /* RPG-X | GSIO01 | 22.10.09: a little bit more information for the mapper */
return;
}
}
@ -448,7 +448,7 @@ void G_UseTargets2( gentity_t *ent, gentity_t *activator, char *target ) {
t = NULL;
while ( (t = G_Find (t, FOFS(falsename), target)) != NULL ) {
if ( t == ent ) {
G_Printf (va("WARNING: Entity %i used itself.\n", t->s.number)); /* RPG-X | GSIO01 | 22.10.09: a little bit more information for the mapper */
G_Printf ("WARNING: Entity %i used itself.\n", t->s.number); /* RPG-X | GSIO01 | 22.10.09: a little bit more information for the mapper */
} else {
if ( t->use ) {
t->use (t, ent, activator);
@ -468,7 +468,7 @@ void G_UseTargets2( gentity_t *ent, gentity_t *activator, char *target ) {
}
}
if ( !ent->inuse ) {
G_Printf(va("Entity %i was removed while using targets\n", t->s.number)); /* RPG-X | GSIO01 | 22.10.09: a little bit more information for the mapper */
G_Printf("Entity %i was removed while using targets\n", t->s.number); /* RPG-X | GSIO01 | 22.10.09: a little bit more information for the mapper */
return;
}
}
@ -483,7 +483,7 @@ void G_UseTargets2( gentity_t *ent, gentity_t *activator, char *target ) {
t = NULL;
while( (t = G_Find(t, FOFS(bluename), target)) != NULL ) {
if ( t == ent ) {
G_Printf (va("WARNING: Entity %i used itself.\n", t->s.number)); /* RPG-X | GSIO01 | 22.10.09: a little bit more information for the mapper */
G_Printf ("WARNING: Entity %i used itself.\n", t->s.number); /* RPG-X | GSIO01 | 22.10.09: a little bit more information for the mapper */
} else {
if ( t->use ) {
t->use (t, ent, ent);
@ -503,7 +503,7 @@ void G_UseTargets2( gentity_t *ent, gentity_t *activator, char *target ) {
}
}
if ( !ent->inuse ) {
G_Printf(va("Entity %i was removed while using targets\n", t->s.number)); /* RPG-X | GSIO01 | 22.10.09: a little bit more information for the mapper */
G_Printf("Entity %i was removed while using targets\n", t->s.number); /* RPG-X | GSIO01 | 22.10.09: a little bit more information for the mapper */
return;
}
}
@ -733,7 +733,7 @@ gentity_t *G_Spawn( void ) {
}
G_LogPrintf("RPG-X WARNING: Max entities hit! Removed all tripmines. Restart the server ASAP or suffer a server crash!\n");
trap_SendServerCommand( -1, va("print \"^1RPG-X WARNING: Max entities hit! Removed all tripmines. Restart the server ASAP or suffer a server crash!\n\"", i, ENTITYNUM_MAX_NORMAL));
trap_SendServerCommand( -1, "print \"^1RPG-X WARNING: Max entities hit! Removed all tripmines. Restart the server ASAP or suffer a server crash!\n\"");
if ( i == ENTITYNUM_MAX_NORMAL ) {
G_Error( "G_Spawn: no free entities" );
@ -1222,7 +1222,7 @@ gentity_t *G_GetNearestEnt(char *classname, vec3_t origin, float radius, gentity
*/
gentity_t *G_GetNearestPlayer(vec3_t origin, float radius, gentity_t *ignore ) {
gentity_t *entList[MAX_GENTITIES], *nearest = NULL;
int count, i;
int i;
float distance, minDist;
vec3_t dist;
@ -1231,7 +1231,7 @@ gentity_t *G_GetNearestPlayer(vec3_t origin, float radius, gentity_t *ignore ) {
minDist = radius;
count = G_RadiusList(origin, radius, ignore, qtrue, entList);
G_RadiusList(origin, radius, ignore, qtrue, entList);
for(i = 0; i < MAX_CLIENTS; i++) {
if(entList[i]->client) {

View file

@ -211,13 +211,10 @@ static void WP_FirePhaser( gentity_t *ent, qboolean alt_fire )
* Use the ending point of the thin trace to do two more traces,
* one on either side, for actual damaging effect.
*/
vec3_t vUp = {0,0,1}, vRight, start2, end2;
float halfBeamWidth = PHASER_ALT_RADIUS;
vec3_t vUp = {0,0,1}, vRight;
CrossProduct(forward, vUp, vRight);
VectorNormalize(vRight);
VectorMA(muzzle, halfBeamWidth, vRight, start2);
VectorMA(end, halfBeamWidth, vRight, end2);
VectorCopy(tr.endpos, end);
trap_Trace (&tr, muzzle, NULL, NULL, end, ent->s.number, (CONTENTS_PLAYERCLIP|CONTENTS_BODY) );
if ( (tr.entityNum != (MAX_GENTITIES-1)) &&
@ -226,8 +223,6 @@ static void WP_FirePhaser( gentity_t *ent, qboolean alt_fire )
trEnts[1] = tr.entityNum;
trEntFraction[1] = tr.fraction;
}
VectorMA(muzzle, -halfBeamWidth, vRight, start2);
VectorMA(end, -halfBeamWidth, vRight, end2);
trap_Trace (&tr, muzzle, NULL, NULL, end, ent->s.number, (CONTENTS_PLAYERCLIP|CONTENTS_BODY) );
if ( (tr.entityNum != (MAX_GENTITIES-1)) &&
(tr.entityNum != trEnts[0]) &&
@ -594,11 +589,10 @@ static void WP_FireDisruptor( gentity_t *ent, qboolean alt_fire )
static void grenadeExplode( gentity_t *ent )
{
vec3_t pos;
gentity_t *tent;
VectorSet( pos, ent->r.currentOrigin[0], ent->r.currentOrigin[1], ent->r.currentOrigin[2] + 8 );
tent = G_TempEntity( pos, EV_GRENADE_EXPLODE );
G_TempEntity( pos, EV_GRENADE_EXPLODE );
/* splash damage (doesn't apply to person directly hit) */
if ( ent->splashDamage ) {
@ -1559,11 +1553,11 @@ static void WP_TricorderScan (gentity_t *ent, qboolean alt_fire)
* if u actually tried this, you'd atomically disperse the transportee in a very painful way O_o
*/
if ( TransDat[tr_ent->client->ps.clientNum].beamTime > level.time ) {
trap_SendServerCommand( ent-g_entities, va("chat \"Unable to comply. Subject is already within a transport cycle.\"", Q_COLOR_ESCAPE));
trap_SendServerCommand( ent-g_entities, "chat \"Unable to comply. Subject is already within a transport cycle.\"");
return;
}
trap_SendServerCommand( ent-g_entities, va("chat \"Energizing.\"", Q_COLOR_ESCAPE));
trap_SendServerCommand( ent-g_entities, "chat \"Energizing.\"");
G_InitTransport( tr_ent->client->ps.clientNum, TransDat[clientNum].storedCoord[TPT_TRICORDER].origin,
TransDat[clientNum].storedCoord[TPT_TRICORDER].angles ); return;
@ -1577,12 +1571,12 @@ static void WP_TricorderScan (gentity_t *ent, qboolean alt_fire)
/*VectorCopy(ent->client->ps.origin, TransDat[clientNum].TransCoord);*/
/*VectorCopy(ent->client->ps.viewangles, TransDat[clientNum].TransCoordRot);*/
TransDat[clientNum].LastClick = level.time-5000;
trap_SendServerCommand( ent-g_entities, va("chat \"Location Confirmed.\"", Q_COLOR_ESCAPE));
trap_SendServerCommand( ent-g_entities, "chat \"Location Confirmed.\"");
/*trap_SendConsoleCommand( EXEC_APPEND, va("echo Location Confirmed.") );*/
}
else
{
trap_SendServerCommand( ent-g_entities, va("chat \"Click again to confirm Transporter Location.\"", Q_COLOR_ESCAPE));
trap_SendServerCommand( ent-g_entities, "chat \"Click again to confirm Transporter Location.\"");
/*trap_SendConsoleCommand( EXEC_APPEND, va("echo Click again to confirm Transporter Location.") );*/
TransDat[clientNum].LastClick = level.time;
}

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

@ -272,7 +272,7 @@ static int Game_AlertAddShader(lua_State *L) {
return 1;
}
luaAlertState->shaders[cond] = tmp;
Com_sprintf(luaAlertState->shaders[cond], sizeof(luaAlertState->shaders[cond]), "%s\0%s", luaAlertState->shaders[cond], shader);
Com_sprintf(luaAlertState->shaders[cond], sizeof(luaAlertState->shaders[cond]), "%s\n%s", luaAlertState->shaders[cond], shader);
}
lua_pushboolean(L, 1);

View file

@ -37,6 +37,13 @@
#endif
//Ignore __attribute__ on non-gcc platforms
#ifndef __GNUC__
#ifndef __attribute__
#define __attribute__(x)
#endif
#endif
/**********************************************************************
VM Considerations
@ -653,7 +660,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 +731,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 +747,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)));
/*

View file

@ -922,10 +922,9 @@ static void AdminMenu_Init( void ) {
AdminGeneric_InitLists();
/* point the FX list */
for ( i = 0; i < 11; i++ ) {
for ( i = 0; i < 10; i++ ) {
fxList[i] = s_admin_fxData[i].name;
}
fxList[11] = 0;
/* get key binds for the bound list */
for ( i = 0; i < 3; i++ ) {

View file

@ -2630,7 +2630,7 @@ char MenuText[MAXMENUTEXT];
UI_ParseMenuText
=================
*/
static void UI_ParseMenuText()
static void UI_ParseMenuText(void)
{
char *token;
char *buffer;
@ -2728,7 +2728,7 @@ char ButtonText[MAXBUTTONTEXT];
UI_ParseButtonText
=================
*/
static void UI_ParseButtonText()
static void UI_ParseButtonText(void)
{
char *token;
char *buffer;
@ -2955,7 +2955,7 @@ void UI_SecurityCodeSetup ( void )
if ( !code )
Com_Printf( S_COLOR_RED "No data was able to be loaded\n" );
else
Com_Printf( S_COLOR_RED "ID was %u, should be %u\n", code->ID, SECURITY_ID );
Com_Printf( S_COLOR_RED "ID was %lu, should be %u\n", code->ID, SECURITY_ID );
UI_ConfirmMenu( menu_normal_text[MNT_ID_INVALID], 0, SecurityFeedback );
return;
@ -3023,7 +3023,7 @@ void UI_SecurityCodeSetup ( void )
trap_FS_Write( code, SECURITY_SIZE, wf );
trap_FS_FCloseFile( wf );
trap_Cvar_Set( "sv_securityHash", va( "%u", code->hash ) );
trap_Cvar_Set( "sv_securityHash", va( "%lu", code->hash ) );
}
/* TiM - NYARRR!!!!! ioEF has a weird config system which appears to trip this system. */
@ -3050,7 +3050,7 @@ void UI_SecurityCodeSetup ( void )
* update the security code value and lock it each time
* from here, it is subsequently sent to the server on player connect
*/
trap_Cvar_Set( "sv_securityCode", va( "%u", code->playerID ) );
trap_Cvar_Set( "sv_securityCode", va( "%lu", code->playerID ) );
}

View file

@ -144,7 +144,7 @@ static void ConfirmMenu_Draw( void )
char *message;
char buffer[46];
int height;
int x, y;
int y;
int i, j;
int spacePoint=45;
@ -152,7 +152,6 @@ static void ConfirmMenu_Draw( void )
numLines = strlen( message ) / 45 + 1;
height = (SMALLCHAR_HEIGHT + 4) * numLines;
x = 345;
y = 277 - (height * 0.5); //269
//Com_Printf( S_COLOR_RED "numLines: %i\n", numLines );

View file

@ -2577,14 +2577,10 @@ Controls_MenuEvent
*/
static void Controls_MenuEvent (void* ptr, int event)
{
menuframework_s* m;
if (event != QM_ACTIVATED)
return;
m = ((menucommon_s*)ptr)->parent;
switch (((menucommon_s*)ptr)->id)
{
case ID_CONTROLS:
@ -2690,12 +2686,7 @@ static void Controls_MenuEvent (void* ptr, int event)
case ID_KEYTURNPEED:
case ID_LOOKSPRING:
case ID_AUTOSWITCHWEAPONS:
Controls_SetConfig();
// if (event == QM_ACTIVATED)
// {
// s_controls.changesmade = qtrue;
// }
break;
}
}
@ -3474,15 +3465,12 @@ M_Default_Event
*/
void M_Default_Event (void* ptr, int event)
{
menuframework_s* m;
if (event != QM_ACTIVATED)
{
return;
}
m = ((menucommon_s*)ptr)->parent;
switch (((menucommon_s*)ptr)->id)
{

View file

@ -308,10 +308,6 @@ UI_DemosMenu_Key
*/
static sfxHandle_t UI_DemosMenu_Key( int key )
{
menucommon_s *item;
item = Menu_ItemAtCursor( &s_demos.menu );
return Menu_DefaultKey( &s_demos.menu, key );
}

File diff suppressed because it is too large Load diff

View file

@ -12,7 +12,7 @@ x, y, are in pixels
*/
void MField_Draw( mfield_t *edit, int x, int y, int style, vec4_t color,int cursor ) {
int len;
int charw,charh;
int charw;
int drawLen;
int prestep;
int cursorChar;
@ -71,17 +71,14 @@ void MField_Draw( mfield_t *edit, int x, int y, int style, vec4_t color,int curs
if (style & UI_SMALLFONT)
{
charh = SMALLCHAR_HEIGHT;
charw = SMALLCHAR_WIDTH;
}
else if (style & UI_GIANTFONT)
{
charh = GIANTCHAR_HEIGHT;
charw = GIANTCHAR_WIDTH;
}
else
{
charh = BIGCHAR_HEIGHT;
charw = BIGCHAR_WIDTH;
}
@ -91,13 +88,6 @@ void MField_Draw( mfield_t *edit, int x, int y, int style, vec4_t color,int curs
if (style & UI_CENTER)
{
x = x + (len/2);
//x = x + ( edit->cursor - prestep ) * charw;
//len = strlen(str);
//x -= (len * (charw/2));
//x = x - (len * (charw/2));
//Com_Printf( "Dist is: %i, len is %i, width = %i\n", x, len, charw );
}
else if (style & UI_RIGHT)
{
@ -106,18 +96,11 @@ void MField_Draw( mfield_t *edit, int x, int y, int style, vec4_t color,int curs
}
else {
x = x + len;
//x = x + ( edit->cursor - prestep ) * charw;
}
if(!((uis.realtime/BLINK_DIVISOR) & 1))
{
char buff[2];
buff[0] = (unsigned char)cursorChar;
buff[1] = '\0';
UI_DrawChar( x, y+2, cursorChar, style & ~(UI_CENTER|UI_RIGHT), color );
//UI_DrawProportionalString ( x, y+2, buff, style, color );
}
}
@ -370,7 +353,6 @@ void MenuField_Draw( menufield_s *f )
int x;
int y;
int w;
int h;
int style;
qboolean focus;
int color,titleColor;
@ -388,29 +370,21 @@ void MenuField_Draw( menufield_s *f )
if (f->field.style & UI_TINYFONT)
{
w = TINYCHAR_WIDTH;
h = TINYCHAR_HEIGHT;
//style = UI_TINYFONT;
style = f->field.style;
}
else if (f->field.style & UI_BIGFONT)
{
w = BIGCHAR_WIDTH;
h = BIGCHAR_HEIGHT;
//style = UI_BIGFONT;
style = f->field.style;
}
else if (f->field.style & UI_GIANTFONT)
{
w = GIANTCHAR_WIDTH;
h = GIANTCHAR_HEIGHT;
//style = UI_GIANTFONT;
style = f->field.style;
}
else
{
w = SMALLCHAR_WIDTH;
h = SMALLCHAR_HEIGHT;
//style = UI_SMALLFONT;
style = f->field.style;
}
@ -494,12 +468,6 @@ void MenuField_Draw( menufield_s *f )
UI_DrawProportionalString( x - 5, y, menu_button_text[f->field.titleEnum][0],UI_RIGHT | UI_SMALLFONT, colorTable[titleColor]);
}// TiM 5 = 10 previously
//TiM: This is leftover from Quake III. We'll be using this variable elsewhere now :)
/*if ( f->generic.name )
{
UI_DrawString( x - w, y, f->generic.name, style|UI_RIGHT, colorTable[color] );
}*/
MField_Draw( &f->field, x, y+offset, style, colorTable[color],focus );
}

View file

@ -1377,18 +1377,13 @@ qboolean UI_ParseModelDataFile( playerInfo_t *pi, 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;
char *token;
char legsFileRoute[MAX_QPATH];
qboolean didAnims = qfalse;
qboolean skinSetFound=qfalse;
int noBlinking;
noBlinking = trap_Cvar_VariableValue( "cg_noBlinkingHeads" );
//size_t strLen;
//create the file route
Com_sprintf( fileName, sizeof(fileName), "models/players_rpgx/%s/%s.model", charName, modelName);
@ -1445,7 +1440,6 @@ qboolean UI_ParseModelDataFile( playerInfo_t *pi, 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!
@ -1623,7 +1617,7 @@ qboolean UI_ParseModelDataFile( playerInfo_t *pi, const char *charName,
if ( !skinSetFound )
{
if ( !UI_ParseSkinSetDataFile( pi, va("%s_*", modelName, skinName ), charName, skinName ) )
if ( !UI_ParseSkinSetDataFile( pi, va("%s_*", modelName ), charName, skinName ) )
{
Com_Printf( S_COLOR_RED "ERROR: Tried loading default skin set, however it failed.\n");
}

View file

@ -1052,7 +1052,6 @@ Slider_Draw
static void Slider_Draw( menuslider_s *s )
{
int color;
int style;
int textColor=CT_RED;
int thumbColor=CT_LTGREY,backgroundColor=CT_DKGREY;
int focus,thumbX;
@ -1063,12 +1062,10 @@ static void Slider_Draw( menuslider_s *s )
if ( s->generic.flags & QMF_GRAYED )
{
color = CT_DKGREY;
style = UI_LEFT;
}
else if (Menu_ItemAtCursor( s->generic.parent ) == s)
{
color = s->color2;
style = UI_LEFT|UI_PULSE;
textColor = s->textcolor2;
thumbColor = s->thumbColor2;
backgroundColor = CT_LTGREY;
@ -1077,7 +1074,6 @@ static void Slider_Draw( menuslider_s *s )
else
{
color = s->color;
style = UI_LEFT;
textColor = s->textcolor;
thumbColor = s->thumbColor;
}

View file

@ -211,11 +211,8 @@ static void ServerInfo_LinePrep( void)
const char *s;
char key[MAX_INFO_KEY];
char value[MAX_INFO_VALUE];
menutext_s *hold_key,*hold_value;
s = s_serverinfo.info;
hold_key = &s_serverinfo.key1;
hold_value = &s_serverinfo.value1;
s_serverinfo.lineCnt = 0;
i=0;
while ( s )

View file

@ -404,7 +404,7 @@ static void ArenaServers_UpdatePicture( void ) {
hpic = trap_R_RegisterShaderNoMip( va("levelshots/%s.tga", servernodeptr->mapname) );
if (!hpic)
{
Com_sprintf( picname, sizeof(picname), "levelshots/unknownmap.tga", servernodeptr->mapname );
Com_sprintf( picname, sizeof(picname), "levelshots/unknownmap.tga" );
}
else
{
@ -845,13 +845,11 @@ void ArenaServers_LoadFavorites( void )
int i;
int j;
int numtempitems;
char emptyinfo[MAX_INFO_STRING];
char adrstr[MAX_ADDRESSLENGTH];
servernode_t templist[MAX_FAVORITESERVERS];
qboolean found;
found = qfalse;
emptyinfo[0] = '\0';
// copy the old
memcpy( templist, g_favoriteserverlist, sizeof(servernode_t)*MAX_FAVORITESERVERS );
@ -1420,8 +1418,6 @@ ArenaServers_Event
*/
static void ArenaServers_Event( void* ptr, int event ) {
int id;
menuframework_s* m;
id = ((menucommon_s*)ptr)->id;
@ -1430,8 +1426,6 @@ static void ArenaServers_Event( void* ptr, int event ) {
return;
}
m = ((menucommon_s*)ptr)->parent;
switch( id )
{
case ID_MAINMENU:

View file

@ -110,20 +110,8 @@ UI_SPPostgameMenu_NextEvent
=================
*/
static void UI_SPPostgameMenu_NextEvent( void* ptr, int event ) {
// int currentSet;
int levelSet;
int level;
// int currentLevel;
const char *arenaInfo;
int gametype;
gametype = trap_Cvar_VariableValue("g_gametype" );
//------------------------------------------- GAME TYPES
//0 GT_FFA, // free for all
//1 GT_TOURNAMENT, // one on one tournament
//2 GT_SINGLE_PLAYER, // single player tournament
//3 GT_TEAM, // team deathmatch
//4 GT_CTF, // capture the flag
if (event != QM_ACTIVATED) {
@ -131,11 +119,6 @@ static void UI_SPPostgameMenu_NextEvent( void* ptr, int event ) {
}
UI_PopMenu();
// if (gametype!=2) // FOR ALL NON 'GT_SINGLE_PLAYER' GAMES
// { return;
// }
// handle specially if we just won the training map
if( postgameMenuInfo.won == 0 ) {
level = 0;
@ -143,11 +126,6 @@ static void UI_SPPostgameMenu_NextEvent( void* ptr, int event ) {
else {
level = postgameMenuInfo.level + 1;
}
if (uis.demoversion) {
levelSet = level / 2;
} else {
levelSet = level / ARENAS_PER_TIER;
}
#if 0
currentLevel = UI_GetCurrentGame();
if( currentLevel == -1 ) {

View file

@ -858,7 +858,6 @@ static void StartServer_LevelshotDraw( void *self ) {
int x;
int y;
int n;
int color = CT_DKGOLD1;
b = (menubitmap_s *)self;
@ -884,11 +883,6 @@ static void StartServer_LevelshotDraw( void *self ) {
}
n = (s_startserver.page * MAX_MAPSPERPAGE) + (b->generic.id - ID_PICTURES);
if (n == s_startserver.currentmap)
{
color = CT_LTGOLD1;
}
y += b->height;
@ -913,25 +907,15 @@ StartServer_Graphics
*/
void StartServer_Graphics (void)
{
int x;
UI_MenuFrame2(&s_startserver.menu);
// trap_R_SetColor( colorTable[CT_DKBROWN1]);
// UI_DrawHandlePic(30,331, 47, 58, uis.whiteShader);
trap_R_SetColor( colorTable[CT_LTBROWN1]);
UI_DrawHandlePic(30,203, 47, 186, uis.whiteShader); // Middle left line
UI_DrawProportionalString( 74, 150, "5164",UI_RIGHT|UI_TINYFONT, colorTable[CT_BLACK]);
//trap_R_SetColor( colorTable[CT_BLACK]);
//UI_DrawHandlePic(30,55, 47, 280, uis.whiteShader);
// Level pics frame
trap_R_SetColor( colorTable[CT_DKBROWN1]);
x = START_X_POS;
UI_DrawProportionalString( 74, 30, "6801",UI_RIGHT|UI_TINYFONT, colorTable[CT_BLACK]);
UI_DrawProportionalString( 74, 207, "615222",UI_RIGHT|UI_TINYFONT, colorTable[CT_BLACK]);
@ -944,12 +928,6 @@ void StartServer_Graphics (void)
UI_DrawHandlePic(s_startserver.back.generic.x - 14, s_startserver.back.generic.y,
MENU_BUTTON_MED_HEIGHT, MENU_BUTTON_MED_HEIGHT, uis.graphicButtonLeftEnd);
trap_R_SetColor( colorTable[CT_DKBROWN1]);
//UI_DrawHandlePic(s_startserver.assimilation.generic.x - 24, 56, 170, 18, uis.whiteShader); // Top
//UI_DrawHandlePic(s_startserver.assimilation.generic.x - 34, 46,32, -32,s_startserver.corner_ll);
//UI_DrawHandlePic(s_startserver.assimilation.generic.x - 34, 64, 18, 278, uis.whiteShader); // Side
//UI_DrawProportionalString( s_startserver.assimilation.generic.x, 57, menu_normal_text[MNT_PARAMETERS],UI_SMALLFONT, colorTable[CT_BLACK]);
trap_R_SetColor( colorTable[CT_DKPURPLE2]);
//left bracket 'round server icons
@ -2310,7 +2288,7 @@ ServerOptions_MenuInit
static void ServerOptions_MenuInit( qboolean multiplayer )
{
int x,y,yInc;
int n,assim;
int n;
memset( &s_serveroptions, 0 ,sizeof(serveroptions_t) );
s_serveroptions.multiplayer = multiplayer;
@ -2541,7 +2519,6 @@ static void ServerOptions_MenuInit( qboolean multiplayer )
s_serveroptions.playerName[n].focusWidth = 14 * SMALLCHAR_WIDTH;
s_serveroptions.playerTeam[n].generic.type = MTYPE_SPINCONTROL;
//s_serveroptions.playerTeam[n].generic.flags = QMF_GRAPHICLIST;
s_serveroptions.playerTeam[n].generic.callback = ServerOptions_Event;
s_serveroptions.playerTeam[n].generic.id = ID_PLAYER_TEAM;
s_serveroptions.playerTeam[n].generic.x = 296;
@ -2555,25 +2532,20 @@ static void ServerOptions_MenuInit( qboolean multiplayer )
s_serveroptions.playerTeam[n].width = 20;
s_serveroptions.playerTeam[n].height = 18;
//MCG ADD:
// if ( s_serveroptions.specialties )
// {
s_serveroptions.playerClass[n].generic.type = MTYPE_SPINCONTROL;
//s_serveroptions.playerClass[n].generic.flags = QMF_GRAPHICLIST;
s_serveroptions.playerClass[n].generic.callback = ServerOptions_Event;
s_serveroptions.playerClass[n].generic.id = ID_PLAYER_CLASS;
s_serveroptions.playerClass[n].generic.x = 322;
s_serveroptions.playerClass[n].generic.y = y;
s_serveroptions.playerClass[n].listnames = playerClass_list;
s_serveroptions.playerClass[n].listshaders = s_serveroptions.pClassShaders;
s_serveroptions.playerClass[n].listX = 1;
s_serveroptions.playerClass[n].listY = 1;
s_serveroptions.playerClass[n].focusWidth = 28;
s_serveroptions.playerClass[n].focusHeight = 18;
s_serveroptions.playerClass[n].width = 28;
s_serveroptions.playerClass[n].height = 18;
// }
//MCG END
s_serveroptions.playerClass[n].generic.type = MTYPE_SPINCONTROL;
s_serveroptions.playerClass[n].generic.callback = ServerOptions_Event;
s_serveroptions.playerClass[n].generic.id = ID_PLAYER_CLASS;
s_serveroptions.playerClass[n].generic.x = 322;
s_serveroptions.playerClass[n].generic.y = y;
s_serveroptions.playerClass[n].listnames = playerClass_list;
s_serveroptions.playerClass[n].listshaders = s_serveroptions.pClassShaders;
s_serveroptions.playerClass[n].listX = 1;
s_serveroptions.playerClass[n].listY = 1;
s_serveroptions.playerClass[n].focusWidth = 28;
s_serveroptions.playerClass[n].focusHeight = 18;
s_serveroptions.playerClass[n].width = 28;
s_serveroptions.playerClass[n].height = 18;
y += ( SMALLCHAR_HEIGHT + 4 );
}
@ -2663,13 +2635,9 @@ static void ServerOptions_MenuInit( qboolean multiplayer )
Menu_AddItem( &s_serveroptions.menu, &s_serveroptions.playerTeam[n] );
}
//if( s_serveroptions.specialties )
{
Menu_AddItem( &s_serveroptions.menu, &s_serveroptions.playerClass[n] );
}
}
assim = trap_Cvar_VariableValue( "g_pModAssimilation");
Menu_AddItem( &s_serveroptions.menu, &s_serveroptions.playerClass[n] );
}
#if 0
if ( s_serveroptions.gametype != GT_CTF )
@ -2682,11 +2650,6 @@ static void ServerOptions_MenuInit( qboolean multiplayer )
}
#endif
// if (!assim) // No points in assimilation
// {
// Menu_AddItem( &s_serveroptions.menu, &s_serveroptions.timelimit );
// }
if ( s_serveroptions.gametype >= GT_TEAM )
{
Menu_AddItem( &s_serveroptions.menu, &s_serveroptions.friendlyfire );

View file

@ -1849,7 +1849,7 @@ void M_VideoDriverMenu_Graphics (void)
{
float labelColor[] = { 0, 1.0, 0, 1.0 };
float textColor[] = { 1, 1, 1, 1 };
int x,y,x2,x3;
int x,y,x2;
UI_MenuFrame(&s_videodriver.menu);
@ -1861,10 +1861,6 @@ void M_VideoDriverMenu_Graphics (void)
UI_Setup_MenuButtons();
// trap_R_SetColor( colorTable[CT_DKPURPLE1]);
// UI_DrawHandlePic( 30, 203, 47, 69, uis.whiteShader); // Top Left column above two buttons
// UI_DrawHandlePic( 30, 344, 47, 45, uis.whiteShader); // Top Left column below two buttons
// Top Frame
UI_DrawHandlePic( 178, 136, 32, -32, s_videodriver.corner_ll_8_16); // UL
UI_DrawHandlePic( 178, 221, 32, 32, s_videodriver.corner_ll_8_16); // LL
@ -1904,7 +1900,6 @@ void M_VideoDriverMenu_Graphics (void)
x = 204;
x2 = 259;
x3 = x2 + 150;
y = 168;
UI_DrawProportionalString( x, y, menu_normal_text[MNT_VENDOR], UI_LEFT|UI_TINYFONT, labelColor );
UI_DrawProportionalString( x2, y, uis.glconfig.vendor_string, UI_LEFT|UI_TINYFONT, textColor );
@ -2307,7 +2302,7 @@ static void VideoData2_MenuInit( void )
UI_VideoData2SettingsGetCvars
=================
*/
static void UI_VideoData2SettingsGetCvars()
static void UI_VideoData2SettingsGetCvars(void)
{
s_videodata2.gamma_slider.curvalue = trap_Cvar_VariableValue( "r_gamma" ) * 10.0f;
s_videodata2.screensize_slider.curvalue = trap_Cvar_VariableValue( "cg_viewsize" );