Skip to content

Commit

Permalink
Updated to GZDoom commit ZDoom/gzdoom@3436b80
Browse files Browse the repository at this point in the history
  • Loading branch information
Xane123 committed Feb 24, 2018
1 parent 85bf52f commit 0f4b89e
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/gameconfigfile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ FGameConfigFile::FGameConfigFile ()
SetValueForKey ("Path", "$PROGDIR", true);
#else
SetValueForKey ("Path", "$HOME/" GAME_DIR, true);
SetValueForKey ("Path", SHARE_DIR, true);
SetValueForKey ("Path", "/usr/local/share/doom", true);
SetValueForKey ("Path", "/usr/local/share/games/doom", true);
SetValueForKey ("Path", "/usr/share/doom", true);
Expand Down
2 changes: 1 addition & 1 deletion src/s_environment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,7 @@ void S_UnloadReverbDef ()
Environments = &Off;
}

CUSTOM_CVAR(Bool, eaxedit_test, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOINITCALL)
CUSTOM_CVAR(Bool, eaxedit_test, false, CVAR_NOINITCALL)
{
if (self)
{
Expand Down
1 change: 1 addition & 0 deletions src/scripting/zscript/zcc_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
20 changes: 20 additions & 0 deletions src/scripting/zscript/zcc_parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion wadsrc/static/zscript/actor.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1177,7 +1177,7 @@ class Actor : Thinker native
{
return ACS_LockedExecuteDoor(-int(script), mapnum, arg1, arg2, lock);
}
int ACS_NamedExecuteWithResult(name script, int arg1=0, int arg2=0, int arg3=0, int arg4=0)
int ACS_ScriptCall(name script, int arg1=0, int arg2=0, int arg3=0, int arg4=0)
{
return ACS_ExecuteWithResult(-int(script), arg1, arg2, arg3, arg4);
}
Expand Down
1 change: 1 addition & 0 deletions wadsrc/static/zscript/constants.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
10 changes: 10 additions & 0 deletions wadsrc/static/zscript/hexen/korax.txt
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,11 @@ class Korax : Actor

void A_KoraxMissile()
{
if (!target)
{
return;
}

static const class<Actor> choices[] =
{
"WraithFX1", "Demon1FX1", "Demon2FX1", "FireDemonMissile", "CentaurFX", "SerpentFX"
Expand Down Expand Up @@ -282,6 +287,11 @@ class Korax : Actor

void KoraxFire (Class<Actor> type, int arm)
{
if (!target)
{
return;
}

static const int extension[] =
{
KORAX_ARM_EXTENSION_SHORT,
Expand Down

0 comments on commit 0f4b89e

Please sign in to comment.