16 Apr 2011
This commit is contained in:
parent
7d6cc69f68
commit
aa9d9004c6
|
@ -1,4 +1,4 @@
|
|||
build ????
|
||||
build 1529
|
||||
|
||||
FS: add "fallback_dir" option
|
||||
Server: fix func_pushable interaction with movers. Add new cvar "sv_allow_rotate_pushables"
|
||||
|
@ -10,6 +10,7 @@ Render: implement "envshot" and "skyshot" commands for make cubemaps or skyboxes
|
|||
Server: fix remote connection (rcon)
|
||||
Render: add glare reduction option in menu
|
||||
Server: fix FindEntityInSphere bug (satchel issues in multiplayer)
|
||||
GameUI: added to scrollbar in srcoll lists (thx ADAMIX)
|
||||
|
||||
build 1516
|
||||
|
||||
|
|
|
@ -567,6 +567,7 @@ extern convar_t *gl_texturemode;
|
|||
extern convar_t *gl_texture_lodbias;
|
||||
extern convar_t *gl_showtextures;
|
||||
extern convar_t *gl_compress_textures;
|
||||
extern convar_t *gl_wireframe;
|
||||
extern convar_t *gl_allow_static;
|
||||
extern convar_t *gl_picmip;
|
||||
extern convar_t *gl_skymip;
|
||||
|
|
|
@ -290,12 +290,12 @@ void R_LightForPoint( const vec3_t point, color24 *ambientLight, qboolean invLig
|
|||
VectorCopy( point, end );
|
||||
if( invLight )
|
||||
{
|
||||
start[2] = point[2] - 1;
|
||||
start[2] = point[2] - 64;
|
||||
end[2] = point[2] + 8192;
|
||||
}
|
||||
else
|
||||
{
|
||||
start[2] = point[2] + 1;
|
||||
start[2] = point[2] + 64;
|
||||
end[2] = point[2] - 8192;
|
||||
}
|
||||
|
||||
|
@ -344,9 +344,7 @@ void R_LightForPoint( const vec3_t point, color24 *ambientLight, qboolean invLig
|
|||
VectorCopy( end_l, end );
|
||||
}
|
||||
|
||||
r_pointColor[0] = RI.refdef.movevars->skycolor_r;
|
||||
r_pointColor[1] = RI.refdef.movevars->skycolor_g;
|
||||
r_pointColor[2] = RI.refdef.movevars->skycolor_b;
|
||||
VectorClear( r_pointColor );
|
||||
|
||||
if( R_RecursiveLightPoint( pmodel, pnodes, start, end ))
|
||||
{
|
||||
|
|
|
@ -1571,6 +1571,48 @@ void R_RecursiveWorldNode( mnode_t *node, uint clipflags )
|
|||
R_RecursiveWorldNode( node->children[!side], clipflags );
|
||||
}
|
||||
|
||||
/*
|
||||
=============
|
||||
R_DrawTriangleOutlines
|
||||
=============
|
||||
*/
|
||||
void R_DrawTriangleOutlines( void )
|
||||
{
|
||||
int i, j;
|
||||
glpoly_t *p;
|
||||
|
||||
if( !gl_wireframe->integer )
|
||||
return;
|
||||
|
||||
pglDisable( GL_TEXTURE_2D );
|
||||
pglDisable( GL_DEPTH_TEST );
|
||||
pglColor4f( 1.0f, 1.0f, 1.0f, 1.0f );
|
||||
pglPolygonMode( GL_FRONT_AND_BACK, GL_LINE );
|
||||
|
||||
for( i = 0; i < MAX_LIGHTMAPS; i++ )
|
||||
{
|
||||
msurface_t *surf;
|
||||
float *v;
|
||||
|
||||
for( surf = gl_lms.lightmap_surfaces[i]; surf != NULL; surf = surf->lightmapchain )
|
||||
{
|
||||
p = surf->polys;
|
||||
for( ; p != NULL; p = p->chain )
|
||||
{
|
||||
pglBegin( GL_POLYGON );
|
||||
v = p->verts[0];
|
||||
for( j = 0; j < p->numverts; j++, v += VERTEXSIZE )
|
||||
pglVertex3fv( v );
|
||||
pglEnd ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pglPolygonMode( GL_FRONT_AND_BACK, GL_FILL );
|
||||
pglEnable( GL_DEPTH_TEST );
|
||||
pglEnable( GL_TEXTURE_2D );
|
||||
}
|
||||
|
||||
/*
|
||||
=============
|
||||
R_DrawWorld
|
||||
|
@ -1607,6 +1649,8 @@ void R_DrawWorld( void )
|
|||
if( skychain )
|
||||
R_DrawSkyBox();
|
||||
skychain = NULL;
|
||||
|
||||
R_DrawTriangleOutlines ();
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -2075,6 +2075,9 @@ static model_t *R_StudioSetupPlayerModel( int index )
|
|||
if( !Q_stricmp( info->model, "player" )) Q_strncpy( modelpath, "models/player.mdl", sizeof( modelpath ));
|
||||
else Q_snprintf( modelpath, sizeof( modelpath ), "models/player/%s/%s.mdl", info->model, info->model );
|
||||
|
||||
if( !FS_FileExists( modelpath, false ))
|
||||
return NULL;
|
||||
|
||||
return Mod_ForName( modelpath, false );
|
||||
}
|
||||
|
||||
|
|
|
@ -31,6 +31,7 @@ convar_t *gl_swapInterval;
|
|||
convar_t *gl_check_errors;
|
||||
convar_t *gl_allow_static;
|
||||
convar_t *gl_texturemode;
|
||||
convar_t *gl_wireframe;
|
||||
convar_t *gl_round_down;
|
||||
convar_t *gl_max_size;
|
||||
convar_t *gl_picmip;
|
||||
|
@ -1435,10 +1436,10 @@ void GL_InitCommands( void )
|
|||
gl_finish = Cvar_Get( "gl_finish", "0", CVAR_ARCHIVE, "use glFinish instead of glFlush" );
|
||||
gl_clear = Cvar_Get( "gl_clear", "0", CVAR_ARCHIVE, "clearing screen after each frame" );
|
||||
gl_test = Cvar_Get( "gl_test", "0", 0, "engine developer cvar for quick testing new features" );
|
||||
gl_wireframe = Cvar_Get( "gl_wireframe", "0", 0, "show wireframe overlay" );
|
||||
|
||||
// these cvar not used by engine but some mods requires this
|
||||
Cvar_Get( "gl_polyoffset", "-0.1", 0, "polygon offset for decals" );
|
||||
Cvar_Get( "gl_wireframe", "0", 0, "show wireframe overlay" );
|
||||
|
||||
// make sure r_swapinterval is checked after vid_restart
|
||||
gl_swapInterval->modified = true;
|
||||
|
|
|
@ -139,7 +139,6 @@ static void IN_ActivateCursor( void )
|
|||
{
|
||||
if( cls.key_dest == key_menu )
|
||||
{
|
||||
while( ShowCursor( true ) < 0 );
|
||||
SetCursor( in_mousecursor );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -359,6 +359,7 @@ extern convar_t *sv_stopspeed;
|
|||
extern convar_t *sv_check_errors;
|
||||
extern convar_t *sv_reconnect_limit;
|
||||
extern convar_t *sv_lighting_modulate;
|
||||
extern convar_t *sv_fix_pushents;
|
||||
extern convar_t *rcon_password;
|
||||
extern convar_t *hostname;
|
||||
extern convar_t *sv_stepsize;
|
||||
|
|
|
@ -40,6 +40,7 @@ convar_t *sv_waterfriction;
|
|||
convar_t *sv_synchthink;
|
||||
convar_t *sv_stopspeed;
|
||||
convar_t *hostname;
|
||||
convar_t *sv_fix_pushents;
|
||||
convar_t *sv_lighting_modulate;
|
||||
convar_t *sv_maxclients;
|
||||
convar_t *sv_check_errors;
|
||||
|
@ -687,6 +688,7 @@ void SV_Init( void )
|
|||
mp_consistency = Cvar_Get( "mp_consistency", "1", CVAR_SERVERNOTIFY, "enbale consistency check in multiplayer" );
|
||||
clockwindow = Cvar_Get( "clockwindow", "0.5", 0, "timewindow to execute client moves" );
|
||||
sv_novis = Cvar_Get( "sv_novis", "0", 0, "force to ignore server visibility" );
|
||||
sv_fix_pushents = Cvar_Get( "sv_fix_pushents", "1", CVAR_ARCHIVE, "prevent toss entities from falling through level" );
|
||||
|
||||
SV_ClearSaveDir (); // delete all temporary *.hl files
|
||||
BF_Init( &net_message, "NetMessage", net_message_buffer, sizeof( net_message_buffer ));
|
||||
|
|
|
@ -611,6 +611,7 @@ trace_t SV_PushEntity( edict_t *ent, const vec3_t lpush, const vec3_t apush, int
|
|||
{
|
||||
trace_t trace;
|
||||
sv_client_t *cl;
|
||||
qboolean push = false;
|
||||
int type;
|
||||
vec3_t end;
|
||||
|
||||
|
@ -624,7 +625,11 @@ trace_t SV_PushEntity( edict_t *ent, const vec3_t lpush, const vec3_t apush, int
|
|||
|
||||
trace = SV_Move( ent->v.origin, ent->v.mins, ent->v.maxs, end, type, ent );
|
||||
|
||||
if( trace.fraction != 0.0f )
|
||||
if( sv_fix_pushents->integer )
|
||||
push = ( trace.fraction != 0.0f && !trace.allsolid ) ? true : false;
|
||||
else push = ( trace.fraction != 0.0f ) ? true : false;
|
||||
|
||||
if( push )
|
||||
{
|
||||
VectorCopy( trace.endpos, ent->v.origin );
|
||||
|
||||
|
@ -801,6 +806,10 @@ static edict_t *SV_PushMove( edict_t *pusher, float movetime )
|
|||
pusher->v.ltime += movetime;
|
||||
oldsolid = pusher->v.solid;
|
||||
|
||||
// non-solid pushers can't push anything
|
||||
if( pusher->v.solid == SOLID_NOT )
|
||||
return NULL;
|
||||
|
||||
// see if any solid entities are inside the final position
|
||||
num_moved = 0;
|
||||
|
||||
|
@ -922,6 +931,10 @@ static edict_t *SV_PushRotate( edict_t *pusher, float movetime )
|
|||
pusher->v.ltime += movetime;
|
||||
oldsolid = pusher->v.solid;
|
||||
|
||||
// non-solid pushers can't push anything
|
||||
if( pusher->v.solid == SOLID_NOT )
|
||||
return NULL;
|
||||
|
||||
// create pusher final position
|
||||
Matrix4x4_CreateFromEntity( end_l, pusher->v.angles, pusher->v.origin, 1.0f );
|
||||
|
||||
|
|
Reference in New Issue