diff --git a/cl_dll/ev_hldm.cpp b/cl_dll/ev_hldm.cpp index c18eea19..843a4668 100644 --- a/cl_dll/ev_hldm.cpp +++ b/cl_dll/ev_hldm.cpp @@ -253,7 +253,7 @@ void EV_WallPuffCallback( struct tempent_s *ent, float frametime, float currentt ent->entity.angles = ent->entity.baseline.vuser1; } -void EV_HLDM_GunshotDecalTrace( pmtrace_t *pTrace, char *decalName ) +void EV_HLDM_GunshotDecalTrace( pmtrace_t *pTrace, char *decalName, int iBulletType ) { int iRand; physent_t *pe; @@ -283,6 +283,9 @@ void EV_HLDM_GunshotDecalTrace( pmtrace_t *pTrace, char *decalName ) } } + if( iBulletType != BULLET_PLAYER_BUCKSHOT ) + return; + pe = gEngfuncs.pEventAPI->EV_GetPhysent( pTrace->ent ); // Only decal brush models such as the world etc. @@ -344,7 +347,7 @@ void EV_HLDM_DecalGunshot( pmtrace_t *pTrace, int iBulletType ) case BULLET_PLAYER_357: default: // smoke and decal - EV_HLDM_GunshotDecalTrace( pTrace, EV_HLDM_DamageDecal( pe ) ); + EV_HLDM_GunshotDecalTrace( pTrace, EV_HLDM_DamageDecal( pe ), iBulletType ); break; } } diff --git a/cl_dll/ev_hldm.h b/cl_dll/ev_hldm.h index ae84a5ed..6dec6793 100644 --- a/cl_dll/ev_hldm.h +++ b/cl_dll/ev_hldm.h @@ -89,7 +89,7 @@ enum gauss_e GAUSS_DRAW }; -void EV_HLDM_GunshotDecalTrace( pmtrace_t *pTrace, char *decalName ); +void EV_HLDM_GunshotDecalTrace( pmtrace_t *pTrace, char *decalName, int iBulletType ); void EV_HLDM_DecalGunshot( pmtrace_t *pTrace, int iBulletType ); int EV_HLDM_CheckTracer( int idx, float *vecSrc, float *end, float *forward, float *right, int iBulletType, int iTracerFreq, int *tracerCount ); void EV_HLDM_FireBullets( int idx, float *forward, float *right, float *up, int cShots, float *vecSrc, float *vecDirShooting, float flDistance, int iBulletType, int iTracerFreq, int *tracerCount, float flSpreadX, float flSpreadY ); diff --git a/dlls/satchel.cpp b/dlls/satchel.cpp index 4cc4ad6a..563c7bc7 100644 --- a/dlls/satchel.cpp +++ b/dlls/satchel.cpp @@ -367,7 +367,7 @@ void CPipebomb::PrimaryAttack() } m_chargeReady = SATCHEL_RELOAD; - m_flNextPrimaryAttack = GetNextAttackDelay( 0.5 ); + m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.5; m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 0.5; m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 0.5; break; @@ -416,7 +416,7 @@ void CPipebomb::Throw( void ) m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType]--; - m_flNextPrimaryAttack = GetNextAttackDelay( 1.0 ); + m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 1.0; m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 0.5; } } @@ -457,7 +457,7 @@ void CPipebomb::WeaponIdle( void ) // use tripmine animations strcpy( m_pPlayer->m_szAnimExtention, "trip" ); - m_flNextPrimaryAttack = GetNextAttackDelay( 0.5 ); + m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.5; m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 0.5; m_chargeReady = SATCHEL_IDLE; break; diff --git a/dlls/shotgun.cpp b/dlls/shotgun.cpp index ba08f6f8..7f2cdd67 100644 --- a/dlls/shotgun.cpp +++ b/dlls/shotgun.cpp @@ -118,7 +118,7 @@ void CShotgun::PrimaryAttack() if( m_pPlayer->pev->waterlevel == 3 ) { PlayEmptySound(); - m_flNextPrimaryAttack = GetNextAttackDelay( 0.15 ); + m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.15; return; } diff --git a/dlls/vendetta/par21.cpp b/dlls/vendetta/par21.cpp index 68ce6417..c1bbe41e 100644 --- a/dlls/vendetta/par21.cpp +++ b/dlls/vendetta/par21.cpp @@ -32,11 +32,11 @@ enum par21_e PAR21_DEPLOY, PAR21_FIRE1, PAR21_FIRE2, - PAR21_FIRE3, + PAR21_FIRE3 }; -LINK_ENTITY_TO_CLASS(weapon_par21, CPar21); +LINK_ENTITY_TO_CLASS(weapon_par21, CPar21) //========================================================= @@ -129,14 +129,14 @@ void CPar21::PrimaryAttack() if (m_pPlayer->pev->waterlevel == 3) { PlayEmptySound(); - m_flNextPrimaryAttack = 0.15; + m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.15; return; } if (m_iClip <= 0) { PlayEmptySound(); - m_flNextPrimaryAttack = 0.15; + m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.15; return; } @@ -167,7 +167,7 @@ void CPar21::PrimaryAttack() PLAYBACK_EVENT_FULL(flags, m_pPlayer->edict(), m_usPar21, 0.0, (float *)&g_vecZero, (float *)&g_vecZero, vecDir.x, vecDir.y, 0, 0, 0, 0); - m_flNextPrimaryAttack = GetNextAttackDelay(0.1); + m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.1; if (m_flNextPrimaryAttack < UTIL_WeaponTimeBase()) m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.1; @@ -183,7 +183,7 @@ void CPar21::SecondaryAttack(void) if (m_pPlayer->pev->waterlevel == 3) { PlayEmptySound(); - m_flNextPrimaryAttack = 0.15; + m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.15; return; } diff --git a/dlls/weapons.cpp b/dlls/weapons.cpp index 6a1af794..57c41c28 100644 --- a/dlls/weapons.cpp +++ b/dlls/weapons.cpp @@ -1564,17 +1564,6 @@ TYPEDESCRIPTION CCrossbow::m_SaveData[] = IMPLEMENT_SAVERESTORE( CCrossbow, CBasePlayerWeapon ) -TYPEDESCRIPTION CXS::m_SaveData[] = -{ - DEFINE_FIELD( CXS, m_fInAttack, FIELD_INTEGER ), - //DEFINE_FIELD( CGauss, m_flStartCharge, FIELD_TIME ), - //DEFINE_FIELD( CGauss, m_flPlayAftershock, FIELD_TIME ), - //DEFINE_FIELD( CGauss, m_flNextAmmoBurn, FIELD_TIME ), - DEFINE_FIELD( CXS, m_fPrimaryFire, FIELD_BOOLEAN ), -}; - -IMPLEMENT_SAVERESTORE( CXS, CBasePlayerWeapon ) - TYPEDESCRIPTION CPipebomb::m_SaveData[] = { DEFINE_FIELD( CPipebomb, m_chargeReady, FIELD_INTEGER ),