engine: correctly check for cls.legacymode, as it's not a boolean anymore
This commit is contained in:
parent
bbb076c0d4
commit
1d64635783
3 changed files with 17 additions and 5 deletions
|
@ -174,7 +174,7 @@ static qboolean CL_EntityCustomLerp( cl_entity_t *e )
|
||||||
// INTERPOLATION IN GRAVGUNMOD COOP
|
// INTERPOLATION IN GRAVGUNMOD COOP
|
||||||
// MUST BE REMOVED ONCE WE REMOVE 48 PROTO SUPPORT
|
// MUST BE REMOVED ONCE WE REMOVE 48 PROTO SUPPORT
|
||||||
case MOVETYPE_TOSS:
|
case MOVETYPE_TOSS:
|
||||||
if( cls.legacymode && e->model && e->model->type == mod_studio )
|
if( cls.legacymode == PROTO_LEGACY && e->model && e->model->type == mod_studio )
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1265,7 +1265,7 @@ static void CL_LinkPacketEntities( frame_t *frame )
|
||||||
// ABSOLUTELY STUPID HACK TO ALLOW MONSTERS
|
// ABSOLUTELY STUPID HACK TO ALLOW MONSTERS
|
||||||
// INTERPOLATION IN GRAVGUNMOD COOP
|
// INTERPOLATION IN GRAVGUNMOD COOP
|
||||||
// MUST BE REMOVED ONCE WE REMOVE 48 PROTO SUPPORT
|
// MUST BE REMOVED ONCE WE REMOVE 48 PROTO SUPPORT
|
||||||
else if( cls.legacymode && ent->model->type == mod_studio && ent->curstate.movetype == MOVETYPE_TOSS )
|
else if( cls.legacymode == PROTO_LEGACY && ent->model->type == mod_studio && ent->curstate.movetype == MOVETYPE_TOSS )
|
||||||
{
|
{
|
||||||
if( !CL_InterpolateModel( ent ))
|
if( !CL_InterpolateModel( ent ))
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -1215,7 +1215,7 @@ static void CL_CheckForResend( void )
|
||||||
else if( cl_resend.value > CL_MAX_RESEND_TIME )
|
else if( cl_resend.value > CL_MAX_RESEND_TIME )
|
||||||
Cvar_SetValue( "cl_resend", CL_MAX_RESEND_TIME );
|
Cvar_SetValue( "cl_resend", CL_MAX_RESEND_TIME );
|
||||||
|
|
||||||
bandwidthTest = !cls.legacymode && cl_test_bandwidth.value && cls.connect_retry <= CL_TEST_RETRIES;
|
bandwidthTest = cls.legacymode == PROTO_CURRENT && cl_test_bandwidth.value && cls.connect_retry <= CL_TEST_RETRIES;
|
||||||
resendTime = bandwidthTest ? 1.0f : cl_resend.value;
|
resendTime = bandwidthTest ? 1.0f : cl_resend.value;
|
||||||
|
|
||||||
if(( host.realtime - cls.connect_time ) < resendTime )
|
if(( host.realtime - cls.connect_time ) < resendTime )
|
||||||
|
|
|
@ -246,8 +246,20 @@ void Host_ValidateEngineFeatures( uint32_t features )
|
||||||
uint32_t mask = ENGINE_FEATURES_MASK;
|
uint32_t mask = ENGINE_FEATURES_MASK;
|
||||||
|
|
||||||
#if !XASH_DEDICATED
|
#if !XASH_DEDICATED
|
||||||
if( !Host_IsDedicated( ) && cls.legacymode )
|
if( !Host_IsDedicated( ))
|
||||||
|
{
|
||||||
|
switch( cls.legacymode )
|
||||||
|
{
|
||||||
|
case PROTO_CURRENT:
|
||||||
|
break;
|
||||||
|
case PROTO_LEGACY:
|
||||||
mask = ENGINE_LEGACY_FEATURES_MASK;
|
mask = ENGINE_LEGACY_FEATURES_MASK;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
mask = 0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// don't allow unsupported bits
|
// don't allow unsupported bits
|
||||||
|
|
Loading…
Add table
Reference in a new issue