Raised This Month: $ Target: $400
 0% 

FM_PrecacheSound forwards only 4 sound precaches


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Silencer123
Veteran Member
Join Date: Jul 2006
Old 05-30-2009 , 12:07   Re: FM_PrecacheSound forwards only 4 sound precaches
Reply With Quote #6

Thanks. Still, the main problem remains.
Seems it can only replace some sounds.
E.g. something happend to crowbar-hits-wall-sound,
but the sound of a crossbowbolt being shot
cannot be changed.

Also, the only change I can manage is that it says SV_StartSound: sound xyz not precached.
Whereas xyz would still be the original sound.
So I'd have to hook up SV_StartSound.
Is this possible? I'm finding nothing comparable anywhere.

Also, I have to unregister the forward at an appropriate point.

EDIT: I am so completely unsure if I am using forward_return correctly here.
Can I just return the parameters one after another like this?
Code:
public sr_es(ent, iChannel, const szSample[], Float:fVolume, Float:fAttenuation, iFlags, iPitch) {     for(new j = 0; j < i; j++) {         if(equali(szSample, column1[j])) {             forward_return(FMV_CELL, ent);             forward_return(FMV_CELL, iChannel);             forward_return(FMV_STRING, column2[j]);             forward_return(FMV_FLOAT, fVolume)             forward_return(FMV_FLOAT, fAttenuation)             forward_return(FMV_CELL, iFlags)             forward_return(FMV_CELL, iPitch)             return FMRES_SUPERCEDE;         }     }     return FMRES_IGNORED; }
__________________
EAT YOUR VEGGIES

Last edited by Silencer123; 05-30-2009 at 13:08.
Silencer123 is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 13:55.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode