- Added SNDINFO $attenuation command. This multiplies the attenuation passed to S_Sound. e.g.
$attenuation Boom 0 Will make the "Boom" sound play with 0 attenuation, or in other words, at full volume throughout the level. SVN r3629 (trunk)
This commit is contained in:
parent
2117c84a78
commit
45027e4620
3 changed files with 20 additions and 1 deletions
|
|
@ -152,6 +152,7 @@ enum SICommands
|
|||
SI_Volume,
|
||||
SI_MusicAlias,
|
||||
SI_EDFOverride,
|
||||
SI_Attenuation,
|
||||
};
|
||||
|
||||
// Blood was a cool game. If Monolith ever releases the source for it,
|
||||
|
|
@ -247,6 +248,7 @@ static const char *SICommandStrings[] =
|
|||
"$volume",
|
||||
"$musicalias",
|
||||
"$edfoverride",
|
||||
"$attenuation",
|
||||
NULL
|
||||
};
|
||||
|
||||
|
|
@ -501,6 +503,7 @@ int S_AddSoundLump (const char *logicalname, int lump)
|
|||
newsfx.next = 0;
|
||||
newsfx.index = 0;
|
||||
newsfx.Volume = 1;
|
||||
newsfx.Attenuation = 1;
|
||||
newsfx.PitchMask = CurrentPitchMask;
|
||||
newsfx.NearLimit = 2;
|
||||
newsfx.LimitRange = 256*256;
|
||||
|
|
@ -1204,6 +1207,17 @@ static void S_AddSNDINFO (int lump)
|
|||
}
|
||||
break;
|
||||
|
||||
case SI_Attenuation: {
|
||||
// $attenuation <logical name> <attenuation>
|
||||
int sfx;
|
||||
|
||||
sc.MustGetString();
|
||||
sfx = S_FindSoundTentative(sc.String);
|
||||
sc.MustGetFloat();
|
||||
S_sfx[sfx].Attenuation = (float)sc.Float;
|
||||
}
|
||||
break;
|
||||
|
||||
case SI_Rolloff: {
|
||||
// $rolloff *|<logical name> [linear|log|custom] <min dist> <max dist/rolloff factor>
|
||||
// Using * for the name makes it the default for sounds that don't specify otherwise.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue