Skip to content

Conversation

@WereTech
Copy link

@WereTech WereTech commented Nov 7, 2025

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.

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 );
Copy link
Contributor

@ficool2 ficool2 Nov 7, 2025

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

Copy link
Author

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?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes

Copy link
Author

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();
Copy link
Contributor

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

Copy link
Author

@WereTech WereTech Nov 7, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants