- Update to latest version in trunk.
SVN r3890 (scripting)
This commit is contained in:
commit
e7efa1d802
117 changed files with 2260 additions and 787 deletions
|
|
@ -61,6 +61,8 @@ static cluster_info_t TheDefaultClusterInfo;
|
|||
|
||||
TArray<FEpisode> AllEpisodes;
|
||||
|
||||
extern TMap<int, FString> HexenMusic;
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
//
|
||||
|
|
@ -269,6 +271,7 @@ void level_info_t::Reset()
|
|||
teamdamage = 0.f;
|
||||
specialactions.Clear();
|
||||
DefaultEnvironment = 0;
|
||||
PrecacheSounds.Clear();
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -917,8 +920,6 @@ DEFINE_MAP_OPTION(music, true)
|
|||
{
|
||||
parse.ParseAssign();
|
||||
parse.ParseMusic(info->Music, info->musicorder);
|
||||
// Flag the level so that the $MAP command doesn't override this.
|
||||
info->flags2 |= LEVEL2_MUSICDEFINED;
|
||||
}
|
||||
|
||||
DEFINE_MAP_OPTION(intermusic, true)
|
||||
|
|
@ -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();
|
||||
|
|
@ -1244,6 +1264,8 @@ MapFlagHandlers[] =
|
|||
{ "endofgame", MITYPE_SETFLAG2, LEVEL2_ENDGAME, 0 },
|
||||
{ "nostatistics", MITYPE_SETFLAG2, LEVEL2_NOSTATISTICS, 0 },
|
||||
{ "noautosavehint", MITYPE_SETFLAG2, LEVEL2_NOAUTOSAVEHINT, 0 },
|
||||
{ "forgetstate", MITYPE_SETFLAG2, LEVEL2_FORGETSTATE, 0 },
|
||||
{ "rememberstate", MITYPE_CLRFLAG2, LEVEL2_FORGETSTATE, 0 },
|
||||
{ "unfreezesingleplayerconversations",MITYPE_SETFLAG2, LEVEL2_CONV_SINGLE_UNFREEZE, 0 },
|
||||
{ "nobotnodes", MITYPE_IGNORE, 0, 0 }, // Skulltag option: nobotnodes
|
||||
{ "compat_shorttex", MITYPE_COMPATFLAG, COMPATF_SHORTTEX, 0 },
|
||||
|
|
@ -1516,6 +1538,14 @@ level_info_t *FMapInfoParser::ParseMapHeader(level_info_t &defaultinfo)
|
|||
// to teleport to maps with standard names without needing a levelnum.
|
||||
levelinfo->levelnum = GetDefaultLevelNum(levelinfo->mapname);
|
||||
|
||||
// Does this map have a song defined via SNDINFO's $map command?
|
||||
// Set that as this map's default music if it does.
|
||||
FString *song;
|
||||
if ((song = HexenMusic.CheckKey(levelinfo->levelnum)) != NULL)
|
||||
{
|
||||
levelinfo->Music = *song;
|
||||
}
|
||||
|
||||
return levelinfo;
|
||||
}
|
||||
|
||||
|
|
@ -1810,7 +1840,6 @@ void FMapInfoParser::ParseMapInfo (int lump, level_info_t &gamedefaults, level_i
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
//
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue