'this' is the weapon itself, so perhaps when it adds players by PVS, it
doesn't find your player because the player isn't in the weapons PVS.

On Mon, Sep 1, 2008 at 3:00 PM, Garrett <[EMAIL PROTECTED]> wrote:

> Aha, got it to work by doing CPASAttenuationFilter filter( GetPlayerOwner()
> );
> Though it makes me kinda wonder what it was about filter( this ) that
> didn't always work correctly.
>
>
>
> ----- Original Message ----
> From: Ryan Sheffer <[EMAIL PROTECTED]>
> To: Discussion of Half-Life Programming <[email protected]>
> Sent: Monday, September 1, 2008 4:41:07 PM
> Subject: Re: [hlcoders] Sound only playing when player is not touching the
> ground
>
> I only have suggestions but they are worth a try.
> Change your CPASAttenuationFilter filter( this ); filter to NULL or a
> filter
> which has no rules to see if its a bad filter, and if that's the problem
> then figure out what isn't passing.
> If its not that then check if CHAN_STATIC is causing the problem, change it
> to CHAN_WEAPON for example.
>
> On Mon, Sep 1, 2008 at 12:32 PM, Garrett <[EMAIL PROTECTED]> wrote:
>
> > Hmm...apparently Yahoo mail doesn't like to reply to the list anymore
> when
> > I hit reply.  So I couldn't find anything particularly interesting in
> > CSoundPatch.  I also did some more testing, and things just got more
> > confusing.  Apparently, the sound will work when I'm standing on some
> > surfaces, but not on others.  I wasn't able to find any sort of pattern
> > among the surfaces it did work on versus the surfaces it doesn't work on.
> >
> >
> >
> > ----- Original Message ----
> > From: "Adam "amckern" McKern" <[EMAIL PROTECTED]>
> > To: Discussion of Half-Life Programming <[email protected]
> >
> > Sent: Sunday, August 31, 2008 4:40:02 PM
> > Subject: Re: [hlcoders] Sound only playing when player is not touching
> the
> > ground
> >
> > Have you checked the code behind m_sndCannonCharge???
> >
> > Might be something there.
> >
> > Adam
> >
> > --------
> > Owner Nigredo Studios http://www.nigredostudios.com
> >
> >
> > --- On Mon, 9/1/08, Garrett <[EMAIL PROTECTED]> wrote:
> >
> > > From: Garrett <[EMAIL PROTECTED]>
> > > Subject: [hlcoders] Sound only playing when player is not touching the
> > ground
> > > To: [email protected]
> > > Date: Monday, September 1, 2008, 6:45 AM
> > > Hi,
> > > So I'm trying to give a weapon a charge up sound like
> > > the gauss gun on the jeep, and so I pretty much just copied
> > > and pasted the relevant bits of code to play the sound.
> > > However, the sound will only play when the player starts
> > > shooting while they aren't touching the ground.  If the
> > > player is touching the ground, the sound doesn't play.
> > > Well, actually, it claims the sound is playing, but I never
> > > hear it.
> > >
> > > CPASAttenuationFilter filter( this );
> > > m_sndCannonCharge =
> > > (CSoundEnvelopeController::GetController()).SoundCreate(
> > > filter, entindex(), CHAN_STATIC,
> > > "Tau.GaussCharge", ATTN_NORM );
> > >
> > > assert(m_sndCannonCharge!=NULL);
> > > if ( m_sndCannonCharge != NULL )
> > > {
> > >     DevMsg( "Playing sound\n" );
> > >     (CSoundEnvelopeController::GetController()).Play(
> > > m_sndCannonCharge, 1.0f, 50 );
> > >
> > > (CSoundEnvelopeController::GetController()).SoundChangePitch(
> > > m_sndCannonCharge, 250, 3.0f );
> > > }
> > >
> > > The relevant soundscript entry:
> > > "Tau.GaussCharge"
> > > {
> > >     "channel"        "CHAN_STATIC"
> > >     "volume"        "VOL_NORM"
> > >     "soundlevel"    "SNDLVL_NORM"
> > >     "wave"
> > > ")weapons/gauss/chargeloop.wav"
> > > }
> > >
> > > I've tried using a couple different channels for the
> > > sound, but with no luck.  Any ideas what I might be doing
> > > wrong?
> > >
> > > Garrett
> > >
> > >
> > >
> > >
> > > _______________________________________________
> > > To unsubscribe, edit your list preferences, or view the
> > > list archives, please visit:
> > > http://list.valvesoftware.com/mailman/listinfo/hlcoders
> >
> >
> >
> >
> > _______________________________________________
> > To unsubscribe, edit your list preferences, or view the list archives,
> > please visit:
> > http://list.valvesoftware.com/mailman/listinfo/hlcoders
> >
> >
> >
> > _______________________________________________
> > To unsubscribe, edit your list preferences, or view the list archives,
> > please visit:
> > http://list.valvesoftware.com/mailman/listinfo/hlcoders
> >
> >
>
>
> --
> ~Ryan
> _______________________________________________
> To unsubscribe, edit your list preferences, or view the list archives,
> please visit:
> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>
>
>
> _______________________________________________
> To unsubscribe, edit your list preferences, or view the list archives,
> please visit:
> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>
>


-- 
~Ryan
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to