-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Fix tf_point_weapon_mimic not using Fire Sound #1631
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
base: master
Are you sure you want to change the base?
Conversation
This simply adds an EmitSound to Fire that uses m_pzsFireSound (which is defined, but not used anywhere) before the switch case for picking the right weapon type.
| { | ||
| Assert( m_nWeaponType >= 0 && m_nWeaponType < WEAPON_TYPES ); | ||
|
|
||
| PrecacheScriptSound( m_pzsFireSound ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be precaching in CTFPointWeaponMimic::Precache
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see this function for the entity, am I supposed to add this and use PrecacheScriptSound there?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed to your suggestion, was it done correctly?
also move model precache into this new function for consistency
| void CTFPointWeaponMimic::Spawn() | ||
| { | ||
| BaseClass::Spawn(); | ||
| Precache(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Precache is called by the game, you don't call it yourself
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't seem to precache without the explicit call in Spawn, as removing the call will now produce "<sound> not precached" and not play.
This simply adds an EmitSound to Fire that uses
m_pzsFireSound(which is defined, but not used anywhere) before the switch case for picking the right weapon type.I have read and agree to the terms for making this pull request.