- CalculateRanks function in the server-side has a data overflow problem.
Fix: g_main.c ~ line 778
Code: Select all
//fixed a data overflow problem here.
for ( i = 0; i < 2; i++ ) {
//for ( i = 0; i < TEAM_NUM_TEAMS; i++ ) {
- G_RemoveRandomBot in g_bot.c has a tendency to kick spectators of bots instead of the bot upon changes in # of players when you have bot_minplayers set.
Fix: g_bot.c Function: G_RemoveRandomBot
(take out or comment the first two code blocks here:)
Code: Select all
strcpy(netname, cl->pers.netname);
Q_CleanStr(netname);
trap_SendConsoleCommand( EXEC_INSERT, va("kick %s\n", netname) );
Code: Select all
trap_SendConsoleCommand( EXEC_INSERT, va("clientkick \"%d\"\n", cl->ps.clientNum));
- Railgun impact mark uses color2 when it should be using color1.
Fix: cg_weapons.c ~ line 2006
Code: Select all
color = cgs.clientinfo[clientNum].color1; // was cgs.clientinfo[clientNum].color2
- Quad DLight not team colored, and quad weapon only blue.
Fix:
Part 1: cg_players.c:
CG_PlayerPowerUps function:
just replace the quad section with this:
Code: Select all
// quad gives a dlight
if ( powerups & ( 1 << PW_QUAD ) ) {
if (cgs.gametype >= GT_TEAM) {
if ( cgs.clientinfo[ cent->currentState.clientNum ].team == TEAM_RED ) {
trap_R_AddLightToScene( cent->lerpOrigin, 200 + (rand()&31), 1.0, 0.2f, 0.2f ); // Red DLight
} else if ( cgs.clientinfo[ cent->currentState.clientNum ].team == TEAM_BLUE ) {
trap_R_AddLightToScene( cent->lerpOrigin, 200 + (rand()&31), 0.2f, 0.2f, 1 ); // Blue DLight
} else {
// uh free team is auto team in team games, and specs uhm no items for them...
}
} else {
if ( cgs.clientinfo[ cent->currentState.clientNum ].team == TEAM_FREE ) {
trap_R_AddLightToScene( cent->lerpOrigin, 200 + (rand()&31), 0.2f, 0.2f, 1 ); // Blue DLight
} else {
// uh no items for specs?
}
}
}
Part 2: cg_weapons.c
Function: CG_AddWeaponWithPowerups
add the int team declaration like this:
Code: Select all
static void CG_AddWeaponWithPowerups( refEntity_t *gun, int powerups, int team ) {
just replace the quad section with this:
Code: Select all
if ( powerups & ( 1 << PW_QUAD ) ) {
if (cgs.gametype >= GT_TEAM) {
if (team == TEAM_RED) {
gun->customShader = cgs.media.redQuadWeaponShader;
trap_R_AddRefEntityToScene( gun );
} else if (team == TEAM_BLUE) {
gun->customShader = cgs.media.quadWeaponShader;
trap_R_AddRefEntityToScene( gun );
} else {
// dont do for other teams cause they not really team here
}
} else {
if (team == TEAM_FREE) {
gun->customShader = cgs.media.quadWeaponShader;
trap_R_AddRefEntityToScene( gun );
} else {
// dont do for specs
}
}
//trap_R_AddRefEntityToScene( gun );
}
scroll down to this line in CG_AddPlayerWeapon:
Code: Select all
CG_AddWeaponWithPowerups( &gun, cent->currentState.powerups );
make it so that the team argument is there:
Code: Select all
CG_AddWeaponWithPowerups( &gun, cent->currentState.powerups, team );
and the same with:
Code: Select all
CG_AddWeaponWithPowerups( &barrel, cent->currentState.powerups );
becomes:
Code: Select all
CG_AddWeaponWithPowerups( &barrel, cent->currentState.powerups, team );
Part 3:
cg_local.h ~ around the other pw shader declarations:
Code: Select all
qhandle_t redQuadShader; // might already be there
qhandle_t redQuadWeaponShader;
cg_main.c ~ around the other pw shader register parts
Code: Select all
cgs.media.redQuadShader = trap_R_RegisterShader("powerups/redquad" );
cgs.media.redQuadWeaponShader = trap_R_RegisterShader("powerups/redquadWeapon" );
make sure you take the line out that looks like this:
Code: Select all
cgs.media.redQuadShader = trap_R_RegisterShader("powerups/blueflag" );
make ur shaders and if u want the image i can post it.
- trap_SendServerCommand crashes all clients when exceeding 1024 in length. (im not sure if we are allowed to use this fix or not)
From ET 2.60 + Chrunker's Project BugFix #001:
Code: Select all
void trap_SendServerCommand( int clientNum, const char *text ) {
// rain - #433 - commands over 1022 chars will crash the
// client engine upon receipt, so ignore them
// CHRUKER: b001 - Truncating the oversize server command before writing it to the log
if( strlen( text ) > 1022 ) {
G_LogPrintf( "%s: trap_SendServerCommand( %d, ... ) length exceeds 1022.\n", GAMEVERSION, clientNum );
G_LogPrintf( "%s: text [%.950s]... truncated\n", GAMEVERSION, text ); return;
}
syscall( G_SEND_SERVER_COMMAND, clientNum, text );
}
- "/where" command doesnt display correct current origin
Fix:
g_cmds.c ~ line 1245
change the trap send server command to this:
Code: Select all
trap_SendServerCommand( ent-g_entities, va("print \"%s\n\"", vtos( ent->r.currentOrigin ) ) );
- svf_bot is not set until below in ClientConnect.
Fix:
Code: Select all
if ( !( ent->r.svFlags & SVF_BOT ) && (strcmp(value, "localhost") != 0)) {
this should be:
Code: Select all
if ( !isBot && g_needpass.integer && (strcmp(Info_ValueForKey ( userinfo, "ip" ), "localhost") != 0)) {
thats about all i got for now.