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,15 +4138,18 @@ void P_SetupLevel (const char *lumpname, int position)
// [SP] move unfriendly players around
// horribly hacky - yes, this needs rewritten.
for (i = 0; i < MAXPLAYERS; ++i)
if (level.deathmatchstarts.Size () > 0)
{
if (playeringame[i] && players[i].mo != NULL)
for (i = 0; i < MAXPLAYERS; ++i)
{
if (!(players[i].mo->flags & MF_FRIENDLY))
if (playeringame[i] && players[i].mo != NULL)
{
AActor * oldSpawn = players[i].mo;
G_DeathMatchSpawnPlayer (i);
oldSpawn->Destroy();
if (!(players[i].mo->flags & MF_FRIENDLY))
{
AActor * oldSpawn = players[i].mo;
G_DeathMatchSpawnPlayer (i);
oldSpawn->Destroy();
}
}
}
}

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