Skip to content

Commit

Permalink
ioquake3 resync to revision 2369 from 2362.
Browse files Browse the repository at this point in the history
Make software overbright optional (cvar r_softOverbright) and reduce the number of FBOs and FBO blits when able.
Remove "!target" checks from tell, vtell, and gc commands. Target was just set, cannot be NULL.
Validate "order" in gc command before "player id."
Update standalone code in Catch the Chicken NSIS installer.
Remove unused function CL_DisconnectPacket. Pointed out by Ensiform.
Fix function prototype for Info_RemoveKey_Big. Pointed out by Ensiform.
In q3_ui if uis.demoversion is set, hide "Team Arena" and "Mods" in main menu. (They aren't shown in id's q3a demo and use to be drawn under demo message).
Add length check here as well, thanks Ensiform
  • Loading branch information
zturtleman committed Dec 4, 2012
1 parent 584329b commit 12504b5
Show file tree
Hide file tree
Showing 14 changed files with 198 additions and 258 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#

# ioquake3 svn version that this is based on
IOQ3_REVISION = 2362
IOQ3_REVISION = 2369

COMPILE_PLATFORM=$(shell uname|sed -e s/_.*//|tr '[:upper:]' '[:lower:]'|sed -e 's/\//_/g')

Expand Down
33 changes: 0 additions & 33 deletions code/client/cl_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2354,39 +2354,6 @@ void CL_CheckForResend( void ) {
}
}

/*
===================
CL_DisconnectPacket
Sometimes the server can drop the client and the netchan based
disconnect can be lost. If the client continues to send packets
to the server, the server will send out of band disconnect packets
to the client so it doesn't have to wait for the full timeout period.
===================
*/
void CL_DisconnectPacket( netadr_t from ) {
if ( clc.state < CA_CONNECTING ) {
return;
}

// if not from our server, ignore it
if ( !NET_CompareAdr( from, clc.netchan.remoteAddress ) ) {
return;
}

// if we have received packets within three seconds, ignore it
// (it might be a malicious spoof)
if ( cls.realtime - clc.lastPacketTime < 3000 ) {
return;
}

// drop the connection
Com_Printf( "Server disconnected for unknown reason\n" );
Cvar_Set("com_errorMessage", "Server disconnected for unknown reason\n" );
CL_Disconnect( qtrue );
}


/*
===================
CL_MotdPacket
Expand Down
22 changes: 11 additions & 11 deletions code/game/g_cmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -1021,7 +1021,7 @@ static void Cmd_Tell_f( gentity_t *ent ) {
}

target = &g_entities[targetNum];
if ( !target || !target->inuse || !target->client ) {
if ( !target->inuse || !target->client ) {
return;
}

Expand Down Expand Up @@ -1147,7 +1147,7 @@ static void Cmd_VoiceTell_f( gentity_t *ent, qboolean voiceonly ) {
}

target = &g_entities[targetNum];
if ( !target || !target->inuse || !target->client ) {
if ( !target->inuse || !target->client ) {
return;
}

Expand Down Expand Up @@ -1261,22 +1261,22 @@ void Cmd_GameCommand_f( gentity_t *ent ) {
return;
}

trap_Argv( 2, arg, sizeof( arg ) );
order = atoi( arg );

if ( order < 0 || order >= numgc_orders ) {
trap_SendServerCommand( ent-g_entities, va("print \"Bad order: %i\n\"", order));
return;
}

trap_Argv( 1, arg, sizeof( arg ) );
targetNum = ClientNumberFromString( ent, arg, qtrue, qtrue );
if ( targetNum == -1 ) {
return;
}

target = &g_entities[targetNum];
if ( !target || !target->inuse || !target->client ) {
return;
}

trap_Argv( 2, arg, sizeof( arg ) );
order = atoi( arg );

if ( order < 0 || order >= numgc_orders ) {
trap_SendServerCommand( ent-g_entities, va("print \"Bad order: %i\n\"", order));
if ( !target->inuse || !target->client ) {
return;
}

Expand Down
28 changes: 16 additions & 12 deletions code/q3_ui/ui_menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ void UI_MainMenu( void ) {
s_main.cinematics.style = style;

#ifndef MISSIONPACK
if (UI_TeamArenaExists()) {
if ( !uis.demoversion && UI_TeamArenaExists() ) {
teamArena = qtrue;
y += MAIN_MENU_VERTICAL_SPACING;
s_main.teamArena.generic.type = MTYPE_PTEXT;
Expand All @@ -389,16 +389,18 @@ void UI_MainMenu( void ) {
}
#endif

y += MAIN_MENU_VERTICAL_SPACING;
s_main.mods.generic.type = MTYPE_PTEXT;
s_main.mods.generic.flags = QMF_CENTER_JUSTIFY|QMF_PULSEIFFOCUS;
s_main.mods.generic.x = 320;
s_main.mods.generic.y = y;
s_main.mods.generic.id = ID_MODS;
s_main.mods.generic.callback = Main_MenuEvent;
s_main.mods.string = "MODS";
s_main.mods.color = color_red;
s_main.mods.style = style;
if ( !uis.demoversion ) {
y += MAIN_MENU_VERTICAL_SPACING;
s_main.mods.generic.type = MTYPE_PTEXT;
s_main.mods.generic.flags = QMF_CENTER_JUSTIFY|QMF_PULSEIFFOCUS;
s_main.mods.generic.x = 320;
s_main.mods.generic.y = y;
s_main.mods.generic.id = ID_MODS;
s_main.mods.generic.callback = Main_MenuEvent;
s_main.mods.string = "MODS";
s_main.mods.color = color_red;
s_main.mods.style = style;
}

y += MAIN_MENU_VERTICAL_SPACING;
s_main.exit.generic.type = MTYPE_PTEXT;
Expand All @@ -421,7 +423,9 @@ void UI_MainMenu( void ) {
Menu_AddItem( &s_main.menu, &s_main.teamArena );
}
#endif
Menu_AddItem( &s_main.menu, &s_main.mods );
if ( !uis.demoversion ) {
Menu_AddItem( &s_main.menu, &s_main.mods );
}
Menu_AddItem( &s_main.menu, &s_main.exit );

trap_Key_SetCatcher( KEYCATCH_UI );
Expand Down
2 changes: 1 addition & 1 deletion code/qcommon/q_shared.h
Original file line number Diff line number Diff line change
Expand Up @@ -892,7 +892,7 @@ void Com_TruncateLongString( char *buffer, const char *s );
//
char *Info_ValueForKey( const char *s, const char *key );
void Info_RemoveKey( char *s, const char *key );
void Info_RemoveKey_big( char *s, const char *key );
void Info_RemoveKey_Big( char *s, const char *key );
void Info_SetValueForKey( char *s, const char *key, const char *value );
void Info_SetValueForKey_Big( char *s, const char *key, const char *value );
qboolean Info_Validate( const char *s );
Expand Down
Loading

0 comments on commit 12504b5

Please sign in to comment.