Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weapon sounds now work on dedicated servers #162

Merged
merged 4 commits into from
Feb 15, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Prevent double fires
Co-authored-by: Valkyrie <valkyrie@aliencow.org>
  • Loading branch information
TomyLobo and voxelizedworld committed Feb 15, 2021
commit b15cbac2ef883d7c8b1c7f0c16b06cbef52ace0e
4 changes: 3 additions & 1 deletion mp/src/game/client/sdk/c_te_firebullets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ void C_TEFireBullets::PostDataUpdate( DataUpdateType_t updateType )
m_iWeaponID,
m_iMode,
m_iSeed,
m_flSpread );
m_flSpread,
false
);
}


Expand Down
6 changes: 4 additions & 2 deletions mp/src/game/shared/sdk/sdk_fx_shared.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,8 @@ void FX_FireBullets(
int iWeaponID,
int iMode,
int iSeed,
float flSpread
float flSpread,
bool bShouldPlaySound
)
{
Assert(vOrigin.IsValid());
Expand Down Expand Up @@ -188,7 +189,8 @@ void FX_FireBullets(
//ProjectedLightEffectManager( iPlayerIndex ).TriggerMuzzleFlash();
#endif

FX_WeaponSound( iPlayerIndex, sound_type, vOrigin, pWeaponInfo );
if (bShouldPlaySound)
FX_WeaponSound(iPlayerIndex, sound_type, vOrigin, pWeaponInfo);
}


Expand Down
3 changes: 2 additions & 1 deletion mp/src/game/shared/sdk/sdk_fx_shared.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ void FX_FireBullets(
int iWeaponID,
int iMode,
int iSeed,
float flSpread
float flSpread,
bool bShouldPlaySound
);


Expand Down
3 changes: 2 additions & 1 deletion mp/src/game/shared/sdk/weapon_sdkbase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,8 @@ void CWeaponSDKBase::FinishAttack (CSDKPlayer *pPlayer)
GetWeaponID(),
0, //Tony; fire mode - this is unused at the moment, left over from CSS when SDK* was created in the first place.
CBaseEntity::GetPredictionRandomSeed() & 255,
flSpread
flSpread,
true
);

//Add our view kick in
Expand Down