Misc Elite Force code clean up

This commit is contained in:
Zack Middleton 2014-10-29 10:52:23 -05:00
parent b7cd6b6088
commit 7e663b7c86
11 changed files with 18 additions and 41 deletions

View file

@ -3654,7 +3654,7 @@ void CL_Init( void ) {
Cvar_Get ("snaps", "20", CVAR_USERINFO | CVAR_ARCHIVE );
Cvar_Get ("model", "munro/red", CVAR_USERINFO | CVAR_ARCHIVE );
#ifndef ELITEFORCE
Cvar_Get ("headmodel", "munro", CVAR_USERINFO | CVAR_ARCHIVE );
Cvar_Get ("headmodel", "sarge", CVAR_USERINFO | CVAR_ARCHIVE );
Cvar_Get ("team_model", "james", CVAR_USERINFO | CVAR_ARCHIVE );
Cvar_Get ("team_headmodel", "*james", CVAR_USERINFO | CVAR_ARCHIVE );
Cvar_Get ("g_redTeam", "Stroggs", CVAR_SERVERINFO | CVAR_ARCHIVE);

View file

@ -30,7 +30,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
// the "gameversion" client command will print this plus compile date
#define GAMEVERSION BASEGAME
#endif
#define BODY_QUEUE_SIZE 8

View file

@ -60,8 +60,13 @@ properly.
*/
#ifdef ELITEFORCE
#define MAX_FACETS 4096
#define MAX_PATCH_PLANES 8192
#else
#define MAX_FACETS 1024
#define MAX_PATCH_PLANES 2048
#endif
typedef struct {
float plane[4];

View file

@ -31,8 +31,8 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include <winsock.h>
#endif
#ifdef ELITEFORCE
int demo_protocols[] =
#ifdef ELITEFORCE
{ 0 };
#else
{ 67, 66, 0 };
@ -82,7 +82,6 @@ cvar_t *com_version;
cvar_t *com_blood;
cvar_t *com_buildScript; // for automated data building scripts
cvar_t *com_introPlayed;
cvar_t *com_novmcompat; // set to 1 to indicate VMs are run by the new engine.
cvar_t *cl_paused;
cvar_t *sv_paused;
cvar_t *cl_packetdelay;
@ -2843,7 +2842,7 @@ void Com_Init( char *commandLine ) {
Cvar_Get("com_errorMessage", "", CVAR_ROM | CVAR_NORESTART);
com_introPlayed = Cvar_Get( "com_introplayed", "0", CVAR_ARCHIVE);
com_novmcompat = Cvar_Get( "com_novmcompat", "1", CVAR_ROM);
Cvar_Get( "com_novmcompat", "1", CVAR_ROM); // set to 1 to indicate VMs are run by the new engine.
s = va("%s %s %s", Q3_VERSION, PLATFORM_STRING, __DATE__ );
com_version = Cvar_Get ("version", s, CVAR_ROM | CVAR_SERVERINFO );

View file

@ -195,7 +195,6 @@ static const unsigned int pak_checksums[] = {
908855077u,
977125798u
};
#endif
static const unsigned int missionpak_checksums[] =
{
@ -204,6 +203,7 @@ static const unsigned int missionpak_checksums[] =
2662638993u,
1438664554u
};
#endif
// if this is defined, the executable positively won't work with any paks other
// than the demo pak, even if productid is present. This is only used for our
@ -3088,21 +3088,16 @@ qboolean FS_ComparePaks( char *neededpaks, int len, qboolean dlstring ) {
havepak = qfalse;
// never autodownload any of the id paks
#ifdef ELITEFORCE
#ifndef STANDALONE
if(FS_idPak(fs_serverReferencedPakNames[i], BASEGAME, NUM_ID_PAKS))
continue;
#endif
#else
if(FS_idPak(fs_serverReferencedPakNames[i], BASEGAME, NUM_ID_PAKS)
#ifndef ELITEFORCE
#ifndef STANDALONE
|| FS_idPak(fs_serverReferencedPakNames[i], BASETA, NUM_TA_PAKS)
#endif
#endif
)
{
continue;
}
#endif
// Make sure the server cannot make us write to non-quake3 directories.
if(FS_CheckDirTraversal(fs_serverReferencedPakNames[i]))

View file

@ -1074,7 +1074,7 @@ netField_t entityStateFields[] =
{ NETF(legsAnim), 8 },
{ NETF(groundEntityNum), GENTITYNUM_BITS },
{ NETF(pos.trType), 8 },
{ NETF(eFlags), 27 },
{ NETF(eFlags), 19 },
{ NETF(otherEntityNum), GENTITYNUM_BITS },
{ NETF(weapon), 8 },
{ NETF(clientNum), 8 },

View file

@ -23,10 +23,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#ifndef _QCOMMON_H_
#define _QCOMMON_H_
#if defined(ELITEFORCE) && defined(MISSIONPACK)
#undef MISSIONPACK
#endif
#include "../qcommon/cm_public.h"
//Ignore __attribute__ on non-gcc platforms
@ -633,10 +629,8 @@ issues.
#define FS_UI_REF 0x02
#define FS_CGAME_REF 0x04
// number of id paks that will never be autodownloaded from baseq3/missionpack
#ifdef ELITEFORCE
#define NUM_ID_PAKS 9
#else
#define NUM_ID_PAKS 9
#ifndef ELITEFORCE
#define NUM_TA_PAKS 4
#endif

View file

@ -297,7 +297,7 @@ void R_SetupEntityLighting( const trRefdef_t *refdef, trRefEntity_t *ent ) {
#ifdef ELITEFORCE
if(ent->e.renderfx & RF_FULLBRIGHT)
{
// ent->ambientLight[0] = ent->ambientLight[1] = ent->ambientLight[1] = 0xFF;
ent->ambientLight[0] = ent->ambientLight[1] = ent->ambientLight[2] = 0x7F;
((byte *)&ent->ambientLightInt)[0] = 0x7F;
((byte *)&ent->ambientLightInt)[1] = 0x7F;
((byte *)&ent->ambientLightInt)[2] = 0x7F;

View file

@ -147,11 +147,7 @@ void SV_GetChallenge(netadr_t from)
#ifndef STANDALONE
// Drop the authorize stuff if this client is coming in via v6 as the auth server does not support ipv6.
// Drop also for addresses coming in on local LAN and for stand-alone games independent from id's assets.
#ifdef ELITEFORCE
if(challenge->adr.type == NA_IP && !com_standalone->integer && !Sys_IsLANAddress(from))
#else
if(challenge->adr.type == NA_IP && !com_standalone->integer && !Sys_IsLANAddress(from))
#endif
{
// look up the authorize server's IP
if (svs.authorizeAddress.type == NA_BAD)
@ -970,9 +966,6 @@ Fill up msg with data, return number of download blocks added
int SV_WriteDownloadToClient(client_t *cl, msg_t *msg)
{
int curindex;
#ifndef ELITEFORCE
int missionPack = 0;
#endif
int unreferenced = 1;
char errorMessage[1024];
char pakbuf[MAX_QPATH], *pakptr;
@ -1018,7 +1011,7 @@ int SV_WriteDownloadToClient(client_t *cl, msg_t *msg)
// check whether it's legal to download it.
#ifndef STANDALONE
#ifdef ELITEFORCE
idPack = FS_idPak(pakbuf, BASEGAME, NUM_ID_PAKS);
idPack = qfalse;
#else
missionPack = FS_idPak(pakbuf, BASETA, NUM_TA_PAKS);
idPack = missionPack;

View file

@ -685,7 +685,7 @@ void SV_Init (void)
#else
sv_master[1] = Cvar_Get("sv_master2", "master.ioquake3.org", 0);
#endif
for(index = 1; index < MAX_MASTER_SERVERS; index++)
for(index = 2; index < MAX_MASTER_SERVERS; index++)
sv_master[index] = Cvar_Get(va("sv_master%d", index + 1), "", CVAR_ARCHIVE);
sv_reconnectlimit = Cvar_Get ("sv_reconnectlimit", "3", 0);

View file

@ -58,13 +58,6 @@ char *Sys_DefaultHomePath(void)
if( ( p = getenv( "HOME" ) ) != NULL )
{
Com_sprintf(homePath, sizeof(homePath), "%s%c", p, PATH_SEP);
#ifdef ELITEFORCE
#ifdef MACOS_X
Q_strcat(homePath, sizeof(homePath), "/Library/Application Support/STVEF");
#else
Q_strcat(homePath, sizeof(homePath), "/.stvef");
#endif
#else
#ifdef MACOS_X
Q_strcat(homePath, sizeof(homePath),
"Library/Application Support/");
@ -78,7 +71,6 @@ char *Sys_DefaultHomePath(void)
Q_strcat(homePath, sizeof(homePath), com_homepath->string);
else
Q_strcat(homePath, sizeof(homePath), HOMEPATH_NAME_UNIX);
#endif
#endif
}
}