20 Oct 2013
This commit is contained in:
parent
82a9942d1c
commit
563304d87a
|
@ -367,7 +367,6 @@ void CL_WeaponAnim( int iAnim, int body )
|
|||
|
||||
// save animtime
|
||||
view->latched.prevanimtime = view->curstate.animtime;
|
||||
view->syncbase = -0.01f; // back up to get 0'th frame animations
|
||||
view->latched.sequencetime = 0.0f;
|
||||
}
|
||||
|
||||
|
@ -429,12 +428,8 @@ void CL_UpdateStudioVars( cl_entity_t *ent, entity_state_t *newstate, qboolean n
|
|||
for( i = 0; i < 2; i++ )
|
||||
ent->latched.prevseqblending[i] = ent->curstate.blending[i];
|
||||
ent->latched.prevsequence = ent->curstate.sequence; // save old sequence
|
||||
ent->syncbase = -0.01f; // back up to get 0'th frame animations
|
||||
}
|
||||
|
||||
if( !ent->curstate.frame )
|
||||
ent->syncbase = -0.01f; // back up to get 0'th frame animations
|
||||
|
||||
if( newstate->animtime != ent->curstate.animtime )
|
||||
{
|
||||
// client got new packet, shuffle animtimes
|
||||
|
|
|
@ -1812,6 +1812,7 @@ void CL_Shutdown( void )
|
|||
SCR_Shutdown ();
|
||||
CL_UnloadProgs ();
|
||||
|
||||
SCR_FreeCinematic (); // release AVI's *after* client.dll because custom renderer may use them
|
||||
S_Shutdown ();
|
||||
R_Shutdown ();
|
||||
}
|
|
@ -635,7 +635,6 @@ void SCR_Shutdown( void )
|
|||
Cmd_RemoveCommand( "skyname" );
|
||||
Cmd_RemoveCommand( "viewpos" );
|
||||
UI_SetActiveMenu( false );
|
||||
SCR_FreeCinematic();
|
||||
|
||||
if( host.state != HOST_RESTART )
|
||||
UI_UnloadProgs();
|
||||
|
|
|
@ -143,10 +143,18 @@ void GL_TexFilter( gltexture_t *tex, qboolean update )
|
|||
{
|
||||
pglTexParameteri( tex->target, GL_TEXTURE_MIN_FILTER, GL_LINEAR );
|
||||
pglTexParameteri( tex->target, GL_TEXTURE_MAG_FILTER, GL_LINEAR );
|
||||
pglTexParameteri( tex->target, GL_TEXTURE_COMPARE_MODE_ARB, GL_COMPARE_R_TO_TEXTURE_ARB );
|
||||
pglTexParameteri( tex->target, GL_TEXTURE_COMPARE_FUNC_ARB, GL_LEQUAL );
|
||||
pglTexParameteri( tex->target, GL_DEPTH_TEXTURE_MODE_ARB, GL_INTENSITY );
|
||||
|
||||
|
||||
if( tex->flags & TF_LUMINANCE )
|
||||
{
|
||||
pglTexParameteri( tex->target, GL_DEPTH_TEXTURE_MODE_ARB, GL_LUMINANCE );
|
||||
}
|
||||
else
|
||||
{
|
||||
pglTexParameteri( tex->target, GL_DEPTH_TEXTURE_MODE_ARB, GL_INTENSITY );
|
||||
pglTexParameteri( tex->target, GL_TEXTURE_COMPARE_MODE_ARB, GL_COMPARE_R_TO_TEXTURE_ARB );
|
||||
}
|
||||
|
||||
if( GL_Support( GL_ANISOTROPY_EXT ))
|
||||
pglTexParameterf( tex->target, GL_TEXTURE_MAX_ANISOTROPY_EXT, 1.0f );
|
||||
}
|
||||
|
@ -950,8 +958,11 @@ static void GL_UploadTexture( rgbdata_t *pic, gltexture_t *tex, qboolean subImag
|
|||
|
||||
if( tex->flags & TF_LUMINANCE )
|
||||
{
|
||||
GL_MakeLuminance( pic );
|
||||
tex->flags &= ~TF_LUMINANCE;
|
||||
if( !( tex->flags & TF_DEPTHMAP ))
|
||||
{
|
||||
GL_MakeLuminance( pic );
|
||||
tex->flags &= ~TF_LUMINANCE;
|
||||
}
|
||||
pic->flags &= ~IMAGE_HAS_COLOR;
|
||||
}
|
||||
|
||||
|
|
|
@ -2419,43 +2419,19 @@ static void R_StudioClientEvents( void )
|
|||
{
|
||||
mstudioseqdesc_t *pseqdesc;
|
||||
mstudioevent_t *pevent;
|
||||
float flEventFrame;
|
||||
qboolean bLooped = false;
|
||||
cl_entity_t *e = RI.currententity;
|
||||
float f, start;
|
||||
int i;
|
||||
|
||||
pseqdesc = (mstudioseqdesc_t *)((byte *)m_pStudioHeader + m_pStudioHeader->seqindex) + e->curstate.sequence;
|
||||
pevent = (mstudioevent_t *)((byte *)m_pStudioHeader + pseqdesc->eventindex);
|
||||
|
||||
// curstate.frame not used for viewmodel animating
|
||||
flEventFrame = e->latched.prevframe;
|
||||
|
||||
if( pseqdesc->numevents == 0 )
|
||||
// no events for this animation or gamepaused
|
||||
if( pseqdesc->numevents == 0 || cl.time == cl.oldtime )
|
||||
return;
|
||||
|
||||
if( e->syncbase == -0.01f )
|
||||
flEventFrame = 0.0f;
|
||||
|
||||
// stalled?
|
||||
if( flEventFrame == e->syncbase )
|
||||
return;
|
||||
|
||||
//Msg( "(seq %d cycle %.3f ) evframe %.3f prevevframe %.3f (time %.3f)\n", e->curstate.sequence, e->latched.prevframe, flEventFrame, e->syncbase, RI.refdef.time );
|
||||
|
||||
// check for looping
|
||||
if( flEventFrame <= e->syncbase )
|
||||
{
|
||||
if( e->syncbase - flEventFrame > 0.5f )
|
||||
{
|
||||
bLooped = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
// things have backed up, which is bad since it'll probably result in a hitch in the animation playback
|
||||
// but, don't play events again for the same time slice
|
||||
return;
|
||||
}
|
||||
}
|
||||
f = R_StudioEstimateFrame( e, pseqdesc ) + 0.01f; // get start offset
|
||||
start = f - e->curstate.framerate * host.frametime * pseqdesc->fps;
|
||||
|
||||
for( i = 0; i < pseqdesc->numevents; i++ )
|
||||
{
|
||||
|
@ -2463,20 +2439,9 @@ static void R_StudioClientEvents( void )
|
|||
if( pevent[i].event < EVENT_CLIENT )
|
||||
continue;
|
||||
|
||||
// looped
|
||||
if( bLooped )
|
||||
{
|
||||
if(( pevent[i].frame > e->syncbase || pevent[i].frame <= flEventFrame ))
|
||||
clgame.dllFuncs.pfnStudioEvent( &pevent[i], e );
|
||||
}
|
||||
else
|
||||
{
|
||||
if(( pevent[i].frame > e->syncbase && pevent[i].frame <= flEventFrame ))
|
||||
clgame.dllFuncs.pfnStudioEvent( &pevent[i], e );
|
||||
}
|
||||
if( (float)pevent[i].frame > start && f >= (float)pevent[i].frame )
|
||||
clgame.dllFuncs.pfnStudioEvent( &pevent[i], e );
|
||||
}
|
||||
|
||||
e->syncbase = flEventFrame;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -621,6 +621,7 @@ int Con_DrawGenericString( int x, int y, const char *string, rgba_t setColor, qb
|
|||
if( *s == '\n' )
|
||||
{
|
||||
s++;
|
||||
if( !*s ) break; // at end the string
|
||||
drawLen = 0; // begin new row
|
||||
y += con.curFont->charHeight;
|
||||
}
|
||||
|
|
|
@ -425,7 +425,7 @@ qboolean Image_SaveBMP( const char *name, rgbdata_t *pix )
|
|||
{
|
||||
i = (bmih.biHeight - 1 - y ) * (bmih.biWidth);
|
||||
|
||||
for( x = 0; x < bmih.biWidth; x++ )
|
||||
for( x = 0; x < pix->width; x++ )
|
||||
{
|
||||
if( pixel_size == 1 )
|
||||
{
|
||||
|
@ -445,7 +445,7 @@ qboolean Image_SaveBMP( const char *name, rgbdata_t *pix )
|
|||
i++;
|
||||
}
|
||||
|
||||
pb += bmih.biWidth * pixel_size;
|
||||
pb += pix->width * pixel_size;
|
||||
}
|
||||
|
||||
if( host.write_to_clipboard )
|
||||
|
|
|
@ -476,6 +476,11 @@ qboolean SV_SpawnServer( const char *mapname, const char *startspot )
|
|||
Cmd_ExecuteString( "latch\n", src_command );
|
||||
else MsgDev( D_ERROR, "SV_SpawnServer: while 'maxplayers' was modified.\n" );
|
||||
|
||||
sv_maxclients->modified = false;
|
||||
deathmatch->modified = false;
|
||||
teamplay->modified = false;
|
||||
coop->modified = false;
|
||||
|
||||
if( !svs.initialized )
|
||||
return false;
|
||||
|
||||
|
|
Reference in New Issue