Quote:
Originally Posted by naris
I have modified the quakesounds plugin to support additional sounds in TF2 (for deaths due to rocket, critrocket, train and drowned) and delayed the precaching of sounds until they are actually required.
|
Doesn't that inverse the logic of PREcaching?
Some people were annoyed that the round-starting sound plays when the freeze time is over instead at the beginning of the freeze time.
Thats easy to fix. Just open the .sp file of the version you are using and find
Code:
// Play the starting sound
public EventRoundFreezeEnd(Handle:event, const String:name[], bool:dontBroadcast)
{
PlayQuakeSound(ROUND_PLAY, 0, 0);
PrintQuakeText(ROUND_PLAY, 0, 0);
}
// Initializations to be done at the beginning of the round
public EventRoundStart(Handle:event, const String:name[], bool:dontBroadcast)
{
if(gameType != HL2DM)
NewRoundInitialization();
}
that section.
Change it so it looks like this:
Code:
// Play the starting sound
public EventRoundFreezeEnd(Handle:event, const String:name[], bool:dontBroadcast)
{
}
// Initializations to be done at the beginning of the round
public EventRoundStart(Handle:event, const String:name[], bool:dontBroadcast)
{
if(gameType != HL2DM)
NewRoundInitialization();
PlayQuakeSound(ROUND_PLAY, 0, 0);
PrintQuakeText(ROUND_PLAY, 0, 0);
}
then fix your quakesoundslist.cfg to use a proper soundfile for that event.
I myself have added a 25'th sound so I can play different sounds at both events. That needs more changes though.
Added a new string, at the end of the soundnames array:
Code:
static const String:soundNames[NUM_SOUNDS][] = {"headshot", "grenade", "selfkill", "round play", "knife",
"killsound 1", "killsound 2", "killsound 3", "killsound 4", "killsound 5", "killsound 6", "killsound 7",
"killsound 8", "killsound 9", "killsound 10", "killsound 11", "first blood", "teamkill", "double combo",
"triple combo", "quad combo", "monster combo", "headshot 3", "headshot 5", "round start"};
That string ("round start") goes into a new section of the quakesoundslist.cfg. I put it directly below round play:
Code:
"round play"
{
"standard" "quake/play.wav"
"female" "quake/female/prepare.mp3" <- that file is actually circulating with a wrong filename; she moans "PLAY", not "prepare" or something
"config" "9"
}
"round start"
{
"standard" "quake/prepare.mp3"
"female" "quake/prepare.mp3" <- there is no "prepare" file for female set, use male
"config" "9"
}
Then change
Code:
#define NUM_SOUNDS 24
to
Code:
#define NUM_SOUNDS 25
Add
Code:
#define ROUND_START 24
after
Code:
#define HEADSHOT5 23
Lastly change
Code:
// Play the starting sound
public EventRoundFreezeEnd(Handle:event, const String:name[], bool:dontBroadcast)
{
PlayQuakeSound(ROUND_PLAY, 0, 0);
PrintQuakeText(ROUND_PLAY, 0, 0);
}
// Initializations to be done at the beginning of the round
public EventRoundStart(Handle:event, const String:name[], bool:dontBroadcast)
{
if(gameType != HL2DM)
NewRoundInitialization();
}
into
Code:
// Play the starting sound
public EventRoundFreezeEnd(Handle:event, const String:name[], bool:dontBroadcast)
{
PlayQuakeSound(ROUND_PLAY, 0, 0);
PrintQuakeText(ROUND_PLAY, 0, 0);
}
// Initializations to be done at the beginning of the round
public EventRoundStart(Handle:event, const String:name[], bool:dontBroadcast)
{
if(gameType != HL2DM)
NewRoundInitialization();
PlayQuakeSound(ROUND_START, 0, 0);
PrintQuakeText(ROUND_START, 0, 0);
}
Works like a charm.