19 Dec 2011

This commit is contained in:
g-cont 2011-12-19 00:00:00 +04:00 committed by Alibek Omarov
parent 7739f5d071
commit 4e6fddad7d
13 changed files with 29 additions and 24 deletions

View File

@ -1,4 +1,4 @@
build 1766
build 1770
Client: add command "on"-"off" for virtual CD-player
Client: add command "snapshot" that save screenshots into root folder

View File

@ -40,6 +40,7 @@ GNU General Public License for more details.
#define PARM_SCREEN_HEIGHT 13
#define PARM_MAP_HAS_MIRRORS 14 // current map has mirorrs
#define PARM_CLIENT_INGAME 15
#define PARM_MAX_ENTITIES 16
enum
{

View File

@ -447,7 +447,7 @@ void CL_PlaybackEvent( int flags, const edict_t *pInvoker, word eventindex, floa
args.flags = 0;
args.entindex = invokerIndex;
// UNDONE: restore checks when predicting will be done
// FIXME: restore checks when predicting will be done
// if( !angles || VectorIsNull( angles ))
VectorCopy( cl.refdef.cl_viewangles, args.angles );

View File

@ -476,9 +476,12 @@ void CL_DeltaEntity( sizebuf_t *msg, frame_t *frame, int newnum, entity_state_t
Msg( "Entity %i was removed from server\n", newnum );
else Msg( "Entity %i was removed from delta-message\n", newnum );
#endif
// waiting for static entity implimentation
if( state->number == -1 )
R_RemoveEfrags( ent );
{
ent->curstate.messagenum = 0;
ent->baseline.number = 0;
// R_RemoveEfrags( ent );
}
// tell the client about removed entity
if( clgame.drawFuncs.CL_EntityRemoved )
@ -927,11 +930,21 @@ qboolean CL_GetEntitySpatialization( int entnum, vec3_t origin, float *pradius )
// entity is not present on the client but has valid origin
if( !ent || !ent->index ) return valid_origin;
#if 0
// entity is present on the client but out of PVS
if( ent->curstate.messagenum != cl.parsecount )
return false;
{
// created by map spawn. just of of PVS
if( ent->baseline.number != 0 )
return false;
// entity was created later than sound
// (e.g. EMIT_SOUND called from Spawn)
if( ent->curstate.messagenum == 0 )
return valid_origin;
return false;
}
#endif
// setup origin
VectorAverage( ent->curstate.mins, ent->curstate.maxs, origin );
VectorAdd( origin, ent->curstate.origin, origin );

View File

@ -2674,7 +2674,7 @@ int CL_DecalIndex( int id )
===============
CL_DecalRemoveAll
remove all decals with specified shader
remove all decals with specified texture
===============
*/
void CL_DecalRemoveAll( int textureIndex )

View File

@ -297,7 +297,6 @@ static void CL_DrawSegs( int modelIndex, float frame, int rendermode, const vec3
brightness = bound( 0.0f, brightness, 1.0f );
VectorScale( color, brightness, nextSeg.color );
// UNDONE: Make this a spline instead of just a line?
VectorMA( source, fraction, delta, nextSeg.pos );
// distort using noise
@ -1285,7 +1284,6 @@ void CL_UpdateBeam( BEAM *pbeam, float frametime )
switch( pbeam->type )
{
case TE_BEAMPOINTS:
// UNDONE: Build culling volumes for other types of beams
if( CL_CullBeam( pbeam->source, pbeam->target, false ))
{
pbeam->flags &= ~FBEAM_ISACTIVE; // force to ignore

View File

@ -1336,6 +1336,8 @@ static int GL_RenderGetParm( int parm, int arg )
return world.has_mirrors;
case PARM_CLIENT_INGAME:
return CL_IsInGame();
case PARM_MAX_ENTITIES:
return clgame.maxEntities;
}
return 0;
}

View File

@ -24,6 +24,7 @@ GNU General Public License for more details.
// it's a Valve default value for LoadMapSprite (probably must be power of two)
#define MAPSPRITE_SIZE 128
#define GLARE_FALLOFF 19000.0f
convar_t *r_sprite_lerping;
convar_t *r_sprite_lighting;
@ -742,8 +743,7 @@ static float R_SpriteGlowBlend( vec3_t origin, int rendermode, int renderfx, int
*pscale = 0.0f; // variable sized glow
// UNDONE: Tweak these magic numbers (19000 - falloff & 200 - sprite size)
brightness = 19000.0 / ( dist * dist );
brightness = GLARE_FALLOFF / ( dist * dist );
brightness = bound( 0.01f, brightness, 1.0f );
// make the glow fixed size in screen space, taking into consideration the scale setting.

View File

@ -2612,12 +2612,6 @@ void R_StudioRenderFinal( void )
{
R_StudioSetupModel( i, &m_pBodyPart, &m_pSubModel );
if( m_fDoInterp )
{
// interpolation messes up bounding boxes.
RI.currententity->trivial_accept = 0;
}
GL_SetRenderMode( rendermode );
R_StudioDrawPoints();
GL_StudioDrawShadow();

View File

@ -79,7 +79,7 @@ typedef enum
#include "com_model.h"
#include "crtlib.h"
#define XASH_VERSION 0.95f // engine current version
#define XASH_VERSION 0.91f // engine current version
// PERFORMANCE INFO
#define MIN_FPS 15.0 // host minimum fps value for maxfps.

View File

@ -443,7 +443,7 @@ static void Con_LoadConsoleFont( int fontNumber, cl_font_t *font )
R_GetTextureParms( &fontWidth, NULL, font->hFontTexture );
// setup creditsfont
if( FS_FileExists( va( "fonts/font%i.fnt", fontNumber ), false ))
if( FS_FileExists( va( "fonts/font%i.fnt", fontNumber ), false ) && fontWidth != 0 )
{
byte *buffer;
size_t length;

View File

@ -740,7 +740,7 @@ edict_t *SV_AllocEdict( void )
pEdict = EDICT_NUM( i );
// the first couple seconds of server time can involve a lot of
// freeing and allocating, so relax the replacement policy
if( pEdict->free && ( pEdict->freetime < 2.0f || sv.time - pEdict->freetime > 0.5f ))
if( pEdict->free && ( pEdict->freetime < 2.0f || ( sv.time - pEdict->freetime ) > 0.5f ))
{
SV_InitEdict( pEdict );
return pEdict;
@ -3564,10 +3564,7 @@ void SV_PlaybackEventFull( int flags, const edict_t *pInvoker, word eventindex,
// -1 is because pvs rows are 1 based, not 0 based like leafs
leafnum = Mod_PointLeafnum( viewOrg ) - 1;
if( leafnum != -1 && (!( mask[leafnum>>3] & (1<<( leafnum & 7 )))))
{
Msg( "skipped()\n" );
continue;
}
}
if( flags & FEV_NOTHOST && cl == svs.currentPlayer && cl->local_weapons )

View File

@ -656,7 +656,7 @@ SAVERESTOREDATA *SV_SaveInit( int size )
const int nTokens = 0xfff; // Assume a maximum of 4K-1 symbol table entries(each of some length)
int numents;
if( size <= 0 ) size = 0x80000; // Reserve 512K for now, UNDONE: Shrink this after compressing strings
if( size <= 0 ) size = 0x80000; // Reserve 512K for now
numents = svgame.numEntities;
pSaveData = Mem_Alloc( host.mempool, sizeof(SAVERESTOREDATA) + ( sizeof(ENTITYTABLE) * numents ) + size );