mirror of
https://github.com/celisej567/source-engine.git
synced 2026-01-04 18:09:53 +03:00
Compare commits
3 Commits
lightstate
...
lower_fix
| Author | SHA1 | Date | |
|---|---|---|---|
| d24120a99e | |||
| 9026dca97f | |||
| 9027b0bdb7 |
@@ -610,6 +610,12 @@ void CWeaponShotgun::ItemPostFrame( void )
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef GAME_DLL
|
||||
if (!m_bLowered)
|
||||
{
|
||||
#endif // GAME_DLL
|
||||
|
||||
|
||||
// Shotgun uses same timing and ammo for secondary attack
|
||||
if ((m_bDelayedFire2 || pOwner->m_nButtons & IN_ATTACK2) && (m_flNextPrimaryAttack <= gpGlobals->curtime))
|
||||
{
|
||||
@@ -681,6 +687,9 @@ void CWeaponShotgun::ItemPostFrame( void )
|
||||
PrimaryAttack();
|
||||
}
|
||||
}
|
||||
#ifdef GAME_DLL
|
||||
}
|
||||
#endif // GAME_DLL
|
||||
|
||||
if ( pOwner->m_nButtons & IN_RELOAD && UsesClipsForAmmo1() && !m_bInReload )
|
||||
{
|
||||
|
||||
@@ -94,6 +94,11 @@ CBaseCombatWeapon::CBaseCombatWeapon() : BASECOMBATWEAPON_DERIVED_FROM()
|
||||
|
||||
m_hWeaponFileInfo = GetInvalidWeaponInfoHandle();
|
||||
|
||||
#ifdef GAME_DLL
|
||||
m_bLowered = false;
|
||||
m_flRaiseTime = gpGlobals->curtime;
|
||||
#endif
|
||||
|
||||
#if defined( TF_DLL )
|
||||
UseClientSideAnimation();
|
||||
#endif
|
||||
@@ -1653,6 +1658,7 @@ void CBaseCombatWeapon::ItemPostFrame( void )
|
||||
if (!pOwner)
|
||||
return;
|
||||
|
||||
|
||||
UpdateAutoFire();
|
||||
|
||||
//Track the duration of the fire
|
||||
@@ -1666,7 +1672,10 @@ void CBaseCombatWeapon::ItemPostFrame( void )
|
||||
}
|
||||
|
||||
bool bFired = false;
|
||||
|
||||
#ifdef GAME_DLL
|
||||
if (!m_bLowered)
|
||||
{
|
||||
#endif
|
||||
// Secondary attack has priority
|
||||
if ((pOwner->m_nButtons & IN_ATTACK2) && (m_flNextSecondaryAttack <= gpGlobals->curtime))
|
||||
{
|
||||
@@ -1730,6 +1739,7 @@ void CBaseCombatWeapon::ItemPostFrame( void )
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
//NOTENOTE: There is a bug with this code with regards to the way machine guns catch the leading edge trigger
|
||||
// on the player hitting the attack key. It relies on the gun catching that case in the same frame.
|
||||
// However, because the player can also be doing a secondary attack, the edge trigger may be missed.
|
||||
@@ -1754,6 +1764,10 @@ void CBaseCombatWeapon::ItemPostFrame( void )
|
||||
#endif
|
||||
}
|
||||
}
|
||||
#ifdef GAME_DLL
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
// -----------------------
|
||||
// Reload pressed / Clip Empty
|
||||
@@ -2579,6 +2593,9 @@ IMPLEMENT_NETWORKCLASS_ALIASED( BaseCombatWeapon, DT_BaseCombatWeapon )
|
||||
//-----------------------------------------------------------------------------//
|
||||
BEGIN_DATADESC( CBaseCombatWeapon )
|
||||
|
||||
DEFINE_FIELD(m_bLowered, FIELD_BOOLEAN),
|
||||
DEFINE_FIELD(m_flRaiseTime, FIELD_TIME),
|
||||
|
||||
DEFINE_FIELD( m_flNextPrimaryAttack, FIELD_TIME ),
|
||||
DEFINE_FIELD( m_flNextSecondaryAttack, FIELD_TIME ),
|
||||
DEFINE_FIELD( m_flTimeWeaponIdle, FIELD_TIME ),
|
||||
|
||||
@@ -526,6 +526,11 @@ private:
|
||||
CNetworkVar( CBaseCombatCharacterHandle, m_hOwner ); // Player carrying this weapon
|
||||
|
||||
protected:
|
||||
#ifdef GAME_DLL
|
||||
bool m_bLowered; // Whether the viewmodel is raised or lowered
|
||||
float m_flRaiseTime; // If lowered, the time we should raise the viewmodel
|
||||
#endif
|
||||
|
||||
#if defined ( TF_CLIENT_DLL ) || defined ( TF_DLL )
|
||||
// Regulate crit frequency to reduce client-side seed hacking
|
||||
void AddToCritBucket( float flAmount );
|
||||
|
||||
@@ -34,8 +34,6 @@ END_NETWORK_TABLE()
|
||||
//---------------------------------------------------------
|
||||
BEGIN_DATADESC( CBaseHLCombatWeapon )
|
||||
|
||||
DEFINE_FIELD( m_bLowered, FIELD_BOOLEAN ),
|
||||
DEFINE_FIELD( m_flRaiseTime, FIELD_TIME ),
|
||||
DEFINE_FIELD( m_flHolsterTime, FIELD_TIME ),
|
||||
DEFINE_FIELD( m_iPrimaryAttacks, FIELD_INTEGER ),
|
||||
DEFINE_FIELD( m_iSecondaryAttacks, FIELD_INTEGER ),
|
||||
|
||||
@@ -58,8 +58,10 @@ public:
|
||||
|
||||
protected:
|
||||
|
||||
#ifndef GAME_DLL
|
||||
bool m_bLowered; // Whether the viewmodel is raised or lowered
|
||||
float m_flRaiseTime; // If lowered, the time we should raise the viewmodel
|
||||
#endif
|
||||
float m_flHolsterTime; // When the weapon was holstered
|
||||
};
|
||||
|
||||
|
||||
@@ -206,7 +206,7 @@ void DrawExampleModel_DX9_Internal( CBaseVSShader *pShader, IMaterialVar** param
|
||||
pShaderAPI->BindStandardTexture( SHADER_SAMPLER0, TEXTURE_WHITE );
|
||||
}
|
||||
|
||||
LightState_t lightState = LightState_t();
|
||||
LightState_t lightState = { 0, false, false };
|
||||
bool bFlashlightShadows = false;
|
||||
if( bHasFlashlight )
|
||||
{
|
||||
|
||||
@@ -274,7 +274,7 @@ void Draw_Eyes_Refract_Internal( CBaseVSShader *pShader, IMaterialVar** params,
|
||||
if ( bDrawFlashlightAdditivePass == true )
|
||||
pShaderAPI->SetVertexShaderConstant( VERTEX_SHADER_SHADER_SPECIFIC_CONST_4, flashlightState.m_vecLightOrigin.Base(), 1 );
|
||||
|
||||
LightState_t lightState = LightState_t();
|
||||
LightState_t lightState = { 0, false, false };
|
||||
if ( bDrawFlashlightAdditivePass == false )
|
||||
{
|
||||
pShaderAPI->GetDX9LightState( &lightState );
|
||||
|
||||
@@ -222,7 +222,7 @@ void DrawFleshInteriorBlendedPass( CBaseVSShader *pShader, IMaterialVar** params
|
||||
bool bUseStaticControlFlow = g_pHardwareConfig->SupportsStaticControlFlow();
|
||||
|
||||
// Set Vertex Shader Combos
|
||||
LightState_t lightState = LightState_t();
|
||||
LightState_t lightState = { 0, false, false };
|
||||
pShaderAPI->GetDX9LightState( &lightState );
|
||||
DECLARE_DYNAMIC_VERTEX_SHADER( flesh_interior_blended_pass_vs20 );
|
||||
SET_DYNAMIC_VERTEX_SHADER_COMBO( DOWATERFOG, pShaderAPI->GetSceneFogMode() == MATERIAL_FOG_LINEAR_BELOW_FOG_Z );
|
||||
|
||||
@@ -234,7 +234,7 @@ void DrawParticleLitGeneric_DX9( CBaseVSShader *pShader, IMaterialVar** params,
|
||||
pShader->BindTexture( SHADER_SAMPLER7, info.m_nFlashlightTexture, info.m_nFlashlightTextureFrame );
|
||||
}
|
||||
|
||||
LightState_t lightState = LightState_t();
|
||||
LightState_t lightState = { 0, false, false };
|
||||
if( !hasFlashlight )
|
||||
pShaderAPI->GetDX9LightState( &lightState );
|
||||
|
||||
|
||||
@@ -638,7 +638,7 @@ BEGIN_VS_SHADER( pyro_vision, "Help for pyro vision" )
|
||||
DynamicCmdsOut.SetPixelShaderConstant( 12, vParms.Base() );
|
||||
|
||||
int numBones = pShaderAPI->GetCurrentNumBones();
|
||||
LightState_t lightState = LightState_t();
|
||||
LightState_t lightState = { 0, false, false };
|
||||
if ( bVertexLit && !bFullBright )
|
||||
{
|
||||
pShaderAPI->GetDX9LightState( &lightState );
|
||||
|
||||
@@ -611,7 +611,7 @@ void DrawSkin_DX9_Internal( CBaseVSShader *pShader, IMaterialVar** params, IShad
|
||||
}
|
||||
}
|
||||
|
||||
LightState_t lightState = LightState_t();
|
||||
LightState_t lightState = { 0, false, false };
|
||||
bool bFlashlightShadows = false;
|
||||
if( bHasFlashlight )
|
||||
{
|
||||
|
||||
@@ -1188,7 +1188,7 @@ static void DrawVertexLitGeneric_DX9_Internal( CBaseVSShader *pShader, IMaterial
|
||||
|
||||
|
||||
// Set up light combo state
|
||||
LightState_t lightState = LightState_t();
|
||||
LightState_t lightState = {0, false, false};
|
||||
if ( bVertexLitGeneric && (!bHasFlashlight || IsX360() ) )
|
||||
{
|
||||
pShaderAPI->GetDX9LightState( &lightState );
|
||||
|
||||
@@ -310,7 +310,7 @@ void DrawVortWarp_DX9( CBaseVSShader *pShader, IMaterialVar** params, IShaderDyn
|
||||
}
|
||||
|
||||
// Set up light combo state
|
||||
LightState_t lightState = LightState_t();
|
||||
LightState_t lightState = {0, false, false};
|
||||
if ( bVertexLitGeneric && !hasFlashlight )
|
||||
{
|
||||
pShaderAPI->GetDX9LightState( &lightState );
|
||||
|
||||
0
source-engine.unsuccessfulbuild
Normal file
0
source-engine.unsuccessfulbuild
Normal file
Reference in New Issue
Block a user