08 Dec 2015
This commit is contained in:
parent
dc90b26c99
commit
f87fd36be7
|
@ -4409,7 +4409,7 @@ static rgbdata_t *R_InitVSDCTCubemap( texFlags_t *flags )
|
||||||
// YY
|
// YY
|
||||||
// ZZ
|
// ZZ
|
||||||
// stores abs(dir.xy), offset.xy/2.5
|
// stores abs(dir.xy), offset.xy/2.5
|
||||||
byte data[4*6] =
|
static byte data[4*6] =
|
||||||
{
|
{
|
||||||
0xFF, 0x00, 0x33, 0x33, // +X: <1, 0>, <0.5, 0.5>
|
0xFF, 0x00, 0x33, 0x33, // +X: <1, 0>, <0.5, 0.5>
|
||||||
0xFF, 0x00, 0x99, 0x33, // -X: <1, 0>, <1.5, 0.5>
|
0xFF, 0x00, 0x99, 0x33, // -X: <1, 0>, <1.5, 0.5>
|
||||||
|
|
|
@ -404,8 +404,10 @@ void VOX_LoadFirstWord( channel_t *pchan, voxword_t *pwords )
|
||||||
// sentence array, and set the channel to point to the
|
// sentence array, and set the channel to point to the
|
||||||
// sentence array
|
// sentence array
|
||||||
while( pwords[i].sfx != NULL )
|
while( pwords[i].sfx != NULL )
|
||||||
pchan->words[i] = pwords[i++];
|
{
|
||||||
|
pchan->words[i] = pwords[i];
|
||||||
|
i++;
|
||||||
|
}
|
||||||
pchan->words[i].sfx = NULL;
|
pchan->words[i].sfx = NULL;
|
||||||
|
|
||||||
pchan->wordIndex = 0;
|
pchan->wordIndex = 0;
|
||||||
|
|
|
@ -48,6 +48,6 @@ int Q_buildnum( void )
|
||||||
|
|
||||||
return b;
|
return b;
|
||||||
#else
|
#else
|
||||||
return 3153;
|
return 3224;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
|
@ -289,6 +289,9 @@ void SV_DisconnectClient( edict_t *pClient )
|
||||||
Mem_Free( pClient->pvPrivateData );
|
Mem_Free( pClient->pvPrivateData );
|
||||||
pClient->pvPrivateData = NULL;
|
pClient->pvPrivateData = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// invalidate serial number
|
||||||
|
pClient->serialnumber++;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -809,16 +812,29 @@ recalc ping on current client
|
||||||
int SV_CalcPing( sv_client_t *cl )
|
int SV_CalcPing( sv_client_t *cl )
|
||||||
{
|
{
|
||||||
float ping = 0;
|
float ping = 0;
|
||||||
int i, count;
|
int i, count, back;
|
||||||
client_frame_t *frame;
|
client_frame_t *frame;
|
||||||
|
|
||||||
// bots don't have a real ping
|
// bots don't have a real ping
|
||||||
if( cl->fakeclient )
|
if( cl->fakeclient || !cl->frames )
|
||||||
return 5;
|
return 5;
|
||||||
|
|
||||||
count = 0;
|
count = 0;
|
||||||
|
|
||||||
for( i = 0; i < SV_UPDATE_BACKUP; i++ )
|
if ( SV_UPDATE_BACKUP <= 31 )
|
||||||
|
{
|
||||||
|
back = SV_UPDATE_BACKUP / 2;
|
||||||
|
if ( back <= 0 )
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
back = 16;
|
||||||
|
}
|
||||||
|
|
||||||
|
for( i = 0; i < back; i++ )
|
||||||
{
|
{
|
||||||
frame = &cl->frames[(cl->netchan.incoming_acknowledged - (i + 1)) & SV_UPDATE_MASK];
|
frame = &cl->frames[(cl->netchan.incoming_acknowledged - (i + 1)) & SV_UPDATE_MASK];
|
||||||
|
|
||||||
|
|
|
@ -438,7 +438,7 @@ void SV_CheckTimeouts( void )
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(( cl->state == cs_connected || cl->state == cs_spawned ) && cl->lastmessage < droppoint )
|
if(( cl->state == cs_connected || cl->state == cs_spawned ) && cl->lastmessage < droppoint && !NET_IsLocalAddress( cl->netchan.remote_address ))
|
||||||
{
|
{
|
||||||
SV_BroadcastPrintf( PRINT_HIGH, "%s timed out\n", cl->name );
|
SV_BroadcastPrintf( PRINT_HIGH, "%s timed out\n", cl->name );
|
||||||
SV_DropClient( cl );
|
SV_DropClient( cl );
|
||||||
|
@ -686,7 +686,7 @@ void SV_Init( void )
|
||||||
rcon_password = Cvar_Get( "rcon_password", "", 0, "remote connect password" );
|
rcon_password = Cvar_Get( "rcon_password", "", 0, "remote connect password" );
|
||||||
sv_stepsize = Cvar_Get( "sv_stepsize", "18", CVAR_ARCHIVE|CVAR_PHYSICINFO, "how high you can step up" );
|
sv_stepsize = Cvar_Get( "sv_stepsize", "18", CVAR_ARCHIVE|CVAR_PHYSICINFO, "how high you can step up" );
|
||||||
sv_newunit = Cvar_Get( "sv_newunit", "0", 0, "sets to 1 while new unit is loading" );
|
sv_newunit = Cvar_Get( "sv_newunit", "0", 0, "sets to 1 while new unit is loading" );
|
||||||
hostname = Cvar_Get( "hostname", "unnamed", CVAR_SERVERNOTIFY|CVAR_SERVERNOTIFY|CVAR_ARCHIVE, "host name" );
|
hostname = Cvar_Get( "hostname", "unnamed", CVAR_SERVERNOTIFY|CVAR_ARCHIVE, "host name" );
|
||||||
timeout = Cvar_Get( "timeout", "125", CVAR_SERVERNOTIFY, "connection timeout" );
|
timeout = Cvar_Get( "timeout", "125", CVAR_SERVERNOTIFY, "connection timeout" );
|
||||||
zombietime = Cvar_Get( "zombietime", "2", CVAR_SERVERNOTIFY, "timeout for clients-zombie (who died but not respawned)" );
|
zombietime = Cvar_Get( "zombietime", "2", CVAR_SERVERNOTIFY, "timeout for clients-zombie (who died but not respawned)" );
|
||||||
sv_pausable = Cvar_Get( "pausable", "1", CVAR_SERVERNOTIFY, "allow players to pause or not" );
|
sv_pausable = Cvar_Get( "pausable", "1", CVAR_SERVERNOTIFY, "allow players to pause or not" );
|
||||||
|
@ -712,7 +712,7 @@ void SV_Init( void )
|
||||||
sv_check_errors = Cvar_Get( "sv_check_errors", "0", CVAR_ARCHIVE, "check edicts for errors" );
|
sv_check_errors = Cvar_Get( "sv_check_errors", "0", CVAR_ARCHIVE, "check edicts for errors" );
|
||||||
physinfo = Cvar_Get( "@physinfo", "0", CVAR_READ_ONLY, "" ); // use ->modified value only
|
physinfo = Cvar_Get( "@physinfo", "0", CVAR_READ_ONLY, "" ); // use ->modified value only
|
||||||
serverinfo = Cvar_Get( "@serverinfo", "0", CVAR_READ_ONLY, "" ); // use ->modified value only
|
serverinfo = Cvar_Get( "@serverinfo", "0", CVAR_READ_ONLY, "" ); // use ->modified value only
|
||||||
public_server = Cvar_Get ("public", "0", 0, "change server type from private to public" );
|
public_server = Cvar_Get ("public", "0", CVAR_SERVERNOTIFY, "change server type from private to public" );
|
||||||
sv_lighting_modulate = Cvar_Get( "r_lighting_modulate", "0.6", CVAR_ARCHIVE, "lightstyles modulate scale" );
|
sv_lighting_modulate = Cvar_Get( "r_lighting_modulate", "0.6", CVAR_ARCHIVE, "lightstyles modulate scale" );
|
||||||
sv_reconnect_limit = Cvar_Get ("sv_reconnect_limit", "3", CVAR_ARCHIVE, "max reconnect attempts" );
|
sv_reconnect_limit = Cvar_Get ("sv_reconnect_limit", "3", CVAR_ARCHIVE, "max reconnect attempts" );
|
||||||
sv_failuretime = Cvar_Get( "sv_failuretime", "0.5", 0, "after this long without a packet from client, don't send any more until client starts sending again" );
|
sv_failuretime = Cvar_Get( "sv_failuretime", "0.5", 0, "after this long without a packet from client, don't send any more until client starts sending again" );
|
||||||
|
|
|
@ -190,7 +190,7 @@ qboolean SV_RunThink( edict_t *ent )
|
||||||
{
|
{
|
||||||
float thinktime;
|
float thinktime;
|
||||||
|
|
||||||
if(!( ent->v.flags & FL_SPECTATOR ))
|
if(!( ent->v.flags & FL_KILLME ))
|
||||||
{
|
{
|
||||||
thinktime = ent->v.nextthink;
|
thinktime = ent->v.nextthink;
|
||||||
if( thinktime <= 0.0f || thinktime > sv.time + host.frametime )
|
if( thinktime <= 0.0f || thinktime > sv.time + host.frametime )
|
||||||
|
@ -205,7 +205,7 @@ qboolean SV_RunThink( edict_t *ent )
|
||||||
svgame.dllFuncs.pfnThink( ent );
|
svgame.dllFuncs.pfnThink( ent );
|
||||||
}
|
}
|
||||||
|
|
||||||
if( ent->v.flags & FL_SPECTATOR )
|
if( ent->v.flags & FL_KILLME )
|
||||||
SV_FreeEdict( ent );
|
SV_FreeEdict( ent );
|
||||||
|
|
||||||
return !ent->free;
|
return !ent->free;
|
||||||
|
|
|
@ -124,12 +124,7 @@ static void UI_LanGame_GetGamesList( void )
|
||||||
{
|
{
|
||||||
if( i >= UI_MAX_SERVERS ) break;
|
if( i >= UI_MAX_SERVERS ) break;
|
||||||
info = uiStatic.serverNames[i];
|
info = uiStatic.serverNames[i];
|
||||||
#if 1
|
|
||||||
// NOTE: Xash3D is support hot switching between games in multiplayer
|
|
||||||
// but this feature not detail tested and may be bugly
|
|
||||||
if( stricmp( gMenu.m_gameinfo.gamefolder, Info_ValueForKey( info, "gamedir" )))
|
|
||||||
continue; // filter by game
|
|
||||||
#endif
|
|
||||||
StringConcat( uiLanGame.gameDescription[i], Info_ValueForKey( info, "host" ), GAME_LENGTH );
|
StringConcat( uiLanGame.gameDescription[i], Info_ValueForKey( info, "host" ), GAME_LENGTH );
|
||||||
StringConcat( uiLanGame.gameDescription[i], uiEmptyString, GAME_LENGTH );
|
StringConcat( uiLanGame.gameDescription[i], uiEmptyString, GAME_LENGTH );
|
||||||
StringConcat( uiLanGame.gameDescription[i], Info_ValueForKey( info, "map" ), MAPNAME_LENGTH );
|
StringConcat( uiLanGame.gameDescription[i], Info_ValueForKey( info, "map" ), MAPNAME_LENGTH );
|
||||||
|
|
Reference in New Issue