Elite Force white space clean up

Also fixed some code to match ioq3 (a few comments, a printf, ..).
This commit is contained in:
Zack Middleton 2014-10-29 10:13:04 -05:00
parent 80986cbf21
commit b7cd6b6088
33 changed files with 163 additions and 129 deletions

View file

@ -114,3 +114,4 @@ void BotSetChatName(int chatstate, char *name);
#else
void BotSetChatName(int chatstate, char *name, int client);
#endif

View file

@ -172,9 +172,10 @@ typedef enum {
CG_GETCAMERAINFO,
*/
#else
CG_R_REGISTERSHADER3D, //59
CG_CVAR_SET_NO_MODIFY, // 60
CG_R_REGISTERSHADER3D, //59
CG_CVAR_SET_NO_MODIFY, // 60
#endif
CG_MEMSET = 100,
CG_MEMCPY,
CG_STRNCPY,
@ -231,6 +232,7 @@ typedef enum {
CG_LAST_ATTACKER,
// int (*CG_LastAttacker)( void );
#ifndef ELITEFORCE
CG_KEY_EVENT,
// void (*CG_KeyEvent)( int key, qboolean down );

View file

@ -549,11 +549,11 @@ intptr_t CL_CgameSystemCalls( intptr_t *args ) {
return S_RegisterSound( VMA(1), args[2] );
case CG_S_STARTBACKGROUNDTRACK:
#ifdef ELITEFORCE
if(!VMA(1) || !*((char *) VMA(1)))
if ( !VMA(1) || !*((char *) VMA(1)) )
S_StopBackgroundTrack();
else
#endif
S_StartBackgroundTrack(VMA(1), VMA(2));
S_StartBackgroundTrack( VMA(1), VMA(2) );
return 0;
case CG_R_LOADWORLDMAP:
re.LoadWorld( VMA(1) );
@ -645,6 +645,7 @@ intptr_t CL_CgameSystemCalls( intptr_t *args ) {
#endif
case CG_MEMSET:
Com_Memset( VMA(1), args[2], args[3] );
return 0;
@ -669,6 +670,7 @@ intptr_t CL_CgameSystemCalls( intptr_t *args ) {
#ifndef ELITEFORCE
case CG_ACOS:
return FloatAsInt( Q_acos( VMF(1) ) );
case CG_PC_ADD_GLOBAL_DEFINE:
return botlib_export->PC_AddGlobalDefine( VMA(1) );
case CG_PC_LOAD_SOURCE:
@ -732,6 +734,7 @@ intptr_t CL_CgameSystemCalls( intptr_t *args ) {
case CG_CVAR_SET_NO_MODIFY:
return qfalse;
#endif
default:
assert(0);
Com_Error( ERR_DROP, "Bad cgame system trap: %ld", (long int) args[0] );

View file

@ -665,7 +665,6 @@ void Con_DrawSolidConsole( float frac ) {
// draw the background
y = frac * SCREEN_HEIGHT;
if ( y < 1 ) {
y = 0;
}
@ -685,6 +684,8 @@ void Con_DrawSolidConsole( float frac ) {
color[2] = 0;
color[3] = 1;
SCR_FillRect( 0, y, SCREEN_WIDTH, 2, color );
// draw the version number
re.SetColor( g_color_table[ColorIndex(COLOR_RED)] );

View file

@ -1252,6 +1252,7 @@ void CL_KeyDownEvent( int key, unsigned time )
return;
}
#endif
if ( !( Key_GetCatcher( ) & KEYCATCH_UI ) ) {
if ( clc.state == CA_ACTIVE && !clc.demoplaying ) {
VM_Call( uivm, UI_SET_ACTIVE_MENU, UIMENU_INGAME );
@ -1263,6 +1264,7 @@ void CL_KeyDownEvent( int key, unsigned time )
}
return;
}
#ifdef ELITEFORCE
VM_Call( uivm, UI_KEY_EVENT, key );
#else

View file

@ -733,7 +733,6 @@ void CL_Record_f( void ) {
if ( Cmd_Argc() == 2 ) {
s = Cmd_Argv(1);
Q_strncpyz( demoName, s, sizeof( demoName ) );
#ifdef LEGACY_PROTOCOL
if(clc.compat)
#ifdef ELITEFORCE
@ -2432,7 +2431,7 @@ void CL_CheckForResend( void ) {
data[10+i] = 0;
// NOTE TTimo don't forget to set the right data length!
#ifdef ELITEFORCE
#ifdef ELITEFORCE
NET_OutOfBandPrint( NS_CLIENT, clc.serverAddress, "%s", data);
#else
NET_OutOfBandData( NS_CLIENT, clc.serverAddress, (byte *) &data[0], i+10 );
@ -2603,6 +2602,7 @@ void CL_ServersResponsePacket( const netadr_t* from, msg_t *msg, qboolean extend
addresses[numservers].port += *buffptr++;
addresses[numservers].port = BigShort( addresses[numservers].port );
#endif
// syntax check
if (*buffptr != '\\' && *buffptr != '/')
break;

View file

@ -37,7 +37,6 @@ CL_Netchan_Encode
==============
*/
static void CL_Netchan_Encode( msg_t *msg ) {
int serverId, messageAcknowledge, reliableAcknowledge;
int i, index, srdc, sbit, soob;
@ -92,7 +91,6 @@ CL_Netchan_Decode
==============
*/
static void CL_Netchan_Decode( msg_t *msg ) {
long reliableAcknowledge, i, index;
byte key, *string;
@ -186,6 +184,7 @@ qboolean CL_Netchan_Process( netchan_t *chan, msg_t *msg ) {
ret = Netchan_Process( chan, msg );
if (!ret)
return qfalse;
#ifndef ELITEFORCE
#ifdef LEGACY_PROTOCOL
if(chan->compat)

View file

@ -486,7 +486,7 @@ void CL_ParseGamestate( msg_t *msg ) {
cmd = MSG_ReadByte( msg );
#ifdef ELITEFORCE
if((msg->compat && cmd <= 0) || cmd == svc_EOF)
if ( ( msg->compat && cmd <= 0 ) || cmd == svc_EOF )
#else
if ( cmd == svc_EOF )
#endif
@ -913,7 +913,7 @@ void CL_ParseServerMessage( msg_t *msg ) {
cmd = MSG_ReadByte( msg );
#ifdef ELITEFORCE
if(cmd == svc_EOF || (msg->compat && cmd == -1))
if ( cmd == svc_EOF || ( msg->compat && cmd == -1 ) )
#else
if ( cmd == svc_EOF)
#endif

View file

@ -84,6 +84,7 @@ void LAN_SaveServersToCache( void ) {
FS_FCloseFile(fileOut);
}
#ifndef ELITEFORCE
/*
====================
@ -206,6 +207,7 @@ static void LAN_RemoveServer(int source, const char *addr) {
}
#endif
/*
====================
LAN_GetServerCount
@ -226,6 +228,7 @@ static int LAN_GetServerCount( int source ) {
}
return 0;
}
/*
====================
LAN_GetLocalServerAddressString
@ -365,6 +368,7 @@ static serverInfo_t *LAN_GetServerPtr( int source, int n ) {
}
return NULL;
}
/*
====================
LAN_CompareServers
@ -631,7 +635,7 @@ static void Key_GetBindingBuf( int keynum, char *buf, int buflen ) {
CLUI_GetCDKey
====================
*/
#ifndef ELITEFORCE
#ifndef ELITEFORCE
static void CLUI_GetCDKey( char *buf, int buflen ) {
#ifndef STANDALONE
cvar_t *fs;
@ -647,7 +651,8 @@ static void CLUI_GetCDKey( char *buf, int buflen ) {
*buf = 0;
#endif
}
#endif
#endif
/*
====================
@ -966,6 +971,7 @@ intptr_t CL_UISystemCalls( intptr_t *args ) {
case UI_LAN_GETSERVERADDRESSSTRING:
LAN_GetServerAddressString( args[1], args[2], VMA(3), args[4] );
return 0;
case UI_LAN_GETSERVERINFO:
LAN_GetServerInfo( args[1], args[2], VMA(3), args[4] );
return 0;
@ -1002,6 +1008,7 @@ intptr_t CL_UISystemCalls( intptr_t *args ) {
CLUI_GetCDKey( VMA(1), args[2] );
return 0;
#endif
case UI_SET_CDKEY:
#ifndef STANDALONE
CLUI_SetCDKey( VMA(1) );
@ -1010,6 +1017,7 @@ intptr_t CL_UISystemCalls( intptr_t *args ) {
#endif
#endif
return 0;
#ifndef ELITEFORCE
case UI_SET_PBCLSTATUS:
return 0;

View file

@ -575,7 +575,7 @@ void SCR_DrawNamedPic( float x, float y, float width, float height, const char *
void SCR_DrawBigString( int x, int y, const char *s, float alpha, qboolean noColorEscape ); // draws a string with embedded color control characters with fade
void SCR_DrawBigStringColor( int x, int y, const char *s, vec4_t color, qboolean noColorEscape ); // ignores embedded color control characters
#ifdef ELITEFORCE
void SCR_DrawSmallString( int x, int y, const char *s, float alpha ); // draws a string with embedded color control characters with fade
void SCR_DrawSmallString( int x, int y, const char *s, float alpha ); // draws a string with embedded color control characters with fade
#endif
void SCR_DrawSmallStringExt( int x, int y, const char *string, float *setColor, qboolean forceColor, qboolean noColorEscape );
void SCR_DrawSmallChar( int x, int y, int ch );

View file

@ -200,7 +200,6 @@ void S_CodecRegister(snd_codec_t *codec)
S_CodecLoad
=================
*/
void *S_CodecLoad(const char *filename, snd_info_t *info)
{
return S_CodecGetSound(filename, info);

View file

@ -375,7 +375,7 @@ sfxHandle_t S_Base_RegisterSound( const char *name, qboolean compressed ) {
sfx->inMemory = qfalse;
sfx->soundCompressed = compressed;
S_memoryLoad(sfx);
S_memoryLoad(sfx);
if ( sfx->defaultSound ) {
#ifdef ELITEFORCE

View file

@ -540,8 +540,8 @@ sfxHandle_t S_AL_RegisterSound( const char *sample, qboolean compressed )
S_AL_BufferLoad(sfx, s_alPrecache->integer);
#ifdef ELITEFORCE
if(! *knownSfx[sfx].filename)
return 0;
if (!*knownSfx[sfx].filename)
return 0;
#endif
knownSfx[sfx].lastUsedTime = Com_Milliseconds();

View file

@ -677,6 +677,7 @@ typedef enum {
} gameImport_t;
#endif
//
// functions exported by the game subsystem
//

View file

@ -2456,6 +2456,7 @@ void Com_ReadCDKey( const char *filename ) {
fileHandle_t f;
char buffer[33];
char fbuffer[MAX_OSPATH];
#ifdef ELITEFORCE
int index = 0;
char curchar;
@ -2585,17 +2586,20 @@ static void Com_WriteCDKey( const char *filename, const char *ikey ) {
mode_t savedumask;
#endif
#ifdef ELITEFORCE
sprintf(fbuffer, "%s/efq3.key", filename);
#else
Com_sprintf(fbuffer, sizeof(fbuffer), "%s/q3key", filename);
#endif
#ifdef ELITEFORCE
Q_strncpyz( key, ikey, 23 );
key[22] = '\0';
#else
Q_strncpyz( key, ikey, 17 );
if(!CL_CDKeyValidate(key, NULL) ) {
return;
}

View file

@ -3410,7 +3410,6 @@ static void FS_CheckPak0( void )
{
if(pakBasename[3] == '0')
{
Com_Printf("\n\n"
"**************************************************\n"
"WARNING: " BASEGAME "/pak0.pk3 is present but its checksum (%u)\n"
@ -3476,11 +3475,13 @@ static void FS_CheckPak0( void )
"\"pak0.pk3\" is missing. Please copy it "
"from your legitimate EliteForce CDROM. ");
}
if((foundPak & 0x1fe) != 0x1fe)
{
Q_strcat(errorText, sizeof(errorText),
"Patch files are missing. Please\n"
"copy the .pk3 files from EliteForce patch 1.2 to baseEF.\n"); }
"copy the .pk3 files from EliteForce patch 1.2 to baseEF.\n");
}
Q_strcat(errorText, sizeof(errorText),
va("Also check that your EliteForce executable is in "
@ -3534,7 +3535,6 @@ static void FS_CheckPak0( void )
{
if(pakBasename[3] == '0')
{
Com_Printf("\n\n"
"**************************************************\n"
"WARNING: " BASEGAME "/pak0.pk3 is present but its checksum (%u)\n"
@ -3651,6 +3651,7 @@ static void FS_CheckPak0( void )
"\"pak0.pk3\" is missing. Please copy it "
"from your legitimate Q3 CDROM. ");
}
if((foundPak & 0x1fe) != 0x1fe)
{
Q_strcat(errorText, sizeof(errorText),
@ -4227,7 +4228,6 @@ void FS_FilenameCompletion( const char *dir, const char *ext,
callback( filename );
}
FS_FreeFileList( filenames );
}
const char *FS_GetCurrentGameDir(void)

View file

@ -320,6 +320,7 @@ int MSG_ReadBits( msg_t *msg, int bits ) {
}
//================================================================================
//
@ -385,7 +386,7 @@ void MSG_WriteString( msg_t *sb, const char *s ) {
MSG_WriteData (sb, "", 1);
} else {
#ifdef ELITEFORCE
int l;
int l;
#else
int l,i;
#endif
@ -417,7 +418,7 @@ void MSG_WriteBigString( msg_t *sb, const char *s ) {
MSG_WriteData (sb, "", 1);
} else {
#ifdef ELITEFORCE
int l;
int l;
#else
int l,i;
#endif
@ -550,6 +551,7 @@ char *MSG_ReadString( msg_t *msg ) {
c = '.';
}
#endif
string[l] = c;
l++;
} while (l < sizeof(string)-1);
@ -620,6 +622,7 @@ char *MSG_ReadStringLine( msg_t *msg ) {
c = '.';
}
#endif
string[l] = c;
l++;
} while (l < sizeof(string)-1);
@ -838,11 +841,7 @@ void MSG_ReadDeltaUsercmd( msg_t *msg, usercmd_t *from, usercmd_t *to ) {
/*
=====================
<<<<<<< Updated upstream
MSG_WriteDeltaUsercmd
=======
MSG_WriteDeltaUsercmdKey
>>>>>>> Stashed changes
=====================
*/
void MSG_WriteDeltaUsercmdKey( msg_t *msg, int key, usercmd_t *from, usercmd_t *to ) {
@ -884,7 +883,7 @@ void MSG_WriteDeltaUsercmdKey( msg_t *msg, int key, usercmd_t *from, usercmd_t *
/*
=====================
MSG_ReadDeltaUsercmd
MSG_ReadDeltaUsercmdKey
=====================
*/
void MSG_ReadDeltaUsercmdKey( msg_t *msg, int key, usercmd_t *from, usercmd_t *to ) {
@ -1112,6 +1111,7 @@ netField_t entityStateFields[] =
};
#endif
// if (int)f == f and (int)f + ( 1<<(FLOAT_INT_BITS-1) ) < ( 1 << FLOAT_INT_BITS )
// the float will be sent with FLOAT_INT_BITS, otherwise all 32 bits will be sent
#define FLOAT_INT_BITS 13
@ -1137,8 +1137,8 @@ void MSG_WriteDeltaEntity( msg_t *msg, struct entityState_s *from, struct entity
float fullFloat;
int *fromF, *toF;
#ifdef ELITEFORCE
byte vector[PVECTOR_BYTES];
int vectorIndex = -1;
byte vector[PVECTOR_BYTES];
int vectorIndex = -1;
#endif
numFields = ARRAY_LEN( entityStateFields );
@ -1163,7 +1163,7 @@ void MSG_WriteDeltaEntity( msg_t *msg, struct entityState_s *from, struct entity
Com_Error (ERR_FATAL, "MSG_WriteDeltaEntity: Bad entity number: %i", to->number );
}
#ifdef ELITEFORCE
#ifdef ELITEFORCE
if(msg->compat)
Com_Memset(vector, 0, sizeof(vector));
#endif
@ -1337,9 +1337,9 @@ void MSG_ReadDeltaEntity( msg_t *msg, entityState_t *from, entityState_t *to,
int trunc;
int startBit, endBit;
#ifdef ELITEFORCE
int vectorIndex;
byte vector_space[PVECTOR_BYTES];
byte *vector = vector_space;
int vectorIndex;
byte vector_space[PVECTOR_BYTES];
byte *vector = vector_space;
#endif
if ( number < 0 || number >= MAX_GENTITIES) {
@ -1608,6 +1608,7 @@ netField_t playerStateFields[] =
{ PSF(loopSound), 16 }
};
#endif
/*
=============
MSG_WriteDeltaPlayerstate
@ -1830,8 +1831,8 @@ void MSG_ReadDeltaPlayerstate (msg_t *msg, playerState_t *from, playerState_t *t
{
lc = MSG_ReadByte(msg);
if(lc > numFields || lc < 0)
Com_Error(ERR_DROP, "invalid entityState field count");
if(lc > numFields || lc < 0)
Com_Error(ERR_DROP, "invalid playerState field count");
}
for ( i = 0, field = playerStateFields ; i < lc ; i++, field++ ) {
@ -1883,6 +1884,7 @@ void MSG_ReadDeltaPlayerstate (msg_t *msg, playerState_t *from, playerState_t *t
}
#endif
// read the arrays
#ifdef ELITEFORCE
if(msg->compat || MSG_ReadBits( msg, 1 ))

View file

@ -1158,9 +1158,9 @@ typedef struct playerState_s {
vec3_t velocity;
int weaponTime;
#ifdef ELITEFORCE
int rechargeTime; // for the phaser
short useTime; // use debounce
int introTime; // for the holodoor
int rechargeTime; // for the phaser
short useTime; // use debounce
int introTime; // for the holodoor
#endif
int gravity;
int speed;
@ -1263,11 +1263,11 @@ typedef struct playerState_s {
// usercmd_t is sent to the server each client frame
#ifdef ELITEFORCE
typedef struct usercmd_s {
int serverTime;
byte buttons;
byte weapon;
int angles[3];
signed char forwardmove, rightmove, upmove;
int serverTime;
byte buttons;
byte weapon;
int angles[3];
signed char forwardmove, rightmove, upmove;
} usercmd_t;
#else
typedef struct usercmd_s {
@ -1278,6 +1278,7 @@ typedef struct usercmd_s {
signed char forwardmove, rightmove, upmove;
} usercmd_t;
#endif
//===================================================================
// if entityState->solid == SOLID_BMODEL, modelindex is an inline model number

View file

@ -24,7 +24,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#define __TR_TYPES_H
#define MAX_DLIGHTS 32 // can't be increased, because bit flags are used on surfaces
#define MAX_DLIGHTS 32 // can't be increased, because bit flags are used on surfaces
#define REFENTITYNUM_BITS 10 // can't be increased without changing drawsurf bit packing
#define REFENTITYNUM_MASK ((1<<REFENTITYNUM_BITS) - 1)
@ -46,15 +46,15 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
// projection matrix won't be hacked to reduce the stereo separation as
// is done for the gun.
#else
#define RF_CROSSHAIR 0x0010
#define RF_CROSSHAIR 0x0010
#endif
#define RF_NOSHADOW 0x0040 // don't add stencil shadows
#define RF_LIGHTING_ORIGIN 0x0080 // use refEntity->lightingOrigin instead of refEntity->origin
// for lighting. This allows entities to sink into the floor
// with their origin going solid, and allows all parts of a
// player to get the same lighting
// for lighting. This allows entities to sink into the floor
// with their origin going solid, and allows all parts of a
// player to get the same lighting
#define RF_SHADOW_PLANE 0x0100 // use refEntity->shadowPlane
#define RF_WRAP_FRAMES 0x0200 // mod the model frames by the maxframes to allow continuous
@ -65,8 +65,8 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#endif
// refdef flags
#define RDF_NOWORLDMODEL 1 // used for player configuration screen
#define RDF_HYPERSPACE 4 // teleportation effect
#define RDF_NOWORLDMODEL 0x0001 // used for player configuration screen
#define RDF_HYPERSPACE 0x0004 // teleportation effect
typedef struct {
vec3_t xyz;
@ -82,23 +82,23 @@ typedef struct poly_s {
#ifdef ELITEFORCE
typedef enum {
RT_MODEL,
RT_SPRITE,
RT_ORIENTEDSPRITE, // Replaces RT_POLY, which wasn't used. --Pat
RT_ALPHAVERTPOLY, // Individual alpha levels on each vertex
RT_BEAM,
RT_RAIL_CORE,
RT_RAIL_RINGS,
RT_LIGHTNING,
RT_PORTALSURFACE, // doesn't draw anything, just info for portals
RT_LINE, // New type for Trek MP --Pat
RT_ORIENTEDLINE,
RT_LINE2, // New line type for Trek MP, with taper support --Pat
RT_BEZIER, // what he said --keith
RT_CYLINDER, // Yet another Trek primitive!
RT_ELECTRICITY, // Yet another Trek primitive!
RT_MODEL,
RT_SPRITE,
RT_ORIENTEDSPRITE, // Replaces RT_POLY, which wasn't used. --Pat
RT_ALPHAVERTPOLY, // Individual alpha levels on each vertex
RT_BEAM,
RT_RAIL_CORE,
RT_RAIL_RINGS,
RT_LIGHTNING,
RT_PORTALSURFACE, // doesn't draw anything, just info for portals
RT_LINE, // New type for Trek MP --Pat
RT_ORIENTEDLINE,
RT_LINE2, // New line type for Trek MP, with taper support --Pat
RT_BEZIER, // what he said --keith
RT_CYLINDER, // Yet another Trek primitive!
RT_ELECTRICITY, // Yet another Trek primitive!
RT_MAX_REF_ENTITY_TYPE
RT_MAX_REF_ENTITY_TYPE
} refEntityType_t;
#else
typedef enum {
@ -147,44 +147,44 @@ typedef struct {
// extra sprite information
#ifdef ELITEFORCE
union
{
struct
{
float rotation;
float radius;
byte vertRGBA[4][4];
} sprite;
struct
{
float width;
float width2;
float stscale;
} line;
struct // that whole put-the-opening-brace-on-the-same-line-as-the-beginning-of-the-definition coding style is fecal // I agree.
{
float width;
vec3_t control1;
vec3_t control2;
} bezier;
struct
{
float width;
float width2;
float stscale;
float height;
float bias;
qboolean wrap;
} cylinder;
struct
{
float width;
float deviation;
float stscale;
qboolean wrap;
qboolean taper;
} electricity;
} data;
union
{
struct
{
float rotation;
float radius;
byte vertRGBA[4][4];
} sprite;
struct
{
float width;
float width2;
float stscale;
} line;
struct // that whole put-the-opening-brace-on-the-same-line-as-the-beginning-of-the-definition coding style is fecal // I agree.
{
float width;
vec3_t control1;
vec3_t control2;
} bezier;
struct
{
float width;
float width2;
float stscale;
float height;
float bias;
qboolean wrap;
} cylinder;
struct
{
float width;
float deviation;
float stscale;
qboolean wrap;
qboolean taper;
} electricity;
} data;
#else
float radius;
float rotation;

View file

@ -944,7 +944,7 @@ typedef struct {
float triangleTable[FUNCTABLE_SIZE];
float sawToothTable[FUNCTABLE_SIZE];
float inverseSawToothTable[FUNCTABLE_SIZE];
float noiseTable[FUNCTABLE_SIZE];
float noiseTable[FUNCTABLE_SIZE];
float fogTable[FOG_TABLE_SIZE];
} trGlobals_t;

View file

@ -1719,6 +1719,7 @@ static void RB_SurfaceGrid( srfGridMesh_t *cv ) {
}
}
/*
===========================================================================

View file

@ -1651,7 +1651,7 @@ typedef struct {
float triangleTable[FUNCTABLE_SIZE];
float sawToothTable[FUNCTABLE_SIZE];
float inverseSawToothTable[FUNCTABLE_SIZE];
float noiseTable[FUNCTABLE_SIZE];
float noiseTable[FUNCTABLE_SIZE];
float fogTable[FOG_TABLE_SIZE];
} trGlobals_t;

View file

@ -2067,6 +2067,7 @@ static void RB_SurfaceGrid( srfBspSurface_t *srf ) {
}
}
/*
===========================================================================

View file

@ -179,6 +179,7 @@ void SV_GetChallenge(netadr_t from)
Com_DPrintf( "authorize server timed out\n" );
else
{
// otherwise send their ip to the authorize server
#ifndef ELITEFORCE
cvar_t *fs;
char game[1024];
@ -186,7 +187,6 @@ void SV_GetChallenge(netadr_t from)
Com_DPrintf( "sending getIpAuthorize for %s\n", NET_AdrToString( from ));
// otherwise send their ip to the authorize server
#ifdef ELITEFORCE
NET_OutOfBandPrint( NS_SERVER, svs.authorizeAddress,
"getIpAuthorize %i %i.%i.%i.%i ", challenge->challenge,
@ -204,6 +204,7 @@ void SV_GetChallenge(netadr_t from)
"getIpAuthorize %i %i.%i.%i.%i %s 0 %s", challenge->challenge,
from.ip[0], from.ip[1], from.ip[2], from.ip[3], game, sv_strictAuth->string );
#endif
return;
}
}
@ -554,7 +555,6 @@ gotnewcl:
ent = SV_GentityNum( clientNum );
newcl->gentity = ent;
// save the challenge
newcl->challenge = challenge;
@ -2043,7 +2043,7 @@ void SV_ExecuteClientMessage( client_t *cl, msg_t *msg ) {
c = MSG_ReadByte( msg );
#ifdef ELITEFORCE
if(msg->compat && c == -1)
if ( msg->compat && c == -1 )
c = clc_EOF;
#endif
if ( c == clc_EOF )

View file

@ -339,6 +339,7 @@ intptr_t SV_GameSystemCalls( intptr_t *args ) {
case G_FS_SEEK:
return FS_Seek( args[1], args[2], args[3] );
#endif
case G_LOCATE_GAME_DATA:
SV_LocateGameData( VMA(1), args[2], args[3], VMA(4), args[5] );
return 0;
@ -435,6 +436,7 @@ intptr_t SV_GameSystemCalls( intptr_t *args ) {
Q_SnapVector(VMA(1));
return 0;
#endif
//====================================
case BOTLIB_SETUP:
@ -461,6 +463,7 @@ intptr_t SV_GameSystemCalls( intptr_t *args ) {
case BOTLIB_PC_SOURCE_FILE_AND_LINE:
return botlib_export->PC_SourceFileAndLine( args[1], VMA(2), VMA(3) );
#endif
case BOTLIB_START_FRAME:
return botlib_export->BotLibStartFrame( VMF(1) );
case BOTLIB_LOAD_MAP:
@ -477,6 +480,7 @@ intptr_t SV_GameSystemCalls( intptr_t *args ) {
case BOTLIB_USER_COMMAND:
SV_ClientThink( &svs.clients[args[1]], VMA(2) );
return 0;
#ifndef ELITEFORCE
case BOTLIB_AAS_BBOX_AREAS:
return botlib_export->aas.AAS_BBoxAreas( VMA(1), VMA(2), VMA(3), args[4] );
@ -530,6 +534,7 @@ intptr_t SV_GameSystemCalls( intptr_t *args ) {
case BOTLIB_AAS_PREDICT_ROUTE:
return botlib_export->aas.AAS_PredictRoute( VMA(1), args[2], VMA(3), args[4], args[5], args[6], args[7], args[8], args[9], args[10], args[11] );
#endif
case BOTLIB_AAS_SWIMMING:
return botlib_export->aas.AAS_Swimming( VMA(1) );
case BOTLIB_AAS_PREDICT_CLIENT_MOVEMENT:
@ -877,6 +882,7 @@ intptr_t SV_GameSystemCalls( intptr_t *args ) {
botlib_export->ea.EA_Attack( args[1] );
return 0;
#endif
default:
Com_Error( ERR_DROP, "Bad game system trap: %ld", (long int) args[0] );
}

View file

@ -320,6 +320,7 @@ void SV_MasterHeartbeat(const char *message)
// this command should be changed if the server info / status format
// ever incompatably changes
#ifdef ELITEFORCE
if(adr[i][0].type != NA_BAD)
NET_OutOfBandPrint(NS_SERVER, adr[i][0], "\\heartbeat\\%d\\gamename\\%s\\",

View file

@ -134,6 +134,7 @@ static void SV_Netchan_Decode( client_t *client, msg_t *msg ) {
#endif
/*
=================
SV_Netchan_FreeQueue
@ -273,12 +274,14 @@ qboolean SV_Netchan_Process( client_t *client, msg_t *msg ) {
ret = Netchan_Process( &client->netchan, msg );
if (!ret)
return qfalse;
#ifndef ELITEFORCE
#ifdef LEGACY_PROTOCOL
if(client->compat)
SV_Netchan_Decode(client, msg);
#endif
#endif
return qtrue;
}

View file

@ -155,11 +155,10 @@ static void SV_WriteSnapshotToClient( client_t *client, msg_t *msg ) {
MSG_WriteByte (msg, svc_snapshot);
#ifdef ELITEFORCE
if(msg->compat)
#endif
if(msg->compat)
#endif
MSG_WriteLong( msg, client->lastClientCommand );
// NOTE, MRE: now sent at the start of every message from server to client
// let the client know which reliable clientCommands we have received
//MSG_WriteLong( msg, client->lastClientCommand );