- Added PrecacheSounds mapinfo option. This takes a list of sounds to preload when the level is
loaded. SVN r3837 (trunk)
This commit is contained in:
parent
8a021c4b4b
commit
9d82c7fa0e
4 changed files with 35 additions and 7 deletions
|
|
@ -269,6 +269,7 @@ void level_info_t::Reset()
|
|||
teamdamage = 0.f;
|
||||
specialactions.Clear();
|
||||
DefaultEnvironment = 0;
|
||||
PrecacheSounds.Clear();
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1029,7 +1030,7 @@ DEFINE_MAP_OPTION(specialaction, true)
|
|||
sa->Action = P_FindLineSpecial(parse.sc.String, &min_arg, &max_arg);
|
||||
if (sa->Action == 0 || min_arg < 0)
|
||||
{
|
||||
parse.sc.ScriptError("Unknown specialaction '%s'");
|
||||
parse.sc.ScriptError("Unknown specialaction '%s'", parse.sc.String);
|
||||
}
|
||||
int j = 0;
|
||||
while (j < 5 && parse.sc.CheckString(","))
|
||||
|
|
@ -1040,6 +1041,25 @@ DEFINE_MAP_OPTION(specialaction, true)
|
|||
if (parse.format_type == parse.FMT_Old) parse.sc.SetCMode(false);
|
||||
}
|
||||
|
||||
DEFINE_MAP_OPTION(PrecacheSounds, true)
|
||||
{
|
||||
parse.ParseAssign();
|
||||
|
||||
do
|
||||
{
|
||||
parse.sc.MustGetString();
|
||||
FSoundID snd = parse.sc.String;
|
||||
if (snd == 0)
|
||||
{
|
||||
parse.sc.ScriptMessage("Unknown sound \"%s\"", parse.sc.String);
|
||||
}
|
||||
else
|
||||
{
|
||||
info->PrecacheSounds.Push(snd);
|
||||
}
|
||||
} while (parse.sc.CheckString(","));
|
||||
}
|
||||
|
||||
DEFINE_MAP_OPTION(redirect, true)
|
||||
{
|
||||
parse.ParseAssign();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue