Merge branch 'master' into timidity++

# Conflicts:
#	src/sound/mididevices/music_timiditypp_mididevice.cpp
This commit is contained in:
Christoph Oelckers 2018-02-22 09:10:42 +01:00
commit 3d08c1fbc7
6 changed files with 36 additions and 6 deletions

1
.gitignore vendored
View file

@ -54,3 +54,4 @@
.vs
/src/gl/unused
/mapfiles_release/*.map
.DS_Store

View file

@ -1196,6 +1196,10 @@ static int PatchThing (int thingy)
// triggering line effects and can teleport when the missile flag is removed.
info->flags2 &= ~MF2_NOTELEPORT;
}
if (thingy == 1) // [SP] special handling for players - always be friendly!
{
value[0] |= MF_FRIENDLY;
}
info->flags = ActorFlags::FromInt (value[0]);
}
if (vchanged[1])

View file

@ -4138,6 +4138,8 @@ void P_SetupLevel (const char *lumpname, int position)
// [SP] move unfriendly players around
// horribly hacky - yes, this needs rewritten.
if (level.deathmatchstarts.Size () > 0)
{
for (i = 0; i < MAXPLAYERS; ++i)
{
if (playeringame[i] && players[i].mo != NULL)
@ -4150,6 +4152,7 @@ void P_SetupLevel (const char *lumpname, int position)
}
}
}
}
// Don't count monsters in end-of-level sectors if option is on

View file

@ -267,6 +267,7 @@ static void ParseSingleFile(FScanner *pSC, const char *filename, int lump, void
while (sc.GetToken())
{
value.Largest = 0;
value.SourceLoc = sc.GetMessageLine();
switch (sc.TokenType)
{

View file

@ -7,11 +7,31 @@
struct ZCCToken
{
template <typename... Ts>
struct TLargest;
template <typename T>
struct TLargest<T>
{
using Type = T;
};
template <typename T, typename U, typename... Ts>
struct TLargest<T, U, Ts...>
{
using Type = typename TLargest<
typename std::conditional<
(sizeof(T) > sizeof(U)), T, U
>::type, Ts...
>::Type;
};
union
{
int Int;
double Float;
FString *String;
TLargest<decltype(Int), decltype(Float), decltype(String)>::Type Largest;
};
int SourceLoc;

View file

@ -416,6 +416,7 @@ enum ESoundFlags
CHAN_MAYBE_LOCAL = 16,
CHAN_UI = 32,
CHAN_NOPAUSE = 64,
CHAN_LOOP = 256,
CHAN_PICKUP = (CHAN_ITEM|CHAN_MAYBE_LOCAL),
CHAN_NOSTOP = 4096