mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-13 07:57:52 +00:00
Merge branch 'master' of github.com:rheit/zdoom
This commit is contained in:
commit
a4fcbf5e06
74 changed files with 1187 additions and 535 deletions
|
@ -44,7 +44,7 @@
|
||||||
|
|
||||||
#define DUMB_VERSION_STR "0.9.3"
|
#define DUMB_VERSION_STR "0.9.3"
|
||||||
|
|
||||||
#define DUMB_NAME "DUMB v"DUMB_VERSION_STR
|
#define DUMB_NAME "DUMB v" DUMB_VERSION_STR
|
||||||
|
|
||||||
#define DUMB_YEAR 2005
|
#define DUMB_YEAR 2005
|
||||||
#define DUMB_MONTH 8
|
#define DUMB_MONTH 8
|
||||||
|
@ -56,13 +56,13 @@
|
||||||
#define DUMB_DAY_STR1 "7"
|
#define DUMB_DAY_STR1 "7"
|
||||||
|
|
||||||
#if DUMB_MONTH < 10
|
#if DUMB_MONTH < 10
|
||||||
#define DUMB_MONTH_STR2 "0"DUMB_MONTH_STR1
|
#define DUMB_MONTH_STR2 "0" DUMB_MONTH_STR1
|
||||||
#else
|
#else
|
||||||
#define DUMB_MONTH_STR2 DUMB_MONTH_STR1
|
#define DUMB_MONTH_STR2 DUMB_MONTH_STR1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if DUMB_DAY < 10
|
#if DUMB_DAY < 10
|
||||||
#define DUMB_DAY_STR2 "0"DUMB_DAY_STR1
|
#define DUMB_DAY_STR2 "0" DUMB_DAY_STR1
|
||||||
#else
|
#else
|
||||||
#define DUMB_DAY_STR2 DUMB_DAY_STR1
|
#define DUMB_DAY_STR2 DUMB_DAY_STR1
|
||||||
#endif
|
#endif
|
||||||
|
@ -74,7 +74,7 @@
|
||||||
*/
|
*/
|
||||||
#define DUMB_DATE (DUMB_YEAR*10000 + DUMB_MONTH*100 + DUMB_DAY)
|
#define DUMB_DATE (DUMB_YEAR*10000 + DUMB_MONTH*100 + DUMB_DAY)
|
||||||
|
|
||||||
#define DUMB_DATE_STR DUMB_DAY_STR1"."DUMB_MONTH_STR1"."DUMB_YEAR_STR4
|
#define DUMB_DATE_STR DUMB_DAY_STR1 "." DUMB_MONTH_STR1 "." DUMB_YEAR_STR4
|
||||||
|
|
||||||
|
|
||||||
#undef MIN
|
#undef MIN
|
||||||
|
|
|
@ -650,8 +650,8 @@ static DUMB_IT_SIGDATA *it_mod_load_sigdata(DUMBFILE *f, int rstrict)
|
||||||
|
|
||||||
if ( ( rstrict & 2 ) )
|
if ( ( rstrict & 2 ) )
|
||||||
{
|
{
|
||||||
long total_sample_size;
|
int32 total_sample_size;
|
||||||
long remain;
|
int32 remain;
|
||||||
rem = f;
|
rem = f;
|
||||||
f = dumbfile_buffer_mod_2(rem, sigdata->n_samples, sigdata->sample, &total_sample_size, &remain);
|
f = dumbfile_buffer_mod_2(rem, sigdata->n_samples, sigdata->sample, &total_sample_size, &remain);
|
||||||
if (!f) {
|
if (!f) {
|
||||||
|
|
|
@ -436,7 +436,7 @@ static int limit_xm_getc(void *f)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static long limit_xm_getnc(char *ptr, int32 n, void *f)
|
static int32 limit_xm_getnc(char *ptr, int32 n, void *f)
|
||||||
{
|
{
|
||||||
LIMITED_XM *lx = f;
|
LIMITED_XM *lx = f;
|
||||||
int left;
|
int left;
|
||||||
|
|
|
@ -113,6 +113,7 @@ Note: All <bool> fields default to false unless mentioned otherwise.
|
||||||
blockprojectiles = <bool>;// Line blocks all projectiles
|
blockprojectiles = <bool>;// Line blocks all projectiles
|
||||||
blockuse = <bool>; // Line blocks all use actions
|
blockuse = <bool>; // Line blocks all use actions
|
||||||
blocksight = <bool>; // Line blocks monster line of sight
|
blocksight = <bool>; // Line blocks monster line of sight
|
||||||
|
blockhitscan = <bool>; // Line blocks hitscan attacks
|
||||||
locknumber = <int>; // Line special is locked
|
locknumber = <int>; // Line special is locked
|
||||||
arg0str = <string>; // Alternate string-based version of arg0
|
arg0str = <string>; // Alternate string-based version of arg0
|
||||||
|
|
||||||
|
@ -186,6 +187,7 @@ Note: All <bool> fields default to false unless mentioned otherwise.
|
||||||
soundsequence = <string>; // The sound sequence to play when this sector moves. Placing a
|
soundsequence = <string>; // The sound sequence to play when this sector moves. Placing a
|
||||||
// sound sequence thing in the sector will override this property.
|
// sound sequence thing in the sector will override this property.
|
||||||
hidden = <bool>; // if true this sector will not be drawn on the textured automap.
|
hidden = <bool>; // if true this sector will not be drawn on the textured automap.
|
||||||
|
waterzone = <bool>; // Sector is under water and swimmable
|
||||||
|
|
||||||
* Note about dropactors
|
* Note about dropactors
|
||||||
|
|
||||||
|
@ -203,6 +205,8 @@ Note: All <bool> fields default to false unless mentioned otherwise.
|
||||||
// Parameter is the conversation ID, 0 meaning none.
|
// Parameter is the conversation ID, 0 meaning none.
|
||||||
countsecret = <bool>; // Picking up this actor counts as a secret.
|
countsecret = <bool>; // Picking up this actor counts as a secret.
|
||||||
arg0str = <string>; // Alternate string-based version of arg0
|
arg0str = <string>; // Alternate string-based version of arg0
|
||||||
|
gravity = <float>; // Set per-actor gravity. Positive values are multiplied with the class's property,
|
||||||
|
// negative values are used as their absolute. Default = 1.0.
|
||||||
|
|
||||||
* Note about arg0str
|
* Note about arg0str
|
||||||
|
|
||||||
|
@ -328,6 +332,9 @@ Added back locknumber property.
|
||||||
1.20 25.02.2012
|
1.20 25.02.2012
|
||||||
Added arg0str thing property.
|
Added arg0str thing property.
|
||||||
|
|
||||||
|
1.21 09.08.2013
|
||||||
|
Added waterzone sector property.
|
||||||
|
|
||||||
===============================================================================
|
===============================================================================
|
||||||
EOF
|
EOF
|
||||||
===============================================================================
|
===============================================================================
|
||||||
|
|
17
src/actor.h
17
src/actor.h
|
@ -236,7 +236,7 @@ enum
|
||||||
MF4_RANDOMIZE = 0x00000010, // Missile has random initial tic count
|
MF4_RANDOMIZE = 0x00000010, // Missile has random initial tic count
|
||||||
MF4_NOSKIN = 0x00000020, // Player cannot use skins
|
MF4_NOSKIN = 0x00000020, // Player cannot use skins
|
||||||
MF4_FIXMAPTHINGPOS = 0x00000040, // Fix this actor's position when spawned as a map thing
|
MF4_FIXMAPTHINGPOS = 0x00000040, // Fix this actor's position when spawned as a map thing
|
||||||
MF4_ACTLIKEBRIDGE = 0x00000080, // Pickups can "stand" on this actor
|
MF4_ACTLIKEBRIDGE = 0x00000080, // Pickups can "stand" on this actor / cannot be moved by any sector action.
|
||||||
MF4_STRIFEDAMAGE = 0x00000100, // Strife projectiles only do up to 4x damage, not 8x
|
MF4_STRIFEDAMAGE = 0x00000100, // Strife projectiles only do up to 4x damage, not 8x
|
||||||
|
|
||||||
MF4_CANUSEWALLS = 0x00000200, // Can activate 'use' specials
|
MF4_CANUSEWALLS = 0x00000200, // Can activate 'use' specials
|
||||||
|
@ -266,9 +266,9 @@ enum
|
||||||
// --- mobj.flags5 ---
|
// --- mobj.flags5 ---
|
||||||
|
|
||||||
MF5_DONTDRAIN = 0x00000001, // cannot be drained health from.
|
MF5_DONTDRAIN = 0x00000001, // cannot be drained health from.
|
||||||
/* = 0x00000002, */
|
/* = 0x00000002, reserved for use by scripting branch */
|
||||||
MF5_NODROPOFF = 0x00000004, // cannot drop off under any circumstances.
|
MF5_NODROPOFF = 0x00000004, // cannot drop off under any circumstances.
|
||||||
/* = 0x00000008, */
|
MF5_NOFORWARDFALL = 0x00000008, // Does not make any actor fall forward by being damaged by this
|
||||||
MF5_COUNTSECRET = 0x00000010, // From Doom 64: actor acts like a secret
|
MF5_COUNTSECRET = 0x00000010, // From Doom 64: actor acts like a secret
|
||||||
MF5_AVOIDINGDROPOFF = 0x00000020, // Used to move monsters away from dropoffs
|
MF5_AVOIDINGDROPOFF = 0x00000020, // Used to move monsters away from dropoffs
|
||||||
MF5_NODAMAGE = 0x00000040, // Actor can be shot and reacts to being shot but takes no damage
|
MF5_NODAMAGE = 0x00000040, // Actor can be shot and reacts to being shot but takes no damage
|
||||||
|
@ -284,7 +284,7 @@ enum
|
||||||
MF5_NEVERFAST = 0x00010000, // never uses 'fast' attacking logic
|
MF5_NEVERFAST = 0x00010000, // never uses 'fast' attacking logic
|
||||||
MF5_ALWAYSRESPAWN = 0x00020000, // always respawns, regardless of skill setting
|
MF5_ALWAYSRESPAWN = 0x00020000, // always respawns, regardless of skill setting
|
||||||
MF5_NEVERRESPAWN = 0x00040000, // never respawns, regardless of skill setting
|
MF5_NEVERRESPAWN = 0x00040000, // never respawns, regardless of skill setting
|
||||||
MF5_DONTRIP = 0x00080000, // Ripping projectiles explode when hittin this actor
|
MF5_DONTRIP = 0x00080000, // Ripping projectiles explode when hitting this actor
|
||||||
MF5_NOINFIGHTING = 0x00100000, // This actor doesn't switch target when it's hurt
|
MF5_NOINFIGHTING = 0x00100000, // This actor doesn't switch target when it's hurt
|
||||||
MF5_NOINTERACTION = 0x00200000, // Thing is completely excluded from any gameplay related checks
|
MF5_NOINTERACTION = 0x00200000, // Thing is completely excluded from any gameplay related checks
|
||||||
MF5_NOTIMEFREEZE = 0x00400000, // Actor is not affected by time freezer
|
MF5_NOTIMEFREEZE = 0x00400000, // Actor is not affected by time freezer
|
||||||
|
@ -331,6 +331,14 @@ enum
|
||||||
MF6_DOHARMSPECIES = 0x08000000, // Do hurt one's own species with projectiles.
|
MF6_DOHARMSPECIES = 0x08000000, // Do hurt one's own species with projectiles.
|
||||||
MF6_INTRYMOVE = 0x10000000, // Executing P_TryMove
|
MF6_INTRYMOVE = 0x10000000, // Executing P_TryMove
|
||||||
MF6_NOTAUTOAIMED = 0x20000000, // Do not subject actor to player autoaim.
|
MF6_NOTAUTOAIMED = 0x20000000, // Do not subject actor to player autoaim.
|
||||||
|
MF6_NOTONAUTOMAP = 0x40000000, // will not be shown on automap with the 'scanner' powerup.
|
||||||
|
MF6_RELATIVETOFLOOR = 0x80000000, // [RC] Make flying actors be affected by lifts.
|
||||||
|
|
||||||
|
// --- mobj.flags6 ---
|
||||||
|
|
||||||
|
MF7_NEVERTARGET = 0x00000001, // can not be targetted at all, even if monster friendliness is considered.
|
||||||
|
MF7_NOTELESTOMP = 0x00000002, // cannot telefrag under any circumstances (even when set by MAPINFO)
|
||||||
|
MF7_ALWAYSTELEFRAG = 0x00000004, // will unconditionally be telefragged when in the way. Overrides all other settings.
|
||||||
|
|
||||||
// --- mobj.renderflags ---
|
// --- mobj.renderflags ---
|
||||||
|
|
||||||
|
@ -836,6 +844,7 @@ public:
|
||||||
DWORD flags4; // [RH] Even more flags!
|
DWORD flags4; // [RH] Even more flags!
|
||||||
DWORD flags5; // OMG! We need another one.
|
DWORD flags5; // OMG! We need another one.
|
||||||
DWORD flags6; // Shit! Where did all the flags go?
|
DWORD flags6; // Shit! Where did all the flags go?
|
||||||
|
DWORD flags7; //
|
||||||
|
|
||||||
// [BB] If 0, everybody can see the actor, if > 0, only members of team (VisibleToTeam-1) can see it.
|
// [BB] If 0, everybody can see the actor, if > 0, only members of team (VisibleToTeam-1) can see it.
|
||||||
DWORD VisibleToTeam;
|
DWORD VisibleToTeam;
|
||||||
|
|
971
src/am_map.cpp
971
src/am_map.cpp
File diff suppressed because it is too large
Load diff
|
@ -505,7 +505,7 @@ bool FCajunMaster::LoadBots ()
|
||||||
bool gotteam = false;
|
bool gotteam = false;
|
||||||
|
|
||||||
bglobal.ForgetBots ();
|
bglobal.ForgetBots ();
|
||||||
#ifndef unix
|
#ifndef __unix__
|
||||||
tmp = progdir;
|
tmp = progdir;
|
||||||
tmp += "zcajun/" BOTFILENAME;
|
tmp += "zcajun/" BOTFILENAME;
|
||||||
if (!FileExists (tmp))
|
if (!FileExists (tmp))
|
||||||
|
|
|
@ -51,6 +51,7 @@
|
||||||
|
|
||||||
#include "i_system.h"
|
#include "i_system.h"
|
||||||
|
|
||||||
|
#include "doomerrors.h"
|
||||||
#include "doomstat.h"
|
#include "doomstat.h"
|
||||||
#include "gstrings.h"
|
#include "gstrings.h"
|
||||||
#include "s_sound.h"
|
#include "s_sound.h"
|
||||||
|
@ -343,22 +344,30 @@ CCMD (changemap)
|
||||||
|
|
||||||
if (argv.argc() > 1)
|
if (argv.argc() > 1)
|
||||||
{
|
{
|
||||||
if (!P_CheckMapData(argv[1]))
|
try
|
||||||
{
|
{
|
||||||
Printf ("No map %s\n", argv[1]);
|
if (!P_CheckMapData(argv[1]))
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (argv.argc() > 2)
|
|
||||||
{
|
{
|
||||||
Net_WriteByte (DEM_CHANGEMAP2);
|
Printf ("No map %s\n", argv[1]);
|
||||||
Net_WriteByte (atoi(argv[2]));
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Net_WriteByte (DEM_CHANGEMAP);
|
if (argv.argc() > 2)
|
||||||
|
{
|
||||||
|
Net_WriteByte (DEM_CHANGEMAP2);
|
||||||
|
Net_WriteByte (atoi(argv[2]));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Net_WriteByte (DEM_CHANGEMAP);
|
||||||
|
}
|
||||||
|
Net_WriteString (argv[1]);
|
||||||
}
|
}
|
||||||
Net_WriteString (argv[1]);
|
}
|
||||||
|
catch(CRecoverableError &error)
|
||||||
|
{
|
||||||
|
if (error.GetMessage())
|
||||||
|
Printf("%s", error.GetMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -1742,7 +1742,7 @@ static bool C_HandleKey (event_t *ev, BYTE *buffer, int len)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#ifdef unix
|
#ifdef __unix__
|
||||||
case EV_GUI_MButtonDown:
|
case EV_GUI_MButtonDown:
|
||||||
C_PasteText(I_GetFromClipboard(true), buffer, len);
|
C_PasteText(I_GetFromClipboard(true), buffer, len);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -1506,7 +1506,7 @@ CCMD (pullin)
|
||||||
{
|
{
|
||||||
const char *lastSlash;
|
const char *lastSlash;
|
||||||
|
|
||||||
#ifdef unix
|
#ifdef __unix__
|
||||||
lastSlash = strrchr (PullinFile, '/');
|
lastSlash = strrchr (PullinFile, '/');
|
||||||
#else
|
#else
|
||||||
const char *lastSlash1, *lastSlash2;
|
const char *lastSlash1, *lastSlash2;
|
||||||
|
|
|
@ -169,7 +169,7 @@ bool CT_Responder (event_t *ev)
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
#ifdef unix
|
#ifdef __unix__
|
||||||
else if (ev->subtype == EV_GUI_MButtonDown)
|
else if (ev->subtype == EV_GUI_MButtonDown)
|
||||||
{
|
{
|
||||||
CT_PasteChat(I_GetFromClipboard(true));
|
CT_PasteChat(I_GetFromClipboard(true));
|
||||||
|
|
|
@ -1755,21 +1755,21 @@ static int PatchCheats (int dummy)
|
||||||
static int PatchMisc (int dummy)
|
static int PatchMisc (int dummy)
|
||||||
{
|
{
|
||||||
static const struct Key keys[] = {
|
static const struct Key keys[] = {
|
||||||
{ "Initial Health", myoffsetof(struct DehInfo,StartHealth) },
|
{ "Initial Health", static_cast<ptrdiff_t>(myoffsetof(struct DehInfo,StartHealth)) },
|
||||||
{ "Initial Bullets", myoffsetof(struct DehInfo,StartBullets) },
|
{ "Initial Bullets", static_cast<ptrdiff_t>(myoffsetof(struct DehInfo,StartBullets)) },
|
||||||
{ "Max Health", myoffsetof(struct DehInfo,MaxHealth) },
|
{ "Max Health", static_cast<ptrdiff_t>(myoffsetof(struct DehInfo,MaxHealth)) },
|
||||||
{ "Max Armor", myoffsetof(struct DehInfo,MaxArmor) },
|
{ "Max Armor", static_cast<ptrdiff_t>(myoffsetof(struct DehInfo,MaxArmor)) },
|
||||||
{ "Green Armor Class", myoffsetof(struct DehInfo,GreenAC) },
|
{ "Green Armor Class", static_cast<ptrdiff_t>(myoffsetof(struct DehInfo,GreenAC)) },
|
||||||
{ "Blue Armor Class", myoffsetof(struct DehInfo,BlueAC) },
|
{ "Blue Armor Class", static_cast<ptrdiff_t>(myoffsetof(struct DehInfo,BlueAC)) },
|
||||||
{ "Max Soulsphere", myoffsetof(struct DehInfo,MaxSoulsphere) },
|
{ "Max Soulsphere", static_cast<ptrdiff_t>(myoffsetof(struct DehInfo,MaxSoulsphere)) },
|
||||||
{ "Soulsphere Health", myoffsetof(struct DehInfo,SoulsphereHealth) },
|
{ "Soulsphere Health", static_cast<ptrdiff_t>(myoffsetof(struct DehInfo,SoulsphereHealth)) },
|
||||||
{ "Megasphere Health", myoffsetof(struct DehInfo,MegasphereHealth) },
|
{ "Megasphere Health", static_cast<ptrdiff_t>(myoffsetof(struct DehInfo,MegasphereHealth)) },
|
||||||
{ "God Mode Health", myoffsetof(struct DehInfo,GodHealth) },
|
{ "God Mode Health", static_cast<ptrdiff_t>(myoffsetof(struct DehInfo,GodHealth)) },
|
||||||
{ "IDFA Armor", myoffsetof(struct DehInfo,FAArmor) },
|
{ "IDFA Armor", static_cast<ptrdiff_t>(myoffsetof(struct DehInfo,FAArmor)) },
|
||||||
{ "IDFA Armor Class", myoffsetof(struct DehInfo,FAAC) },
|
{ "IDFA Armor Class", static_cast<ptrdiff_t>(myoffsetof(struct DehInfo,FAAC)) },
|
||||||
{ "IDKFA Armor", myoffsetof(struct DehInfo,KFAArmor) },
|
{ "IDKFA Armor", static_cast<ptrdiff_t>(myoffsetof(struct DehInfo,KFAArmor)) },
|
||||||
{ "IDKFA Armor Class", myoffsetof(struct DehInfo,KFAAC) },
|
{ "IDKFA Armor Class", static_cast<ptrdiff_t>(myoffsetof(struct DehInfo,KFAAC)) },
|
||||||
{ "No Autofreeze", myoffsetof(struct DehInfo,NoAutofreeze) },
|
{ "No Autofreeze", static_cast<ptrdiff_t>(myoffsetof(struct DehInfo,NoAutofreeze)) },
|
||||||
{ NULL, 0 }
|
{ NULL, 0 }
|
||||||
};
|
};
|
||||||
int result;
|
int result;
|
||||||
|
@ -2329,6 +2329,18 @@ static int DoInclude (int dummy)
|
||||||
return GetLine();
|
return GetLine();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CVAR(Int, dehload, 0, CVAR_ARCHIVE) // Autoloading of .DEH lumps is disabled by default.
|
||||||
|
|
||||||
|
// checks if lump is a .deh or .bex file. Only lumps in the root directory are considered valid.
|
||||||
|
static bool isDehFile(int lumpnum)
|
||||||
|
{
|
||||||
|
const char* const fullName = Wads.GetLumpFullName(lumpnum);
|
||||||
|
const char* const extension = strrchr(fullName, '.');
|
||||||
|
|
||||||
|
return NULL != extension && strchr(fullName, '/') == NULL
|
||||||
|
&& (0 == stricmp(extension, ".deh") || 0 == stricmp(extension, ".bex"));
|
||||||
|
}
|
||||||
|
|
||||||
int D_LoadDehLumps()
|
int D_LoadDehLumps()
|
||||||
{
|
{
|
||||||
int lastlump = 0, lumpnum, count = 0;
|
int lastlump = 0, lumpnum, count = 0;
|
||||||
|
@ -2338,23 +2350,29 @@ int D_LoadDehLumps()
|
||||||
count += D_LoadDehLump(lumpnum);
|
count += D_LoadDehLump(lumpnum);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (0 == PatchSize)
|
if (0 == PatchSize && dehload > 0)
|
||||||
{
|
{
|
||||||
// No DEH/BEX patch is loaded yet, try to find lump(s) with specific extensions
|
// No DEH/BEX patch is loaded yet, try to find lump(s) with specific extensions
|
||||||
|
|
||||||
for (lumpnum = 0, lastlump = Wads.GetNumLumps();
|
if (dehload == 1) // load all .DEH lumps that are found.
|
||||||
lumpnum < lastlump;
|
|
||||||
++lumpnum)
|
|
||||||
{
|
{
|
||||||
const char* const fullName = Wads.GetLumpFullName(lumpnum);
|
for (lumpnum = 0, lastlump = Wads.GetNumLumps(); lumpnum < lastlump; ++lumpnum)
|
||||||
const char* const extension = strrchr(fullName, '.');
|
|
||||||
|
|
||||||
const bool isDehOrBex = NULL != extension
|
|
||||||
&& (0 == stricmp(extension, ".deh") || 0 == stricmp(extension, ".bex"));
|
|
||||||
|
|
||||||
if (isDehOrBex)
|
|
||||||
{
|
{
|
||||||
count += D_LoadDehLump(lumpnum);
|
if (isDehFile(lumpnum))
|
||||||
|
{
|
||||||
|
count += D_LoadDehLump(lumpnum);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else // only load the last .DEH lump that is found.
|
||||||
|
{
|
||||||
|
for (lumpnum = Wads.GetNumLumps()-1; lumpnum >=0; --lumpnum)
|
||||||
|
{
|
||||||
|
if (isDehFile(lumpnum))
|
||||||
|
{
|
||||||
|
count += D_LoadDehLump(lumpnum);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2927,7 +2945,7 @@ void FinishDehPatch ()
|
||||||
PClass *subclass = RUNTIME_CLASS(ADehackedPickup)->CreateDerivedClass
|
PClass *subclass = RUNTIME_CLASS(ADehackedPickup)->CreateDerivedClass
|
||||||
(typeNameBuilder, sizeof(ADehackedPickup));
|
(typeNameBuilder, sizeof(ADehackedPickup));
|
||||||
AActor *defaults2 = GetDefaultByType (subclass);
|
AActor *defaults2 = GetDefaultByType (subclass);
|
||||||
memcpy (defaults2, defaults1, sizeof(AActor));
|
memcpy ((void *)defaults2, (void *)defaults1, sizeof(AActor));
|
||||||
|
|
||||||
// Make a copy of the replaced class's state labels
|
// Make a copy of the replaced class's state labels
|
||||||
FStateDefinitions statedef;
|
FStateDefinitions statedef;
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
#endif
|
#endif
|
||||||
#include <float.h>
|
#include <float.h>
|
||||||
|
|
||||||
#if defined(unix) || defined(__APPLE__)
|
#if defined(__unix__) || defined(__APPLE__)
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -855,7 +855,7 @@ void D_Display ()
|
||||||
FTexture *tex;
|
FTexture *tex;
|
||||||
int x;
|
int x;
|
||||||
|
|
||||||
tex = TexMan[gameinfo.PauseSign];
|
tex = TexMan(gameinfo.PauseSign);
|
||||||
x = (SCREENWIDTH - tex->GetScaledWidth() * CleanXfac)/2 +
|
x = (SCREENWIDTH - tex->GetScaledWidth() * CleanXfac)/2 +
|
||||||
tex->GetScaledLeftOffset() * CleanXfac;
|
tex->GetScaledLeftOffset() * CleanXfac;
|
||||||
screen->DrawTexture (tex, x, 4, DTA_CleanNoMove, true, TAG_DONE);
|
screen->DrawTexture (tex, x, 4, DTA_CleanNoMove, true, TAG_DONE);
|
||||||
|
@ -1300,7 +1300,7 @@ void D_DoAdvanceDemo (void)
|
||||||
gamestate = GS_DEMOSCREEN;
|
gamestate = GS_DEMOSCREEN;
|
||||||
pagename = gameinfo.titlePage;
|
pagename = gameinfo.titlePage;
|
||||||
pagetic = (int)(gameinfo.titleTime * TICRATE);
|
pagetic = (int)(gameinfo.titleTime * TICRATE);
|
||||||
S_StartMusic (gameinfo.titleMusic);
|
S_ChangeMusic (gameinfo.titleMusic, gameinfo.titleOrder, false);
|
||||||
demosequence = 3;
|
demosequence = 3;
|
||||||
pagecount = 0;
|
pagecount = 0;
|
||||||
C_HideConsole ();
|
C_HideConsole ();
|
||||||
|
@ -2009,7 +2009,7 @@ static void AddAutoloadFiles(const char *gamesection)
|
||||||
D_AddFile (allwads, wad);
|
D_AddFile (allwads, wad);
|
||||||
|
|
||||||
// [RH] Add any .wad files in the skins directory
|
// [RH] Add any .wad files in the skins directory
|
||||||
#ifdef unix
|
#ifdef __unix__
|
||||||
file = SHARE_DIR;
|
file = SHARE_DIR;
|
||||||
#else
|
#else
|
||||||
file = progdir;
|
file = progdir;
|
||||||
|
@ -2017,7 +2017,7 @@ static void AddAutoloadFiles(const char *gamesection)
|
||||||
file += "skins";
|
file += "skins";
|
||||||
D_AddDirectory (allwads, file);
|
D_AddDirectory (allwads, file);
|
||||||
|
|
||||||
#ifdef unix
|
#ifdef __unix__
|
||||||
file = NicePath("~/" GAME_DIR "/skins");
|
file = NicePath("~/" GAME_DIR "/skins");
|
||||||
D_AddDirectory (allwads, file);
|
D_AddDirectory (allwads, file);
|
||||||
#endif
|
#endif
|
||||||
|
@ -2137,7 +2137,7 @@ static void CheckCmdLine()
|
||||||
Printf ("%s", GStrings("D_DEVSTR"));
|
Printf ("%s", GStrings("D_DEVSTR"));
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !defined(unix) && !defined(__APPLE__)
|
#if !defined(__unix__) && !defined(__APPLE__)
|
||||||
// We do not need to support -cdrom under Unix, because all the files
|
// We do not need to support -cdrom under Unix, because all the files
|
||||||
// that would go to c:\\zdoomdat are already stored in .zdoom inside
|
// that would go to c:\\zdoomdat are already stored in .zdoom inside
|
||||||
// the user's home directory.
|
// the user's home directory.
|
||||||
|
|
|
@ -141,6 +141,7 @@ public:
|
||||||
FNameNoInit MorphWeapon;
|
FNameNoInit MorphWeapon;
|
||||||
fixed_t AttackZOffset; // attack height, relative to player center
|
fixed_t AttackZOffset; // attack height, relative to player center
|
||||||
fixed_t UseRange; // [NS] Distance at which player can +use
|
fixed_t UseRange; // [NS] Distance at which player can +use
|
||||||
|
fixed_t AirCapacity; // Multiplier for air supply underwater.
|
||||||
const PClass *FlechetteType;
|
const PClass *FlechetteType;
|
||||||
|
|
||||||
// [CW] Fades for when you are being damaged.
|
// [CW] Fades for when you are being damaged.
|
||||||
|
|
|
@ -452,7 +452,7 @@ void FDecalLib::ParseDecal (FScanner &sc)
|
||||||
decalNum = GetDecalID (sc);
|
decalNum = GetDecalID (sc);
|
||||||
sc.MustGetStringName ("{");
|
sc.MustGetStringName ("{");
|
||||||
|
|
||||||
memset (&newdecal, 0, sizeof(newdecal));
|
memset ((void *)&newdecal, 0, sizeof(newdecal));
|
||||||
newdecal.PicNum.SetInvalid();
|
newdecal.PicNum.SetInvalid();
|
||||||
newdecal.ScaleX = newdecal.ScaleY = FRACUNIT;
|
newdecal.ScaleX = newdecal.ScaleY = FRACUNIT;
|
||||||
newdecal.RenderFlags = RF_WALLSPRITE;
|
newdecal.RenderFlags = RF_WALLSPRITE;
|
||||||
|
|
|
@ -153,6 +153,7 @@ enum ELineFlags
|
||||||
ML_BLOCKPROJECTILE = 0x01000000,
|
ML_BLOCKPROJECTILE = 0x01000000,
|
||||||
ML_BLOCKUSE = 0x02000000, // blocks all use actions through this line
|
ML_BLOCKUSE = 0x02000000, // blocks all use actions through this line
|
||||||
ML_BLOCKSIGHT = 0x04000000, // blocks monster line of sight
|
ML_BLOCKSIGHT = 0x04000000, // blocks monster line of sight
|
||||||
|
ML_BLOCKHITSCAN = 0x08000000, // blocks hitscan attacks
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -342,6 +343,7 @@ struct FMapThing
|
||||||
int special;
|
int special;
|
||||||
int args[5];
|
int args[5];
|
||||||
int Conversation;
|
int Conversation;
|
||||||
|
fixed_t gravity;
|
||||||
|
|
||||||
void Serialize (FArchive &);
|
void Serialize (FArchive &);
|
||||||
};
|
};
|
||||||
|
|
|
@ -101,15 +101,20 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_VileTarget)
|
||||||
//
|
//
|
||||||
// A_VileAttack
|
// A_VileAttack
|
||||||
//
|
//
|
||||||
|
|
||||||
|
// A_VileAttack flags
|
||||||
|
#define VAF_DMGTYPEAPPLYTODIRECT 1
|
||||||
|
|
||||||
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_VileAttack)
|
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_VileAttack)
|
||||||
{
|
{
|
||||||
ACTION_PARAM_START(6);
|
ACTION_PARAM_START(7);
|
||||||
ACTION_PARAM_SOUND(snd,0);
|
ACTION_PARAM_SOUND(snd,0);
|
||||||
ACTION_PARAM_INT(dmg,1);
|
ACTION_PARAM_INT(dmg,1);
|
||||||
ACTION_PARAM_INT(blastdmg,2);
|
ACTION_PARAM_INT(blastdmg,2);
|
||||||
ACTION_PARAM_INT(blastrad,3);
|
ACTION_PARAM_INT(blastrad,3);
|
||||||
ACTION_PARAM_FIXED(thrust,4);
|
ACTION_PARAM_FIXED(thrust,4);
|
||||||
ACTION_PARAM_NAME(dmgtype,5);
|
ACTION_PARAM_NAME(dmgtype,5);
|
||||||
|
ACTION_PARAM_INT(flags,6);
|
||||||
|
|
||||||
AActor *fire, *target;
|
AActor *fire, *target;
|
||||||
angle_t an;
|
angle_t an;
|
||||||
|
@ -123,7 +128,15 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_VileAttack)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
S_Sound (self, CHAN_WEAPON, snd, 1, ATTN_NORM);
|
S_Sound (self, CHAN_WEAPON, snd, 1, ATTN_NORM);
|
||||||
int newdam = P_DamageMobj (target, self, self, dmg, NAME_None);
|
|
||||||
|
int newdam;
|
||||||
|
|
||||||
|
if (flags & VAF_DMGTYPEAPPLYTODIRECT)
|
||||||
|
newdam = P_DamageMobj (target, self, self, dmg, dmgtype);
|
||||||
|
|
||||||
|
else
|
||||||
|
newdam = P_DamageMobj (target, self, self, dmg, NAME_None);
|
||||||
|
|
||||||
P_TraceBleed (newdam > 0 ? newdam : dmg, target);
|
P_TraceBleed (newdam > 0 ? newdam : dmg, target);
|
||||||
|
|
||||||
an = self->angle >> ANGLETOFINESHIFT;
|
an = self->angle >> ANGLETOFINESHIFT;
|
||||||
|
|
|
@ -862,7 +862,10 @@ static void ChangeSpy (int changespy)
|
||||||
int pnum = consoleplayer;
|
int pnum = consoleplayer;
|
||||||
if (changespy != SPY_CANCEL)
|
if (changespy != SPY_CANCEL)
|
||||||
{
|
{
|
||||||
pnum = int(players[consoleplayer].camera->player - players);
|
player_t *player = players[consoleplayer].camera->player;
|
||||||
|
// only use the camera as starting index if it's a valid player.
|
||||||
|
if (player != NULL) pnum = int(players[consoleplayer].camera->player - players);
|
||||||
|
|
||||||
int step = (changespy == SPY_NEXT) ? 1 : -1;
|
int step = (changespy == SPY_NEXT) ? 1 : -1;
|
||||||
|
|
||||||
do
|
do
|
||||||
|
@ -1916,7 +1919,7 @@ FString G_BuildSaveName (const char *prefix, int slot)
|
||||||
leader = Args->CheckValue ("-savedir");
|
leader = Args->CheckValue ("-savedir");
|
||||||
if (leader.IsEmpty())
|
if (leader.IsEmpty())
|
||||||
{
|
{
|
||||||
#if !defined(unix) && !defined(__APPLE__)
|
#if !defined(__unix__) && !defined(__APPLE__)
|
||||||
if (Args->CheckParm ("-cdrom"))
|
if (Args->CheckParm ("-cdrom"))
|
||||||
{
|
{
|
||||||
leader = CDROM_DIR "/";
|
leader = CDROM_DIR "/";
|
||||||
|
@ -1928,7 +1931,7 @@ FString G_BuildSaveName (const char *prefix, int slot)
|
||||||
}
|
}
|
||||||
if (leader.IsEmpty())
|
if (leader.IsEmpty())
|
||||||
{
|
{
|
||||||
#ifdef unix
|
#ifdef __unix__
|
||||||
leader = "~/" GAME_DIR;
|
leader = "~/" GAME_DIR;
|
||||||
#elif defined(__APPLE__)
|
#elif defined(__APPLE__)
|
||||||
char cpath[PATH_MAX];
|
char cpath[PATH_MAX];
|
||||||
|
|
|
@ -40,6 +40,7 @@
|
||||||
#include "s_sound.h"
|
#include "s_sound.h"
|
||||||
#include "d_event.h"
|
#include "d_event.h"
|
||||||
#include "m_random.h"
|
#include "m_random.h"
|
||||||
|
#include "doomerrors.h"
|
||||||
#include "doomstat.h"
|
#include "doomstat.h"
|
||||||
#include "wi_stuff.h"
|
#include "wi_stuff.h"
|
||||||
#include "w_wad.h"
|
#include "w_wad.h"
|
||||||
|
@ -170,13 +171,21 @@ CCMD (map)
|
||||||
}
|
}
|
||||||
if (argv.argc() > 1)
|
if (argv.argc() > 1)
|
||||||
{
|
{
|
||||||
if (!P_CheckMapData(argv[1]))
|
try
|
||||||
{
|
{
|
||||||
Printf ("No map %s\n", argv[1]);
|
if (!P_CheckMapData(argv[1]))
|
||||||
|
{
|
||||||
|
Printf ("No map %s\n", argv[1]);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
G_DeferedInitNew (argv[1]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
catch(CRecoverableError &error)
|
||||||
{
|
{
|
||||||
G_DeferedInitNew (argv[1]);
|
if (error.GetMessage())
|
||||||
|
Printf("%s", error.GetMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -103,6 +103,7 @@ struct FMapInfoParser
|
||||||
|
|
||||||
void ParseIntermissionAction(FIntermissionDescriptor *Desc);
|
void ParseIntermissionAction(FIntermissionDescriptor *Desc);
|
||||||
void ParseIntermission();
|
void ParseIntermission();
|
||||||
|
void ParseAMColors(bool);
|
||||||
FName CheckEndSequence();
|
FName CheckEndSequence();
|
||||||
FName ParseEndGame();
|
FName ParseEndGame();
|
||||||
};
|
};
|
||||||
|
|
|
@ -1842,6 +1842,18 @@ void FMapInfoParser::ParseMapInfo (int lump, level_info_t &gamedefaults, level_i
|
||||||
sc.ScriptError("intermission definitions not supported with old MAPINFO syntax");
|
sc.ScriptError("intermission definitions not supported with old MAPINFO syntax");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (sc.Compare("automap") || sc.Compare("automap_overlay"))
|
||||||
|
{
|
||||||
|
if (format_type != FMT_Old)
|
||||||
|
{
|
||||||
|
format_type = FMT_New;
|
||||||
|
ParseAMColors(sc.Compare("automap_overlay"));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sc.ScriptError("automap colorset definitions not supported with old MAPINFO syntax");
|
||||||
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
sc.ScriptError("%s: Unknown top level keyword", sc.String);
|
sc.ScriptError("%s: Unknown top level keyword", sc.String);
|
||||||
|
|
|
@ -589,7 +589,7 @@ void APowerInvisibility::DoEffect ()
|
||||||
Super::DoEffect();
|
Super::DoEffect();
|
||||||
// Due to potential interference with other PowerInvisibility items
|
// Due to potential interference with other PowerInvisibility items
|
||||||
// the effect has to be refreshed each tic.
|
// the effect has to be refreshed each tic.
|
||||||
fixed_t ts = Strength * (special1 + 1); if (ts > FRACUNIT) ts = FRACUNIT;
|
fixed_t ts = (Strength/100) * (special1 + 1); if (ts > FRACUNIT) ts = FRACUNIT;
|
||||||
Owner->alpha = clamp<fixed_t>((OPAQUE - ts), 0, OPAQUE);
|
Owner->alpha = clamp<fixed_t>((OPAQUE - ts), 0, OPAQUE);
|
||||||
switch (Mode)
|
switch (Mode)
|
||||||
{
|
{
|
||||||
|
@ -669,7 +669,7 @@ int APowerInvisibility::AlterWeaponSprite (visstyle_t *vis)
|
||||||
else if (changed == 1)
|
else if (changed == 1)
|
||||||
{
|
{
|
||||||
// something else set the weapon sprite back to opaque but this item is still active.
|
// something else set the weapon sprite back to opaque but this item is still active.
|
||||||
fixed_t ts = Strength * (special1 + 1); if (ts > FRACUNIT) ts = FRACUNIT;
|
fixed_t ts = (Strength/100) * (special1 + 1); if (ts > FRACUNIT) ts = FRACUNIT;
|
||||||
vis->alpha = clamp<fixed_t>((OPAQUE - ts), 0, OPAQUE);
|
vis->alpha = clamp<fixed_t>((OPAQUE - ts), 0, OPAQUE);
|
||||||
switch (Mode)
|
switch (Mode)
|
||||||
{
|
{
|
||||||
|
@ -696,7 +696,7 @@ int APowerInvisibility::AlterWeaponSprite (visstyle_t *vis)
|
||||||
// Handling of Strife-like cumulative invisibility powerups, the weapon itself shouldn't become invisible
|
// Handling of Strife-like cumulative invisibility powerups, the weapon itself shouldn't become invisible
|
||||||
if ((vis->alpha < TRANSLUC25 && special1 > 0) || (vis->alpha == 0))
|
if ((vis->alpha < TRANSLUC25 && special1 > 0) || (vis->alpha == 0))
|
||||||
{
|
{
|
||||||
vis->alpha = clamp<fixed_t>((OPAQUE - Strength), 0, OPAQUE);
|
vis->alpha = clamp<fixed_t>((OPAQUE - (Strength/100)), 0, OPAQUE);
|
||||||
vis->colormap = SpecialColormaps[INVERSECOLORMAP].Colormap;
|
vis->colormap = SpecialColormaps[INVERSECOLORMAP].Colormap;
|
||||||
}
|
}
|
||||||
return -1; // This item is valid so another one shouldn't reset the translucency
|
return -1; // This item is valid so another one shouldn't reset the translucency
|
||||||
|
@ -1697,7 +1697,7 @@ void APowerRegeneration::DoEffect()
|
||||||
{
|
{
|
||||||
if (Owner != NULL && Owner->health > 0 && (level.time & 31) == 0)
|
if (Owner != NULL && Owner->health > 0 && (level.time & 31) == 0)
|
||||||
{
|
{
|
||||||
if (P_GiveBody(Owner, 5))
|
if (P_GiveBody(Owner, Strength/FRACUNIT))
|
||||||
{
|
{
|
||||||
S_Sound(Owner, CHAN_ITEM, "*regenerate", 1, ATTN_NORM );
|
S_Sound(Owner, CHAN_ITEM, "*regenerate", 1, ATTN_NORM );
|
||||||
}
|
}
|
||||||
|
|
|
@ -134,6 +134,8 @@ enum
|
||||||
IF_RESTRICTABSOLUTELY = 1<<19, // RestrictedTo and ForbiddenTo do not allow pickup in any form by other classes
|
IF_RESTRICTABSOLUTELY = 1<<19, // RestrictedTo and ForbiddenTo do not allow pickup in any form by other classes
|
||||||
IF_NEVERRESPAWN = 1<<20, // Never, ever respawns
|
IF_NEVERRESPAWN = 1<<20, // Never, ever respawns
|
||||||
IF_NOSCREENFLASH = 1<<21, // No pickup flash on the player's screen
|
IF_NOSCREENFLASH = 1<<21, // No pickup flash on the player's screen
|
||||||
|
IF_TOSSED = 1<<22, // Was spawned by P_DropItem (i.e. as a monster drop)
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -121,7 +121,11 @@ class ARandomSpawner : public AActor
|
||||||
AActor * newmobj = NULL;
|
AActor * newmobj = NULL;
|
||||||
bool boss = false;
|
bool boss = false;
|
||||||
Super::PostBeginPlay();
|
Super::PostBeginPlay();
|
||||||
if (Species == NAME_None) { Destroy(); return; }
|
if (Species == NAME_None)
|
||||||
|
{
|
||||||
|
Destroy();
|
||||||
|
return;
|
||||||
|
}
|
||||||
const PClass * cls = PClass::FindClass(Species);
|
const PClass * cls = PClass::FindClass(Species);
|
||||||
if (this->flags & MF_MISSILE && target && target->target) // Attempting to spawn a missile.
|
if (this->flags & MF_MISSILE && target && target->target) // Attempting to spawn a missile.
|
||||||
{
|
{
|
||||||
|
@ -142,8 +146,9 @@ class ARandomSpawner : public AActor
|
||||||
newmobj->args[4] = args[4];
|
newmobj->args[4] = args[4];
|
||||||
newmobj->special1 = special1;
|
newmobj->special1 = special1;
|
||||||
newmobj->special2 = special2;
|
newmobj->special2 = special2;
|
||||||
newmobj->SpawnFlags = SpawnFlags;
|
newmobj->SpawnFlags = SpawnFlags & ~MTF_SECRET; // MTF_SECRET needs special treatment to avoid incrementing the secret counter twice. It had already been processed for the spawner itself.
|
||||||
newmobj->HandleSpawnFlags();
|
newmobj->HandleSpawnFlags();
|
||||||
|
newmobj->SpawnFlags = SpawnFlags;
|
||||||
newmobj->tid = tid;
|
newmobj->tid = tid;
|
||||||
newmobj->AddToHash();
|
newmobj->AddToHash();
|
||||||
newmobj->velx = velx;
|
newmobj->velx = velx;
|
||||||
|
|
|
@ -137,18 +137,40 @@ DEFINE_ACTION_FUNCTION(AActor, A_JabDagger)
|
||||||
//
|
//
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
AMF_TARGETEMITTER = 1,
|
||||||
|
AMF_TARGETNONPLAYER = 2,
|
||||||
|
AMF_EMITFROMTARGET = 4,
|
||||||
|
};
|
||||||
|
|
||||||
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_AlertMonsters)
|
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_AlertMonsters)
|
||||||
{
|
{
|
||||||
ACTION_PARAM_START(1);
|
ACTION_PARAM_START(1);
|
||||||
ACTION_PARAM_FIXED(maxdist, 0);
|
ACTION_PARAM_FIXED(maxdist, 0);
|
||||||
|
ACTION_PARAM_INT(Flags, 1);
|
||||||
|
|
||||||
if (self->player != NULL)
|
AActor * target = NULL;
|
||||||
|
AActor * emitter = self;
|
||||||
|
|
||||||
|
if (self->player != NULL || (Flags & AMF_TARGETEMITTER))
|
||||||
{
|
{
|
||||||
P_NoiseAlert(self, self, false, maxdist);
|
target = self;
|
||||||
|
}
|
||||||
|
else if (self->target != NULL && (Flags & AMF_TARGETNONPLAYER))
|
||||||
|
{
|
||||||
|
target = self->target;
|
||||||
}
|
}
|
||||||
else if (self->target != NULL && self->target->player != NULL)
|
else if (self->target != NULL && self->target->player != NULL)
|
||||||
{
|
{
|
||||||
P_NoiseAlert (self->target, self, false, maxdist);
|
target = self->target;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Flags & AMF_EMITFROMTARGET) emitter = target;
|
||||||
|
|
||||||
|
if (target != NULL && emitter != NULL)
|
||||||
|
{
|
||||||
|
P_NoiseAlert(target, emitter, false, maxdist);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -135,7 +135,7 @@ FGameConfigFile::FGameConfigFile ()
|
||||||
local_app_support << cpath << "/" GAME_DIR;
|
local_app_support << cpath << "/" GAME_DIR;
|
||||||
SetValueForKey("Path", local_app_support, true);
|
SetValueForKey("Path", local_app_support, true);
|
||||||
}
|
}
|
||||||
#elif !defined(unix)
|
#elif !defined(__unix__)
|
||||||
SetValueForKey ("Path", "$HOME", true);
|
SetValueForKey ("Path", "$HOME", true);
|
||||||
SetValueForKey ("Path", "$PROGDIR", true);
|
SetValueForKey ("Path", "$PROGDIR", true);
|
||||||
#else
|
#else
|
||||||
|
@ -153,7 +153,7 @@ FGameConfigFile::FGameConfigFile ()
|
||||||
SetValueForKey ("Path", user_app_support, true);
|
SetValueForKey ("Path", user_app_support, true);
|
||||||
SetValueForKey ("Path", "$PROGDIR", true);
|
SetValueForKey ("Path", "$PROGDIR", true);
|
||||||
SetValueForKey ("Path", local_app_support, true);
|
SetValueForKey ("Path", local_app_support, true);
|
||||||
#elif !defined(unix)
|
#elif !defined(__unix__)
|
||||||
SetValueForKey ("Path", "$PROGDIR", true);
|
SetValueForKey ("Path", "$PROGDIR", true);
|
||||||
#else
|
#else
|
||||||
SetValueForKey ("Path", "~/" GAME_DIR, true);
|
SetValueForKey ("Path", "~/" GAME_DIR, true);
|
||||||
|
@ -683,7 +683,7 @@ void FGameConfigFile::CreateStandardAutoExec(const char *section, bool start)
|
||||||
{
|
{
|
||||||
path << cpath << "/" GAME_DIR "/autoexec.cfg";
|
path << cpath << "/" GAME_DIR "/autoexec.cfg";
|
||||||
}
|
}
|
||||||
#elif !defined(unix)
|
#elif !defined(__unix__)
|
||||||
path = "$PROGDIR/autoexec.cfg";
|
path = "$PROGDIR/autoexec.cfg";
|
||||||
#else
|
#else
|
||||||
path = GetUserFile ("autoexec.cfg");
|
path = GetUserFile ("autoexec.cfg");
|
||||||
|
|
20
src/gi.cpp
20
src/gi.cpp
|
@ -184,6 +184,20 @@ const char* GameInfoBorders[] =
|
||||||
gameinfo.key.color = NAME_Null; \
|
gameinfo.key.color = NAME_Null; \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define GAMEINFOKEY_MUSIC(key, order, variable) \
|
||||||
|
else if(nextKey.CompareNoCase(variable) == 0) \
|
||||||
|
{ \
|
||||||
|
sc.MustGetToken(TK_StringConst); \
|
||||||
|
gameinfo.order = 0; \
|
||||||
|
char *colon = strchr (sc.String, ':'); \
|
||||||
|
if (colon) \
|
||||||
|
{ \
|
||||||
|
gameinfo.order = atoi(colon+1); \
|
||||||
|
*colon = 0; \
|
||||||
|
} \
|
||||||
|
gameinfo.key = sc.String; \
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void FMapInfoParser::ParseGameInfo()
|
void FMapInfoParser::ParseGameInfo()
|
||||||
{
|
{
|
||||||
|
@ -286,12 +300,12 @@ void FMapInfoParser::ParseGameInfo()
|
||||||
GAMEINFOKEY_STRINGARRAY(creditPages, "CreditPage", 8, true)
|
GAMEINFOKEY_STRINGARRAY(creditPages, "CreditPage", 8, true)
|
||||||
GAMEINFOKEY_STRINGARRAY(PlayerClasses, "addplayerclasses", 0, false)
|
GAMEINFOKEY_STRINGARRAY(PlayerClasses, "addplayerclasses", 0, false)
|
||||||
GAMEINFOKEY_STRINGARRAY(PlayerClasses, "playerclasses", 0, true)
|
GAMEINFOKEY_STRINGARRAY(PlayerClasses, "playerclasses", 0, true)
|
||||||
GAMEINFOKEY_STRING(titleMusic, "titleMusic")
|
GAMEINFOKEY_MUSIC(titleMusic, titleOrder, "titleMusic")
|
||||||
GAMEINFOKEY_FLOAT(titleTime, "titleTime")
|
GAMEINFOKEY_FLOAT(titleTime, "titleTime")
|
||||||
GAMEINFOKEY_FLOAT(advisoryTime, "advisoryTime")
|
GAMEINFOKEY_FLOAT(advisoryTime, "advisoryTime")
|
||||||
GAMEINFOKEY_FLOAT(pageTime, "pageTime")
|
GAMEINFOKEY_FLOAT(pageTime, "pageTime")
|
||||||
GAMEINFOKEY_STRING(chatSound, "chatSound")
|
GAMEINFOKEY_STRING(chatSound, "chatSound")
|
||||||
GAMEINFOKEY_STRING(finaleMusic, "finaleMusic")
|
GAMEINFOKEY_MUSIC(finaleMusic, finaleOrder, "finaleMusic")
|
||||||
GAMEINFOKEY_CSTRING(finaleFlat, "finaleFlat", 8)
|
GAMEINFOKEY_CSTRING(finaleFlat, "finaleFlat", 8)
|
||||||
GAMEINFOKEY_STRINGARRAY(finalePages, "finalePage", 8, true)
|
GAMEINFOKEY_STRINGARRAY(finalePages, "finalePage", 8, true)
|
||||||
GAMEINFOKEY_STRINGARRAY(infoPages, "addinfoPage", 8, false)
|
GAMEINFOKEY_STRINGARRAY(infoPages, "addinfoPage", 8, false)
|
||||||
|
@ -309,7 +323,7 @@ void FMapInfoParser::ParseGameInfo()
|
||||||
GAMEINFOKEY_COLOR(defaultbloodparticlecolor, "defaultbloodparticlecolor")
|
GAMEINFOKEY_COLOR(defaultbloodparticlecolor, "defaultbloodparticlecolor")
|
||||||
GAMEINFOKEY_STRING(backpacktype, "backpacktype")
|
GAMEINFOKEY_STRING(backpacktype, "backpacktype")
|
||||||
GAMEINFOKEY_STRING(statusbar, "statusbar")
|
GAMEINFOKEY_STRING(statusbar, "statusbar")
|
||||||
GAMEINFOKEY_STRING(intermissionMusic, "intermissionMusic")
|
GAMEINFOKEY_MUSIC(intermissionMusic, intermissionOrder, "intermissionMusic")
|
||||||
GAMEINFOKEY_STRING(CursorPic, "CursorPic")
|
GAMEINFOKEY_STRING(CursorPic, "CursorPic")
|
||||||
GAMEINFOKEY_BOOL(noloopfinalemusic, "noloopfinalemusic")
|
GAMEINFOKEY_BOOL(noloopfinalemusic, "noloopfinalemusic")
|
||||||
GAMEINFOKEY_BOOL(drawreadthis, "drawreadthis")
|
GAMEINFOKEY_BOOL(drawreadthis, "drawreadthis")
|
||||||
|
|
3
src/gi.h
3
src/gi.h
|
@ -91,11 +91,13 @@ struct gameinfo_t
|
||||||
TArray<FName> PlayerClasses;
|
TArray<FName> PlayerClasses;
|
||||||
|
|
||||||
FString titleMusic;
|
FString titleMusic;
|
||||||
|
int titleOrder;
|
||||||
float titleTime;
|
float titleTime;
|
||||||
float advisoryTime;
|
float advisoryTime;
|
||||||
float pageTime;
|
float pageTime;
|
||||||
FString chatSound;
|
FString chatSound;
|
||||||
FString finaleMusic;
|
FString finaleMusic;
|
||||||
|
int finaleOrder;
|
||||||
char finaleFlat[9];
|
char finaleFlat[9];
|
||||||
char borderFlat[9];
|
char borderFlat[9];
|
||||||
char SkyFlatName[9];
|
char SkyFlatName[9];
|
||||||
|
@ -114,6 +116,7 @@ struct gameinfo_t
|
||||||
FString backpacktype;
|
FString backpacktype;
|
||||||
FString statusbar;
|
FString statusbar;
|
||||||
FString intermissionMusic;
|
FString intermissionMusic;
|
||||||
|
int intermissionOrder;
|
||||||
FString CursorPic;
|
FString CursorPic;
|
||||||
DWORD dimcolor;
|
DWORD dimcolor;
|
||||||
float dimamount;
|
float dimamount;
|
||||||
|
|
|
@ -42,11 +42,6 @@
|
||||||
|
|
||||||
extern FStringTable GStrings;
|
extern FStringTable GStrings;
|
||||||
|
|
||||||
// QuitGame messages
|
|
||||||
#define NUM_QUITDOOMMESSAGES 14
|
|
||||||
#define NUM_QUITSTRIFEMESSAGES 8
|
|
||||||
#define NUM_QUITCHEXMESSAGES 7
|
|
||||||
|
|
||||||
extern const char *endmsg[];
|
extern const char *endmsg[];
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -80,7 +80,7 @@ void DIntermissionScreen::Init(FIntermissionAction *desc, bool first)
|
||||||
if (desc->mMusic.IsEmpty())
|
if (desc->mMusic.IsEmpty())
|
||||||
{
|
{
|
||||||
// only start the default music if this is the first action in an intermission
|
// only start the default music if this is the first action in an intermission
|
||||||
if (first) S_ChangeMusic (gameinfo.finaleMusic, 0, desc->mMusicLooping);
|
if (first) S_ChangeMusic (gameinfo.finaleMusic, gameinfo.finaleOrder, desc->mMusicLooping);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -311,6 +311,7 @@ void cht_DoCheat (player_t *player, int cheat)
|
||||||
player->mo->flags4 = player->mo->GetDefault()->flags4;
|
player->mo->flags4 = player->mo->GetDefault()->flags4;
|
||||||
player->mo->flags5 = player->mo->GetDefault()->flags5;
|
player->mo->flags5 = player->mo->GetDefault()->flags5;
|
||||||
player->mo->flags6 = player->mo->GetDefault()->flags6;
|
player->mo->flags6 = player->mo->GetDefault()->flags6;
|
||||||
|
player->mo->flags7 = player->mo->GetDefault()->flags7;
|
||||||
player->mo->renderflags &= ~RF_INVISIBLE;
|
player->mo->renderflags &= ~RF_INVISIBLE;
|
||||||
player->mo->height = player->mo->GetDefault()->height;
|
player->mo->height = player->mo->GetDefault()->height;
|
||||||
player->mo->radius = player->mo->GetDefault()->radius;
|
player->mo->radius = player->mo->GetDefault()->radius;
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "doomtype.h"
|
#include "doomtype.h"
|
||||||
|
|
||||||
#if defined(__GNUC__) && defined(__i386__)
|
#if defined(__GNUC__) && defined(__i386__) && !defined(__clang__)
|
||||||
#include "gccinlines.h"
|
#include "gccinlines.h"
|
||||||
#elif defined(_MSC_VER) && defined(_M_IX86)
|
#elif defined(_MSC_VER) && defined(_M_IX86)
|
||||||
#include "mscinlines.h"
|
#include "mscinlines.h"
|
||||||
|
|
|
@ -333,7 +333,7 @@ static long ParseCommandLine (const char *args, int *argc, char **argv)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#if defined(unix)
|
#if defined(__unix__)
|
||||||
FString GetUserFile (const char *file)
|
FString GetUserFile (const char *file)
|
||||||
{
|
{
|
||||||
FString path;
|
FString path;
|
||||||
|
@ -698,7 +698,7 @@ void M_ScreenShot (const char *filename)
|
||||||
// find a file name to save it to
|
// find a file name to save it to
|
||||||
if (filename == NULL || filename[0] == '\0')
|
if (filename == NULL || filename[0] == '\0')
|
||||||
{
|
{
|
||||||
#if !defined(unix) && !defined(__APPLE__)
|
#if !defined(__unix__) && !defined(__APPLE__)
|
||||||
if (Args->CheckParm ("-cdrom"))
|
if (Args->CheckParm ("-cdrom"))
|
||||||
{
|
{
|
||||||
autoname = CDROM_DIR "\\";
|
autoname = CDROM_DIR "\\";
|
||||||
|
@ -715,7 +715,7 @@ void M_ScreenShot (const char *filename)
|
||||||
dirlen = autoname.Len();
|
dirlen = autoname.Len();
|
||||||
if (dirlen == 0)
|
if (dirlen == 0)
|
||||||
{
|
{
|
||||||
#ifdef unix
|
#ifdef __unix__
|
||||||
autoname = "~/" GAME_DIR "/screenshots/";
|
autoname = "~/" GAME_DIR "/screenshots/";
|
||||||
#elif defined(__APPLE__)
|
#elif defined(__APPLE__)
|
||||||
char cpath[PATH_MAX];
|
char cpath[PATH_MAX];
|
||||||
|
|
|
@ -345,7 +345,7 @@ void DLoadSaveMenu::NotifyNewSave (const char *file, const char *title, bool okF
|
||||||
for (unsigned i=0; i<SaveGames.Size(); i++)
|
for (unsigned i=0; i<SaveGames.Size(); i++)
|
||||||
{
|
{
|
||||||
FSaveGameNode *node = SaveGames[i];
|
FSaveGameNode *node = SaveGames[i];
|
||||||
#ifdef unix
|
#ifdef __unix__
|
||||||
if (node->Filename.Compare (file) == 0)
|
if (node->Filename.Compare (file) == 0)
|
||||||
#else
|
#else
|
||||||
if (node->Filename.CompareNoCase (file) == 0)
|
if (node->Filename.CompareNoCase (file) == 0)
|
||||||
|
|
|
@ -207,7 +207,7 @@ bool DMenu::MouseEventBack(int type, int x, int y)
|
||||||
{
|
{
|
||||||
if (m_show_backbutton >= 0)
|
if (m_show_backbutton >= 0)
|
||||||
{
|
{
|
||||||
FTexture *tex = TexMan[gameinfo.mBackButton];
|
FTexture *tex = TexMan(gameinfo.mBackButton);
|
||||||
if (tex != NULL)
|
if (tex != NULL)
|
||||||
{
|
{
|
||||||
if (m_show_backbutton&1) x -= screen->GetWidth() - tex->GetScaledWidth() * CleanXfac;
|
if (m_show_backbutton&1) x -= screen->GetWidth() - tex->GetScaledWidth() * CleanXfac;
|
||||||
|
@ -263,7 +263,7 @@ void DMenu::Drawer ()
|
||||||
{
|
{
|
||||||
if (this == DMenu::CurrentMenu && BackbuttonAlpha > 0 && m_show_backbutton >= 0 && m_use_mouse)
|
if (this == DMenu::CurrentMenu && BackbuttonAlpha > 0 && m_show_backbutton >= 0 && m_use_mouse)
|
||||||
{
|
{
|
||||||
FTexture *tex = TexMan[gameinfo.mBackButton];
|
FTexture *tex = TexMan(gameinfo.mBackButton);
|
||||||
int w = tex->GetScaledWidth() * CleanXfac;
|
int w = tex->GetScaledWidth() * CleanXfac;
|
||||||
int h = tex->GetScaledHeight() * CleanYfac;
|
int h = tex->GetScaledHeight() * CleanYfac;
|
||||||
int x = (!(m_show_backbutton&1))? 0:screen->GetWidth() - w;
|
int x = (!(m_show_backbutton&1))? 0:screen->GetWidth() - w;
|
||||||
|
@ -909,6 +909,11 @@ CCMD (openmenu)
|
||||||
M_SetMenu(argv[1], -1);
|
M_SetMenu(argv[1], -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CCMD (closemenu)
|
||||||
|
{
|
||||||
|
M_ClearMenus();
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Toggle messages on/off
|
// Toggle messages on/off
|
||||||
//
|
//
|
||||||
|
|
|
@ -158,7 +158,7 @@ static bool CheckSkipOptionBlock(FScanner &sc)
|
||||||
}
|
}
|
||||||
else if (sc.Compare("unix"))
|
else if (sc.Compare("unix"))
|
||||||
{
|
{
|
||||||
#ifdef unix
|
#ifdef __unix__
|
||||||
filter = true;
|
filter = true;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
@ -763,7 +763,7 @@ public:
|
||||||
: FOptionMenuItem(label, menu)
|
: FOptionMenuItem(label, menu)
|
||||||
{
|
{
|
||||||
FBaseCVar *cv = FindCVar(menu, NULL);
|
FBaseCVar *cv = FindCVar(menu, NULL);
|
||||||
if (cv->GetRealType() == CVAR_Color)
|
if (cv != NULL && cv->GetRealType() == CVAR_Color)
|
||||||
{
|
{
|
||||||
mCVar = (FColorCVar*)cv;
|
mCVar = (FColorCVar*)cv;
|
||||||
}
|
}
|
||||||
|
|
|
@ -442,6 +442,7 @@ xx(Alphafloor)
|
||||||
xx(Alphaceiling)
|
xx(Alphaceiling)
|
||||||
xx(Renderstylefloor)
|
xx(Renderstylefloor)
|
||||||
xx(Renderstyleceiling)
|
xx(Renderstyleceiling)
|
||||||
|
xx(Waterzone)
|
||||||
|
|
||||||
xx(offsetx_top)
|
xx(offsetx_top)
|
||||||
xx(offsety_top)
|
xx(offsety_top)
|
||||||
|
@ -464,6 +465,7 @@ xx(blockprojectiles)
|
||||||
xx(blockuse)
|
xx(blockuse)
|
||||||
xx(hidden)
|
xx(hidden)
|
||||||
xx(blocksight)
|
xx(blocksight)
|
||||||
|
xx(blockhitscan)
|
||||||
|
|
||||||
xx(Renderstyle)
|
xx(Renderstyle)
|
||||||
|
|
||||||
|
|
|
@ -60,7 +60,7 @@
|
||||||
FDynamicColormap *F3DFloor::GetColormap()
|
FDynamicColormap *F3DFloor::GetColormap()
|
||||||
{
|
{
|
||||||
// If there's no fog in either model or target sector this is easy and fast.
|
// If there's no fog in either model or target sector this is easy and fast.
|
||||||
if ((target->ColorMap->Fade == 0 && model->ColorMap->Fade == 0) || (flags & FF_FADEWALLS))
|
if ((target->ColorMap->Fade == 0 && model->ColorMap->Fade == 0) || (flags & (FF_FADEWALLS|FF_FOG)))
|
||||||
{
|
{
|
||||||
return model->ColorMap;
|
return model->ColorMap;
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,6 +46,7 @@
|
||||||
#include "p_acs.h"
|
#include "p_acs.h"
|
||||||
#include "p_saveg.h"
|
#include "p_saveg.h"
|
||||||
#include "p_lnspec.h"
|
#include "p_lnspec.h"
|
||||||
|
#include "p_enemy.h"
|
||||||
#include "m_random.h"
|
#include "m_random.h"
|
||||||
#include "doomstat.h"
|
#include "doomstat.h"
|
||||||
#include "c_console.h"
|
#include "c_console.h"
|
||||||
|
@ -3512,6 +3513,8 @@ enum
|
||||||
APROP_Radius = 36,
|
APROP_Radius = 36,
|
||||||
APROP_ReactionTime = 37,
|
APROP_ReactionTime = 37,
|
||||||
APROP_MeleeRange = 38,
|
APROP_MeleeRange = 38,
|
||||||
|
APROP_ViewHeight = 39,
|
||||||
|
APROP_AttackZOffset = 40
|
||||||
};
|
};
|
||||||
|
|
||||||
// These are needed for ACS's APROP_RenderStyle
|
// These are needed for ACS's APROP_RenderStyle
|
||||||
|
@ -3727,6 +3730,16 @@ void DLevelScript::DoSetActorProperty (AActor *actor, int property, int value)
|
||||||
actor->reactiontime = value;
|
actor->reactiontime = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case APROP_ViewHeight:
|
||||||
|
if (actor->IsKindOf (RUNTIME_CLASS (APlayerPawn)))
|
||||||
|
static_cast<APlayerPawn *>(actor)->ViewHeight = value;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case APROP_AttackZOffset:
|
||||||
|
if (actor->IsKindOf (RUNTIME_CLASS (APlayerPawn)))
|
||||||
|
static_cast<APlayerPawn *>(actor)->AttackZOffset = value;
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
// do nothing.
|
// do nothing.
|
||||||
break;
|
break;
|
||||||
|
@ -3799,6 +3812,23 @@ int DLevelScript::GetActorProperty (int tid, int property, const SDWORD *stack,
|
||||||
case APROP_Radius: return actor->radius;
|
case APROP_Radius: return actor->radius;
|
||||||
case APROP_ReactionTime:return actor->reactiontime;
|
case APROP_ReactionTime:return actor->reactiontime;
|
||||||
case APROP_MeleeRange: return actor->meleerange;
|
case APROP_MeleeRange: return actor->meleerange;
|
||||||
|
case APROP_ViewHeight: if (actor->IsKindOf (RUNTIME_CLASS (APlayerPawn)))
|
||||||
|
{
|
||||||
|
return static_cast<APlayerPawn *>(actor)->ViewHeight;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
case APROP_AttackZOffset:
|
||||||
|
if (actor->IsKindOf (RUNTIME_CLASS (APlayerPawn)))
|
||||||
|
{
|
||||||
|
return static_cast<APlayerPawn *>(actor)->AttackZOffset;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
case APROP_SeeSound: return GlobalACSStrings.AddString(actor->SeeSound, stack, stackdepth);
|
case APROP_SeeSound: return GlobalACSStrings.AddString(actor->SeeSound, stack, stackdepth);
|
||||||
case APROP_AttackSound: return GlobalACSStrings.AddString(actor->AttackSound, stack, stackdepth);
|
case APROP_AttackSound: return GlobalACSStrings.AddString(actor->AttackSound, stack, stackdepth);
|
||||||
|
@ -3851,6 +3881,8 @@ int DLevelScript::CheckActorProperty (int tid, int property, int value)
|
||||||
case APROP_Radius:
|
case APROP_Radius:
|
||||||
case APROP_ReactionTime:
|
case APROP_ReactionTime:
|
||||||
case APROP_MeleeRange:
|
case APROP_MeleeRange:
|
||||||
|
case APROP_ViewHeight:
|
||||||
|
case APROP_AttackZOffset:
|
||||||
return (GetActorProperty(tid, property, NULL, 0) == value);
|
return (GetActorProperty(tid, property, NULL, 0) == value);
|
||||||
|
|
||||||
// Boolean values need to compare to a binary version of value
|
// Boolean values need to compare to a binary version of value
|
||||||
|
@ -4202,6 +4234,8 @@ enum EACSFunctions
|
||||||
ACSF_PlayActorSound,
|
ACSF_PlayActorSound,
|
||||||
ACSF_SpawnDecal,
|
ACSF_SpawnDecal,
|
||||||
ACSF_CheckFont,
|
ACSF_CheckFont,
|
||||||
|
ACSF_DropItem,
|
||||||
|
ACSF_CheckFlag,
|
||||||
|
|
||||||
// ZDaemon
|
// ZDaemon
|
||||||
ACSF_GetTeamScore = 19620, // (int team)
|
ACSF_GetTeamScore = 19620, // (int team)
|
||||||
|
@ -5204,6 +5238,49 @@ doplaysound: if (funcIndex == ACSF_PlayActorSound)
|
||||||
// bool CheckFont(str fontname)
|
// bool CheckFont(str fontname)
|
||||||
return V_GetFont(FBehavior::StaticLookupString(args[0])) != NULL;
|
return V_GetFont(FBehavior::StaticLookupString(args[0])) != NULL;
|
||||||
|
|
||||||
|
case ACSF_DropItem:
|
||||||
|
{
|
||||||
|
const char *type = FBehavior::StaticLookupString(args[1]);
|
||||||
|
int amount = argCount >= 3? args[2] : -1;
|
||||||
|
int chance = argCount >= 4? args[3] : 256;
|
||||||
|
const PClass *cls = PClass::FindClass(type);
|
||||||
|
int cnt = 0;
|
||||||
|
if (cls != NULL)
|
||||||
|
{
|
||||||
|
if (args[0] == 0)
|
||||||
|
{
|
||||||
|
if (activator != NULL)
|
||||||
|
{
|
||||||
|
P_DropItem(activator, cls, amount, chance);
|
||||||
|
cnt++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
FActorIterator it(args[0]);
|
||||||
|
AActor *actor;
|
||||||
|
|
||||||
|
while ((actor = it.Next()) != NULL)
|
||||||
|
{
|
||||||
|
P_DropItem(actor, cls, amount, chance);
|
||||||
|
cnt++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return cnt;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case ACSF_CheckFlag:
|
||||||
|
{
|
||||||
|
AActor *actor = SingleActorFromTID(args[0], activator);
|
||||||
|
if (actor != NULL)
|
||||||
|
{
|
||||||
|
return !!CheckActorFlag(actor, FBehavior::StaticLookupString(args[1]));
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -698,6 +698,7 @@ static int LoadSprites (spritetype *sprites, Xsprite *xsprites, int numsprites,
|
||||||
mapthings[count].SkillFilter = 0xffff;
|
mapthings[count].SkillFilter = 0xffff;
|
||||||
mapthings[count].flags = MTF_SINGLE|MTF_COOPERATIVE|MTF_DEATHMATCH;
|
mapthings[count].flags = MTF_SINGLE|MTF_COOPERATIVE|MTF_DEATHMATCH;
|
||||||
mapthings[count].special = 0;
|
mapthings[count].special = 0;
|
||||||
|
mapthings[count].gravity = FRACUNIT;
|
||||||
|
|
||||||
if (xsprites != NULL && sprites[i].lotag == 710)
|
if (xsprites != NULL && sprites[i].lotag == 710)
|
||||||
{ // Blood ambient sound
|
{ // Blood ambient sound
|
||||||
|
|
|
@ -1152,7 +1152,7 @@ void P_StartConversation (AActor *npc, AActor *pc, bool facetalker, bool saveang
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (jump)
|
if (jump && CurNode->ItemCheckNode > 0)
|
||||||
{
|
{
|
||||||
int root = pc->player->ConversationNPC->ConversationRoot;
|
int root = pc->player->ConversationNPC->ConversationRoot;
|
||||||
CurNode = StrifeDialogues[root + CurNode->ItemCheckNode - 1];
|
CurNode = StrifeDialogues[root + CurNode->ItemCheckNode - 1];
|
||||||
|
|
|
@ -1425,6 +1425,9 @@ AActor *LookForEnemiesInBlock (AActor *lookee, int index, void *extparam)
|
||||||
if (!(link->flags3 & MF3_ISMONSTER))
|
if (!(link->flags3 & MF3_ISMONSTER))
|
||||||
continue; // don't target it if it isn't a monster (could be a barrel)
|
continue; // don't target it if it isn't a monster (could be a barrel)
|
||||||
|
|
||||||
|
if (link->flags7 & MF7_NEVERTARGET)
|
||||||
|
continue;
|
||||||
|
|
||||||
other = NULL;
|
other = NULL;
|
||||||
if (link->flags & MF_FRIENDLY)
|
if (link->flags & MF_FRIENDLY)
|
||||||
{
|
{
|
||||||
|
@ -2644,6 +2647,7 @@ static bool P_CheckForResurrection(AActor *self, bool usevilestates)
|
||||||
corpsehit->flags4 = info->flags4;
|
corpsehit->flags4 = info->flags4;
|
||||||
corpsehit->flags5 = info->flags5;
|
corpsehit->flags5 = info->flags5;
|
||||||
corpsehit->flags6 = info->flags6;
|
corpsehit->flags6 = info->flags6;
|
||||||
|
corpsehit->flags7 = info->flags7;
|
||||||
corpsehit->health = info->health;
|
corpsehit->health = info->health;
|
||||||
corpsehit->target = NULL;
|
corpsehit->target = NULL;
|
||||||
corpsehit->lastenemy = NULL;
|
corpsehit->lastenemy = NULL;
|
||||||
|
@ -3087,6 +3091,7 @@ AInventory *P_DropItem (AActor *source, const PClass *type, int dropamount, int
|
||||||
{
|
{
|
||||||
AInventory * inv = static_cast<AInventory *>(mo);
|
AInventory * inv = static_cast<AInventory *>(mo);
|
||||||
ModifyDropAmount(inv, dropamount);
|
ModifyDropAmount(inv, dropamount);
|
||||||
|
inv->ItemFlags |= IF_TOSSED;
|
||||||
if (inv->SpecialDropAction (source))
|
if (inv->SpecialDropAction (source))
|
||||||
{
|
{
|
||||||
// The special action indicates that the item should not spawn
|
// The special action indicates that the item should not spawn
|
||||||
|
|
|
@ -744,9 +744,12 @@ void AActor::Die (AActor *source, AActor *inflictor, int dmgflags)
|
||||||
{
|
{
|
||||||
SetState (diestate);
|
SetState (diestate);
|
||||||
|
|
||||||
tics -= pr_killmobj() & 3;
|
if (tics > 1)
|
||||||
if (tics < 1)
|
{
|
||||||
tics = 1;
|
tics -= pr_killmobj() & 3;
|
||||||
|
if (tics < 1)
|
||||||
|
tics = 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1140,7 +1143,9 @@ int P_DamageMobj (AActor *target, AActor *inflictor, AActor *source, int damage,
|
||||||
&& (pr_damagemobj()&1)
|
&& (pr_damagemobj()&1)
|
||||||
// [RH] But only if not too fast and not flying
|
// [RH] But only if not too fast and not flying
|
||||||
&& thrust < 10*FRACUNIT
|
&& thrust < 10*FRACUNIT
|
||||||
&& !(target->flags & MF_NOGRAVITY))
|
&& !(target->flags & MF_NOGRAVITY)
|
||||||
|
&& (inflictor == NULL || !(inflictor->flags5 & MF5_NOFORWARDFALL))
|
||||||
|
)
|
||||||
{
|
{
|
||||||
ang += ANG180;
|
ang += ANG180;
|
||||||
thrust *= 4;
|
thrust *= 4;
|
||||||
|
@ -1503,6 +1508,9 @@ bool AActor::OkayToSwitchTarget (AActor *other)
|
||||||
if (other == this)
|
if (other == this)
|
||||||
return false; // [RH] Don't hate self (can happen when shooting barrels)
|
return false; // [RH] Don't hate self (can happen when shooting barrels)
|
||||||
|
|
||||||
|
if (other->flags7 & MF7_NEVERTARGET)
|
||||||
|
return false; // never EVER target me!
|
||||||
|
|
||||||
if (!(other->flags & MF_SHOOTABLE))
|
if (!(other->flags & MF_SHOOTABLE))
|
||||||
return false; // Don't attack things that can't be hurt
|
return false; // Don't attack things that can't be hurt
|
||||||
|
|
||||||
|
|
|
@ -2545,6 +2545,7 @@ FUNC(LS_Line_SetBlocking)
|
||||||
ML_RAILING,
|
ML_RAILING,
|
||||||
ML_BLOCKUSE,
|
ML_BLOCKUSE,
|
||||||
ML_BLOCKSIGHT,
|
ML_BLOCKSIGHT,
|
||||||
|
ML_BLOCKHITSCAN,
|
||||||
-1
|
-1
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -53,11 +53,6 @@
|
||||||
#include "r_data/r_translate.h"
|
#include "r_data/r_translate.h"
|
||||||
#include "g_level.h"
|
#include "g_level.h"
|
||||||
|
|
||||||
#define WATER_SINK_FACTOR 3
|
|
||||||
#define WATER_SINK_SMALL_FACTOR 4
|
|
||||||
#define WATER_SINK_SPEED (FRACUNIT/2)
|
|
||||||
#define WATER_JUMP_SPEED (FRACUNIT*7/2)
|
|
||||||
|
|
||||||
CVAR (Bool, cl_bloodsplats, true, CVAR_ARCHIVE)
|
CVAR (Bool, cl_bloodsplats, true, CVAR_ARCHIVE)
|
||||||
CVAR (Int, sv_smartaim, 0, CVAR_ARCHIVE|CVAR_SERVERINFO)
|
CVAR (Int, sv_smartaim, 0, CVAR_ARCHIVE|CVAR_SERVERINFO)
|
||||||
CVAR (Bool, cl_doautoaim, false, CVAR_ARCHIVE)
|
CVAR (Bool, cl_doautoaim, false, CVAR_ARCHIVE)
|
||||||
|
@ -334,8 +329,7 @@ bool P_TeleportMove (AActor *thing, fixed_t x, fixed_t y, fixed_t z, bool telefr
|
||||||
|
|
||||||
spechit.Clear ();
|
spechit.Clear ();
|
||||||
|
|
||||||
bool StompAlwaysFrags = (thing->flags2 & MF2_TELESTOMP) ||
|
bool StompAlwaysFrags = ((thing->flags2 & MF2_TELESTOMP) || (level.flags & LEVEL_MONSTERSTELEFRAG) || telefrag) && !(thing->flags7 & MF7_NOTELESTOMP);
|
||||||
(level.flags & LEVEL_MONSTERSTELEFRAG) || telefrag;
|
|
||||||
|
|
||||||
FBoundingBox box(x, y, thing->radius);
|
FBoundingBox box(x, y, thing->radius);
|
||||||
FBlockLinesIterator it(box);
|
FBlockLinesIterator it(box);
|
||||||
|
@ -383,7 +377,8 @@ bool P_TeleportMove (AActor *thing, fixed_t x, fixed_t y, fixed_t z, bool telefr
|
||||||
|
|
||||||
// monsters don't stomp things except on boss level
|
// monsters don't stomp things except on boss level
|
||||||
// [RH] Some Heretic/Hexen monsters can telestomp
|
// [RH] Some Heretic/Hexen monsters can telestomp
|
||||||
if (StompAlwaysFrags && !(th->flags6 & MF6_NOTELEFRAG))
|
// ... and some items can never be telefragged while others will be telefragged by everything that teleports upon them.
|
||||||
|
if ((StompAlwaysFrags && !(th->flags6 & MF6_NOTELEFRAG)) || (th->flags7 & MF7_ALWAYSTELEFRAG))
|
||||||
{
|
{
|
||||||
P_DamageMobj (th, thing, thing, TELEFRAG_DAMAGE, NAME_Telefrag, DMG_THRUSTLESS);
|
P_DamageMobj (th, thing, thing, TELEFRAG_DAMAGE, NAME_Telefrag, DMG_THRUSTLESS);
|
||||||
continue;
|
continue;
|
||||||
|
@ -3563,7 +3558,7 @@ AActor *P_LineAttack (AActor *t1, angle_t angle, fixed_t distance,
|
||||||
else tflags = TRACE_NoSky|TRACE_Impact;
|
else tflags = TRACE_NoSky|TRACE_Impact;
|
||||||
|
|
||||||
if (!Trace (t1->x, t1->y, shootz, t1->Sector, vx, vy, vz, distance,
|
if (!Trace (t1->x, t1->y, shootz, t1->Sector, vx, vy, vz, distance,
|
||||||
MF_SHOOTABLE, ML_BLOCKEVERYTHING, t1, trace,
|
MF_SHOOTABLE, ML_BLOCKEVERYTHING|ML_BLOCKHITSCAN, t1, trace,
|
||||||
tflags, hitGhosts ? CheckForGhost : CheckForSpectral))
|
tflags, hitGhosts ? CheckForGhost : CheckForSpectral))
|
||||||
{ // hit nothing
|
{ // hit nothing
|
||||||
if (puffDefaults == NULL)
|
if (puffDefaults == NULL)
|
||||||
|
@ -5047,6 +5042,15 @@ void PIT_FloorDrop (AActor *thing, FChangePosition *cpos)
|
||||||
P_CheckFakeFloorTriggers (thing, oldz);
|
P_CheckFakeFloorTriggers (thing, oldz);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if ((thing->z != oldfloorz && !(thing->flags & MF_NOLIFTDROP)))
|
||||||
|
{
|
||||||
|
fixed_t oldz = thing->z;
|
||||||
|
if ((thing->flags & MF_NOGRAVITY) && (thing->flags6 & MF6_RELATIVETOFLOOR))
|
||||||
|
{
|
||||||
|
thing->z = thing->z - oldfloorz + thing->floorz;
|
||||||
|
P_CheckFakeFloorTriggers (thing, oldz);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
|
@ -5058,6 +5062,7 @@ void PIT_FloorDrop (AActor *thing, FChangePosition *cpos)
|
||||||
void PIT_FloorRaise (AActor *thing, FChangePosition *cpos)
|
void PIT_FloorRaise (AActor *thing, FChangePosition *cpos)
|
||||||
{
|
{
|
||||||
fixed_t oldfloorz = thing->floorz;
|
fixed_t oldfloorz = thing->floorz;
|
||||||
|
fixed_t oldz = thing->z;
|
||||||
|
|
||||||
P_AdjustFloorCeil (thing, cpos);
|
P_AdjustFloorCeil (thing, cpos);
|
||||||
|
|
||||||
|
@ -5072,22 +5077,30 @@ void PIT_FloorRaise (AActor *thing, FChangePosition *cpos)
|
||||||
return; // do not move bridge things
|
return; // do not move bridge things
|
||||||
}
|
}
|
||||||
intersectors.Clear ();
|
intersectors.Clear ();
|
||||||
fixed_t oldz = thing->z;
|
|
||||||
thing->z = thing->floorz;
|
thing->z = thing->floorz;
|
||||||
switch (P_PushUp (thing, cpos))
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if((thing->flags & MF_NOGRAVITY) && (thing->flags6 & MF6_RELATIVETOFLOOR))
|
||||||
{
|
{
|
||||||
default:
|
intersectors.Clear ();
|
||||||
P_CheckFakeFloorTriggers (thing, oldz);
|
thing->z = thing->z - oldfloorz + thing->floorz;
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
P_DoCrunch (thing, cpos);
|
|
||||||
P_CheckFakeFloorTriggers (thing, oldz);
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
P_DoCrunch (thing, cpos);
|
|
||||||
thing->z = oldz;
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
else return;
|
||||||
|
}
|
||||||
|
switch (P_PushUp (thing, cpos))
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
P_CheckFakeFloorTriggers (thing, oldz);
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
P_DoCrunch (thing, cpos);
|
||||||
|
P_CheckFakeFloorTriggers (thing, oldz);
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
P_DoCrunch (thing, cpos);
|
||||||
|
thing->z = oldz;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -200,8 +200,12 @@ void AActor::Serialize (FArchive &arc)
|
||||||
<< flags3
|
<< flags3
|
||||||
<< flags4
|
<< flags4
|
||||||
<< flags5
|
<< flags5
|
||||||
<< flags6
|
<< flags6;
|
||||||
<< special1
|
if (SaveVersion >= 4504)
|
||||||
|
{
|
||||||
|
arc << flags7;
|
||||||
|
}
|
||||||
|
arc << special1
|
||||||
<< special2
|
<< special2
|
||||||
<< health
|
<< health
|
||||||
<< movedir
|
<< movedir
|
||||||
|
@ -826,7 +830,7 @@ void AActor::CopyFriendliness (AActor *other, bool changeTarget, bool resetHealt
|
||||||
flags4 = (flags4 & ~(MF4_NOHATEPLAYERS | MF4_BOSSSPAWNED)) | (other->flags4 & (MF4_NOHATEPLAYERS | MF4_BOSSSPAWNED));
|
flags4 = (flags4 & ~(MF4_NOHATEPLAYERS | MF4_BOSSSPAWNED)) | (other->flags4 & (MF4_NOHATEPLAYERS | MF4_BOSSSPAWNED));
|
||||||
FriendPlayer = other->FriendPlayer;
|
FriendPlayer = other->FriendPlayer;
|
||||||
DesignatedTeam = other->DesignatedTeam;
|
DesignatedTeam = other->DesignatedTeam;
|
||||||
if (changeTarget && other->target != NULL && !(other->target->flags3 & MF3_NOTARGET))
|
if (changeTarget && other->target != NULL && !(other->target->flags3 & MF3_NOTARGET) && !(other->target->flags7 & MF7_NEVERTARGET))
|
||||||
{
|
{
|
||||||
// LastHeard must be set as well so that A_Look can react to the new target if called
|
// LastHeard must be set as well so that A_Look can react to the new target if called
|
||||||
LastHeard = target = other->target;
|
LastHeard = target = other->target;
|
||||||
|
@ -3993,8 +3997,12 @@ void AActor::HandleSpawnFlags ()
|
||||||
}
|
}
|
||||||
if (SpawnFlags & MTF_SECRET)
|
if (SpawnFlags & MTF_SECRET)
|
||||||
{
|
{
|
||||||
//Printf("Secret %s in sector %i!\n", GetTag(), Sector->sectornum);
|
if (!(flags5 & MF5_COUNTSECRET))
|
||||||
flags5 |= MF5_COUNTSECRET;
|
{
|
||||||
|
//Printf("Secret %s in sector %i!\n", GetTag(), Sector->sectornum);
|
||||||
|
flags5 |= MF5_COUNTSECRET;
|
||||||
|
level.total_secrets++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4712,6 +4720,10 @@ AActor *P_SpawnMapThing (FMapThing *mthing, int position)
|
||||||
mobj->SpawnPoint[2] = mthing->z;
|
mobj->SpawnPoint[2] = mthing->z;
|
||||||
mobj->SpawnAngle = mthing->angle;
|
mobj->SpawnAngle = mthing->angle;
|
||||||
mobj->SpawnFlags = mthing->flags;
|
mobj->SpawnFlags = mthing->flags;
|
||||||
|
if (mthing->gravity < 0) mobj->gravity = -mthing->gravity;
|
||||||
|
else if (mthing->gravity > 0) mobj->gravity = FixedMul(mobj->gravity, mthing->gravity);
|
||||||
|
else mobj->flags &= ~MF_NOGRAVITY;
|
||||||
|
|
||||||
P_FindFloorCeiling(mobj, FFCF_SAMESECTOR | FFCF_ONLY3DFLOORS | FFCF_3DRESTRICT);
|
P_FindFloorCeiling(mobj, FFCF_SAMESECTOR | FFCF_ONLY3DFLOORS | FFCF_3DRESTRICT);
|
||||||
|
|
||||||
if (!(mobj->flags2 & MF2_ARGSDEFINED))
|
if (!(mobj->flags2 & MF2_ARGSDEFINED))
|
||||||
|
@ -6129,6 +6141,9 @@ void PrintMiscActorInfo(AActor *query)
|
||||||
Printf("\n\tflags6: %x", query->flags6);
|
Printf("\n\tflags6: %x", query->flags6);
|
||||||
for (flagi = 0; flagi <= 31; flagi++)
|
for (flagi = 0; flagi <= 31; flagi++)
|
||||||
if (query->flags6 & 1<<flagi) Printf(" %s", FLAG_NAME(1<<flagi, flags6));
|
if (query->flags6 & 1<<flagi) Printf(" %s", FLAG_NAME(1<<flagi, flags6));
|
||||||
|
Printf("\n\tflags7: %x", query->flags7);
|
||||||
|
for (flagi = 0; flagi <= 31; flagi++)
|
||||||
|
if (query->flags7 & 1<<flagi) Printf(" %s", FLAG_NAME(1<<flagi, flags7));
|
||||||
Printf("\nBounce flags: %x\nBounce factors: f:%f, w:%f",
|
Printf("\nBounce flags: %x\nBounce factors: f:%f, w:%f",
|
||||||
query->BounceFlags, FIXED2FLOAT(query->bouncefactor),
|
query->BounceFlags, FIXED2FLOAT(query->bouncefactor),
|
||||||
FIXED2FLOAT(query->wallbouncefactor));
|
FIXED2FLOAT(query->wallbouncefactor));
|
||||||
|
|
|
@ -329,7 +329,15 @@ MapData *P_OpenMapData(const char * mapname)
|
||||||
// Since levels must be stored in WADs they can't really have full
|
// Since levels must be stored in WADs they can't really have full
|
||||||
// names and for any valid level lump this always returns the short name.
|
// names and for any valid level lump this always returns the short name.
|
||||||
const char * lumpname = Wads.GetLumpFullName(lump_name + i);
|
const char * lumpname = Wads.GetLumpFullName(lump_name + i);
|
||||||
index = GetMapIndex(mapname, index, lumpname, i != 1 || Wads.LumpLength(lump_name + i) == 0);
|
try
|
||||||
|
{
|
||||||
|
index = GetMapIndex(mapname, index, lumpname, true);
|
||||||
|
}
|
||||||
|
catch(...)
|
||||||
|
{
|
||||||
|
delete map;
|
||||||
|
throw;
|
||||||
|
}
|
||||||
if (index == ML_BEHAVIOR) map->HasBehavior = true;
|
if (index == ML_BEHAVIOR) map->HasBehavior = true;
|
||||||
|
|
||||||
// The next lump is not part of this map anymore
|
// The next lump is not part of this map anymore
|
||||||
|
@ -461,7 +469,15 @@ MapData *P_OpenMapData(const char * mapname)
|
||||||
|
|
||||||
if (i>0)
|
if (i>0)
|
||||||
{
|
{
|
||||||
index = GetMapIndex(maplabel, index, lumpname, true);
|
try
|
||||||
|
{
|
||||||
|
index = GetMapIndex(maplabel, index, lumpname, true);
|
||||||
|
}
|
||||||
|
catch(...)
|
||||||
|
{
|
||||||
|
delete map;
|
||||||
|
throw;
|
||||||
|
}
|
||||||
if (index == ML_BEHAVIOR) map->HasBehavior = true;
|
if (index == ML_BEHAVIOR) map->HasBehavior = true;
|
||||||
|
|
||||||
// The next lump is not part of this map anymore
|
// The next lump is not part of this map anymore
|
||||||
|
@ -1734,6 +1750,7 @@ void P_LoadThings (MapData * map)
|
||||||
|
|
||||||
memset (&mti[i], 0, sizeof(mti[i]));
|
memset (&mti[i], 0, sizeof(mti[i]));
|
||||||
|
|
||||||
|
mti[i].gravity = FRACUNIT;
|
||||||
mti[i].Conversation = 0;
|
mti[i].Conversation = 0;
|
||||||
mti[i].SkillFilter = MakeSkill(flags);
|
mti[i].SkillFilter = MakeSkill(flags);
|
||||||
mti[i].ClassFilter = 0xffff; // Doom map format doesn't have class flags so spawn for all player classes
|
mti[i].ClassFilter = 0xffff; // Doom map format doesn't have class flags so spawn for all player classes
|
||||||
|
@ -1809,6 +1826,7 @@ void P_LoadThings2 (MapData * map)
|
||||||
mti[i].ClassFilter = (mti[i].flags & MTF_CLASS_MASK) >> MTF_CLASS_SHIFT;
|
mti[i].ClassFilter = (mti[i].flags & MTF_CLASS_MASK) >> MTF_CLASS_SHIFT;
|
||||||
mti[i].flags &= ~(MTF_SKILLMASK|MTF_CLASS_MASK);
|
mti[i].flags &= ~(MTF_SKILLMASK|MTF_CLASS_MASK);
|
||||||
mti[i].Conversation = 0;
|
mti[i].Conversation = 0;
|
||||||
|
mti[i].gravity = FRACUNIT;
|
||||||
}
|
}
|
||||||
delete[] mtp;
|
delete[] mtp;
|
||||||
}
|
}
|
||||||
|
|
|
@ -452,6 +452,7 @@ bool P_Thing_Raise(AActor *thing)
|
||||||
thing->flags4 = info->flags4;
|
thing->flags4 = info->flags4;
|
||||||
thing->flags5 = info->flags5;
|
thing->flags5 = info->flags5;
|
||||||
thing->flags6 = info->flags6;
|
thing->flags6 = info->flags6;
|
||||||
|
thing->flags7 = info->flags7;
|
||||||
thing->health = info->health;
|
thing->health = info->health;
|
||||||
thing->target = NULL;
|
thing->target = NULL;
|
||||||
thing->lastenemy = NULL;
|
thing->lastenemy = NULL;
|
||||||
|
|
|
@ -475,6 +475,7 @@ public:
|
||||||
FString arg0str, arg1str;
|
FString arg0str, arg1str;
|
||||||
|
|
||||||
memset(th, 0, sizeof(*th));
|
memset(th, 0, sizeof(*th));
|
||||||
|
th->gravity = FRACUNIT;
|
||||||
sc.MustGetToken('{');
|
sc.MustGetToken('{');
|
||||||
while (!sc.CheckToken('}'))
|
while (!sc.CheckToken('}'))
|
||||||
{
|
{
|
||||||
|
@ -515,6 +516,11 @@ public:
|
||||||
th->special = CheckInt(key);
|
th->special = CheckInt(key);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case NAME_Gravity:
|
||||||
|
CHECK_N(Zd | Zdt)
|
||||||
|
th->gravity = CheckFixed(key);
|
||||||
|
break;
|
||||||
|
|
||||||
case NAME_Arg0:
|
case NAME_Arg0:
|
||||||
case NAME_Arg1:
|
case NAME_Arg1:
|
||||||
case NAME_Arg2:
|
case NAME_Arg2:
|
||||||
|
@ -921,6 +927,10 @@ public:
|
||||||
Flag(ld->flags, ML_BLOCKSIGHT, key);
|
Flag(ld->flags, ML_BLOCKSIGHT, key);
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
case NAME_blockhitscan:
|
||||||
|
Flag(ld->flags, ML_BLOCKHITSCAN, key);
|
||||||
|
continue;
|
||||||
|
|
||||||
// [Dusk] lock number
|
// [Dusk] lock number
|
||||||
case NAME_Locknumber:
|
case NAME_Locknumber:
|
||||||
ld->locknumber = CheckInt(key);
|
ld->locknumber = CheckInt(key);
|
||||||
|
@ -1326,7 +1336,11 @@ public:
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
case NAME_hidden:
|
case NAME_hidden:
|
||||||
sec->MoreFlags |= SECF_HIDDEN;
|
Flag(sec->MoreFlags, SECF_HIDDEN, key);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case NAME_Waterzone:
|
||||||
|
Flag(sec->MoreFlags, SECF_UNDERWATER, key);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -288,6 +288,7 @@ class USDFParser : public UDMFParserBase
|
||||||
//node->ItemCheckCount[0] = node->ItemCheckCount[1] = node->ItemCheckCount[2] = -1;
|
//node->ItemCheckCount[0] = node->ItemCheckCount[1] = node->ItemCheckCount[2] = -1;
|
||||||
|
|
||||||
node->ThisNodeNum = StrifeDialogues.Push(node);
|
node->ThisNodeNum = StrifeDialogues.Push(node);
|
||||||
|
node->ItemCheckNode = -1;
|
||||||
|
|
||||||
FString SpeakerName;
|
FString SpeakerName;
|
||||||
FString Dialogue;
|
FString Dialogue;
|
||||||
|
|
|
@ -477,6 +477,10 @@ void APlayerPawn::Serialize (FArchive &arc)
|
||||||
{
|
{
|
||||||
arc << UseRange;
|
arc << UseRange;
|
||||||
}
|
}
|
||||||
|
if (SaveVersion >= 4503)
|
||||||
|
{
|
||||||
|
arc << AirCapacity;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
|
@ -1066,7 +1070,7 @@ bool APlayerPawn::ResetAirSupply (bool playgasp)
|
||||||
{
|
{
|
||||||
S_Sound (this, CHAN_VOICE, "*gasp", 1, ATTN_NORM);
|
S_Sound (this, CHAN_VOICE, "*gasp", 1, ATTN_NORM);
|
||||||
}
|
}
|
||||||
if (level.airsupply> 0) player->air_finished = level.time + level.airsupply;
|
if (level.airsupply> 0 && player->mo->AirCapacity > 0) player->air_finished = level.time + FixedMul(level.airsupply, player->mo->AirCapacity);
|
||||||
else player->air_finished = INT_MAX;
|
else player->air_finished = INT_MAX;
|
||||||
return wasdrowning;
|
return wasdrowning;
|
||||||
}
|
}
|
||||||
|
|
|
@ -828,7 +828,7 @@ void R_RenderFakeWallRange (drawseg_t *ds, int x1, int x2)
|
||||||
{
|
{
|
||||||
if (sclipTop <= backsector->e->XFloor.lightlist[j].plane.Zat0())
|
if (sclipTop <= backsector->e->XFloor.lightlist[j].plane.Zat0())
|
||||||
{
|
{
|
||||||
lightlist_t *lit = &backsector->e->XFloor.lightlist[i];
|
lightlist_t *lit = &backsector->e->XFloor.lightlist[j];
|
||||||
basecolormap = lit->extra_colormap;
|
basecolormap = lit->extra_colormap;
|
||||||
wallshade = LIGHT2SHADE(curline->sidedef->GetLightLevel(foggy, *lit->p_lightlevel, lit->lightsource == NULL) + r_actualextralight);
|
wallshade = LIGHT2SHADE(curline->sidedef->GetLightLevel(foggy, *lit->p_lightlevel, lit->lightsource == NULL) + r_actualextralight);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -259,6 +259,13 @@ bool FZipFile::Open(bool quiet)
|
||||||
lump_p->CompressedSize = LittleLong(zip_fh->CompressedSize);
|
lump_p->CompressedSize = LittleLong(zip_fh->CompressedSize);
|
||||||
lump_p->Position = LittleLong(zip_fh->LocalHeaderOffset);
|
lump_p->Position = LittleLong(zip_fh->LocalHeaderOffset);
|
||||||
lump_p->CheckEmbedded();
|
lump_p->CheckEmbedded();
|
||||||
|
|
||||||
|
// Ignore some very specific names
|
||||||
|
if (0 == stricmp("dehacked.exe", name))
|
||||||
|
{
|
||||||
|
memset(lump_p->Name, 0, sizeof(lump_p->Name));
|
||||||
|
}
|
||||||
|
|
||||||
lump_p++;
|
lump_p++;
|
||||||
}
|
}
|
||||||
// Resize the lump record array to its actual size
|
// Resize the lump record array to its actual size
|
||||||
|
|
|
@ -816,7 +816,7 @@ bool FMODSoundRenderer::Init()
|
||||||
}
|
}
|
||||||
|
|
||||||
result = Sys->getNumDrivers(&driver);
|
result = Sys->getNumDrivers(&driver);
|
||||||
#ifdef unix
|
#ifdef __unix__
|
||||||
if (result == FMOD_OK)
|
if (result == FMOD_OK)
|
||||||
{
|
{
|
||||||
// On Linux, FMOD defaults to OSS. If OSS is not present, it doesn't
|
// On Linux, FMOD defaults to OSS. If OSS is not present, it doesn't
|
||||||
|
|
|
@ -295,7 +295,7 @@ FluidSynthMIDIDevice::FluidSynthMIDIDevice()
|
||||||
fluid_chorus_speed, fluid_chorus_depth, fluid_chorus_type);
|
fluid_chorus_speed, fluid_chorus_depth, fluid_chorus_type);
|
||||||
if (0 == LoadPatchSets(fluid_patchset))
|
if (0 == LoadPatchSets(fluid_patchset))
|
||||||
{
|
{
|
||||||
#ifdef unix
|
#ifdef __unix__
|
||||||
// This is the standard location on Ubuntu.
|
// This is the standard location on Ubuntu.
|
||||||
if (0 == LoadPatchSets("/usr/share/sounds/sf2/FluidR3_GS.sf2:/usr/share/sounds/sf2/FluidR3_GM.sf2"))
|
if (0 == LoadPatchSets("/usr/share/sounds/sf2/FluidR3_GS.sf2:/usr/share/sounds/sf2/FluidR3_GM.sf2"))
|
||||||
{
|
{
|
||||||
|
@ -322,7 +322,7 @@ FluidSynthMIDIDevice::FluidSynthMIDIDevice()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#ifdef unix
|
#ifdef __unix__
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
@ -127,7 +127,7 @@ void FTextureManager::DeleteAll()
|
||||||
{
|
{
|
||||||
if (mAnimatedDoors[i].TextureFrames != NULL)
|
if (mAnimatedDoors[i].TextureFrames != NULL)
|
||||||
{
|
{
|
||||||
delete mAnimatedDoors[i].TextureFrames;
|
delete[] mAnimatedDoors[i].TextureFrames;
|
||||||
mAnimatedDoors[i].TextureFrames = NULL;
|
mAnimatedDoors[i].TextureFrames = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,6 +31,7 @@ bool CheckDeprecatedFlags(const AActor *actor, FActorInfo *info, int index);
|
||||||
const char *GetFlagName(unsigned int flagnum, int flagoffset);
|
const char *GetFlagName(unsigned int flagnum, int flagoffset);
|
||||||
void ModActorFlag(AActor *actor, FFlagDef *fd, bool set);
|
void ModActorFlag(AActor *actor, FFlagDef *fd, bool set);
|
||||||
INTBOOL CheckActorFlag(const AActor *actor, FFlagDef *fd);
|
INTBOOL CheckActorFlag(const AActor *actor, FFlagDef *fd);
|
||||||
|
INTBOOL CheckActorFlag(const AActor *owner, const char *flagname, bool printerror = true);
|
||||||
|
|
||||||
#define FLAG_NAME(flagnum, flagvar) GetFlagName(flagnum, myoffsetof(AActor, flagvar))
|
#define FLAG_NAME(flagnum, flagvar) GetFlagName(flagnum, myoffsetof(AActor, flagvar))
|
||||||
|
|
||||||
|
@ -354,11 +355,11 @@ int MatchString (const char *in, const char **strings);
|
||||||
MSVC_MSEG FVariableInfo *infoptr_GlobalDef__##name GCC_MSEG = &GlobalDef__##name;
|
MSVC_MSEG FVariableInfo *infoptr_GlobalDef__##name GCC_MSEG = &GlobalDef__##name;
|
||||||
|
|
||||||
#define DEFINE_MEMBER_VARIABLE(name, cls) \
|
#define DEFINE_MEMBER_VARIABLE(name, cls) \
|
||||||
static FVariableInfo GlobalDef__##name = { #name, myoffsetof(cls, name), RUNTIME_CLASS(cls) }; \
|
static FVariableInfo GlobalDef__##name = { #name, static_cast<intptr_t>(myoffsetof(cls, name)), RUNTIME_CLASS(cls) }; \
|
||||||
MSVC_MSEG FVariableInfo *infoptr_GlobalDef__##name GCC_MSEG = &GlobalDef__##name;
|
MSVC_MSEG FVariableInfo *infoptr_GlobalDef__##name GCC_MSEG = &GlobalDef__##name;
|
||||||
|
|
||||||
#define DEFINE_MEMBER_VARIABLE_ALIAS(name, alias, cls) \
|
#define DEFINE_MEMBER_VARIABLE_ALIAS(name, alias, cls) \
|
||||||
static FVariableInfo GlobalDef__##name = { #name, myoffsetof(cls, alias), RUNTIME_CLASS(cls) }; \
|
static FVariableInfo GlobalDef__##name = { #name, static_cast<intptr_t>(myoffsetof(cls, alias)), RUNTIME_CLASS(cls) }; \
|
||||||
MSVC_MSEG FVariableInfo *infoptr_GlobalDef__##name GCC_MSEG = &GlobalDef__##name;
|
MSVC_MSEG FVariableInfo *infoptr_GlobalDef__##name GCC_MSEG = &GlobalDef__##name;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -3777,32 +3777,10 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CheckFlag)
|
||||||
|
|
||||||
COPY_AAPTR_NOT_NULL(self, owner, checkpointer);
|
COPY_AAPTR_NOT_NULL(self, owner, checkpointer);
|
||||||
|
|
||||||
const char *dot = strchr (flagname, '.');
|
if (CheckActorFlag(owner, flagname))
|
||||||
FFlagDef *fd;
|
|
||||||
const PClass *cls = owner->GetClass();
|
|
||||||
|
|
||||||
if (dot != NULL)
|
|
||||||
{
|
{
|
||||||
FString part1(flagname, dot-flagname);
|
ACTION_JUMP(jumpto);
|
||||||
fd = FindFlag (cls, part1, dot+1);
|
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
fd = FindFlag (cls, flagname, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (fd != NULL)
|
|
||||||
{
|
|
||||||
if (CheckActorFlag(owner, fd))
|
|
||||||
{
|
|
||||||
ACTION_JUMP(jumpto);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Printf("Unknown flag '%s' in '%s'\n", flagname, cls->TypeName.GetChars());
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -4951,3 +4929,19 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SetDamageType)
|
||||||
|
|
||||||
self->DamageType = damagetype;
|
self->DamageType = damagetype;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//==========================================================================
|
||||||
|
//
|
||||||
|
// A_DropItem
|
||||||
|
//
|
||||||
|
//==========================================================================
|
||||||
|
|
||||||
|
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_DropItem)
|
||||||
|
{
|
||||||
|
ACTION_PARAM_START(3);
|
||||||
|
ACTION_PARAM_CLASS(spawntype, 0);
|
||||||
|
ACTION_PARAM_INT(amount, 1);
|
||||||
|
ACTION_PARAM_INT(chance, 2);
|
||||||
|
|
||||||
|
P_DropItem(self, spawntype, amount, chance);
|
||||||
|
}
|
||||||
|
|
|
@ -184,6 +184,7 @@ static FFlagDef ActorFlags[]=
|
||||||
|
|
||||||
DEFINE_FLAG(MF5, DONTDRAIN, AActor, flags5),
|
DEFINE_FLAG(MF5, DONTDRAIN, AActor, flags5),
|
||||||
DEFINE_FLAG(MF5, NODROPOFF, AActor, flags5),
|
DEFINE_FLAG(MF5, NODROPOFF, AActor, flags5),
|
||||||
|
DEFINE_FLAG(MF5, NOFORWARDFALL, AActor, flags5),
|
||||||
DEFINE_FLAG(MF5, COUNTSECRET, AActor, flags5),
|
DEFINE_FLAG(MF5, COUNTSECRET, AActor, flags5),
|
||||||
DEFINE_FLAG(MF5, NODAMAGE, AActor, flags5),
|
DEFINE_FLAG(MF5, NODAMAGE, AActor, flags5),
|
||||||
DEFINE_FLAG(MF5, BLOODSPLATTER, AActor, flags5),
|
DEFINE_FLAG(MF5, BLOODSPLATTER, AActor, flags5),
|
||||||
|
@ -233,6 +234,12 @@ static FFlagDef ActorFlags[]=
|
||||||
DEFINE_FLAG(MF6, DOHARMSPECIES, AActor, flags6),
|
DEFINE_FLAG(MF6, DOHARMSPECIES, AActor, flags6),
|
||||||
DEFINE_FLAG(MF6, POISONALWAYS, AActor, flags6),
|
DEFINE_FLAG(MF6, POISONALWAYS, AActor, flags6),
|
||||||
DEFINE_FLAG(MF6, NOTAUTOAIMED, AActor, flags6),
|
DEFINE_FLAG(MF6, NOTAUTOAIMED, AActor, flags6),
|
||||||
|
DEFINE_FLAG(MF6, NOTONAUTOMAP, AActor, flags6),
|
||||||
|
DEFINE_FLAG(MF6, RELATIVETOFLOOR, AActor, flags6),
|
||||||
|
|
||||||
|
DEFINE_FLAG(MF7, NEVERTARGET, AActor, flags7),
|
||||||
|
DEFINE_FLAG(MF7, NOTELESTOMP, AActor, flags7),
|
||||||
|
DEFINE_FLAG(MF7, ALWAYSTELEFRAG, AActor, flags7),
|
||||||
|
|
||||||
// Effect flags
|
// Effect flags
|
||||||
DEFINE_FLAG(FX, VISIBILITYPULSE, AActor, effects),
|
DEFINE_FLAG(FX, VISIBILITYPULSE, AActor, effects),
|
||||||
|
@ -302,6 +309,7 @@ static FFlagDef InventoryFlags[] =
|
||||||
DEFINE_FLAG(IF, RESTRICTABSOLUTELY, AInventory, ItemFlags),
|
DEFINE_FLAG(IF, RESTRICTABSOLUTELY, AInventory, ItemFlags),
|
||||||
DEFINE_FLAG(IF, NEVERRESPAWN, AInventory, ItemFlags),
|
DEFINE_FLAG(IF, NEVERRESPAWN, AInventory, ItemFlags),
|
||||||
DEFINE_FLAG(IF, NOSCREENFLASH, AInventory, ItemFlags),
|
DEFINE_FLAG(IF, NOSCREENFLASH, AInventory, ItemFlags),
|
||||||
|
DEFINE_FLAG(IF, TOSSED, AInventory, ItemFlags),
|
||||||
|
|
||||||
DEFINE_DEPRECATED_FLAG(PICKUPFLASH),
|
DEFINE_DEPRECATED_FLAG(PICKUPFLASH),
|
||||||
DEFINE_DEPRECATED_FLAG(INTERHUBSTRIP),};
|
DEFINE_DEPRECATED_FLAG(INTERHUBSTRIP),};
|
||||||
|
|
|
@ -867,7 +867,7 @@ static void ParseActionDef (FScanner &sc, PClass *cls)
|
||||||
OPTIONAL = 1
|
OPTIONAL = 1
|
||||||
};
|
};
|
||||||
|
|
||||||
bool error = false;
|
unsigned int error = 0;
|
||||||
const AFuncDesc *afd;
|
const AFuncDesc *afd;
|
||||||
FName funcname;
|
FName funcname;
|
||||||
FString args;
|
FString args;
|
||||||
|
@ -876,8 +876,8 @@ static void ParseActionDef (FScanner &sc, PClass *cls)
|
||||||
|
|
||||||
if (sc.LumpNum == -1 || Wads.GetLumpFile(sc.LumpNum) > 0)
|
if (sc.LumpNum == -1 || Wads.GetLumpFile(sc.LumpNum) > 0)
|
||||||
{
|
{
|
||||||
sc.ScriptMessage ("action functions can only be imported by internal class and actor definitions!");
|
sc.ScriptMessage ("Action functions can only be imported by internal class and actor definitions!");
|
||||||
error++;
|
++error;
|
||||||
}
|
}
|
||||||
|
|
||||||
sc.MustGetToken(TK_Native);
|
sc.MustGetToken(TK_Native);
|
||||||
|
@ -887,7 +887,7 @@ static void ParseActionDef (FScanner &sc, PClass *cls)
|
||||||
if (afd == NULL)
|
if (afd == NULL)
|
||||||
{
|
{
|
||||||
sc.ScriptMessage ("The function '%s' has not been exported from the executable.", sc.String);
|
sc.ScriptMessage ("The function '%s' has not been exported from the executable.", sc.String);
|
||||||
error++;
|
++error;
|
||||||
}
|
}
|
||||||
sc.MustGetToken('(');
|
sc.MustGetToken('(');
|
||||||
if (!sc.CheckToken(')'))
|
if (!sc.CheckToken(')'))
|
||||||
|
@ -998,7 +998,7 @@ static void ParseActionDef (FScanner &sc, PClass *cls)
|
||||||
}
|
}
|
||||||
if (error)
|
if (error)
|
||||||
{
|
{
|
||||||
FScriptPosition::ErrorCounter++;
|
FScriptPosition::ErrorCounter += error;
|
||||||
}
|
}
|
||||||
else if (cls->Symbols.AddSymbol (sym) == NULL)
|
else if (cls->Symbols.AddSymbol (sym) == NULL)
|
||||||
{
|
{
|
||||||
|
|
|
@ -180,6 +180,33 @@ INTBOOL CheckActorFlag(const AActor *owner, FFlagDef *fd)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
INTBOOL CheckActorFlag(const AActor *owner, const char *flagname, bool printerror)
|
||||||
|
{
|
||||||
|
const char *dot = strchr (flagname, '.');
|
||||||
|
FFlagDef *fd;
|
||||||
|
const PClass *cls = owner->GetClass();
|
||||||
|
|
||||||
|
if (dot != NULL)
|
||||||
|
{
|
||||||
|
FString part1(flagname, dot-flagname);
|
||||||
|
fd = FindFlag (cls, part1, dot+1);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
fd = FindFlag (cls, flagname, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (fd != NULL)
|
||||||
|
{
|
||||||
|
return CheckActorFlag(owner, fd);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (printerror) Printf("Unknown flag '%s' in '%s'\n", flagname, cls->TypeName.GetChars());
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
//
|
//
|
||||||
// HandleDeprecatedFlags
|
// HandleDeprecatedFlags
|
||||||
|
@ -433,7 +460,7 @@ DEFINE_PROPERTY(skip_super, 0, Actor)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
memcpy (defaults, GetDefault<AActor>(), sizeof(AActor));
|
memcpy ((void *)defaults, (void *)GetDefault<AActor>(), sizeof(AActor));
|
||||||
if (bag.DropItemList != NULL)
|
if (bag.DropItemList != NULL)
|
||||||
{
|
{
|
||||||
FreeDropItemChain (bag.DropItemList);
|
FreeDropItemChain (bag.DropItemList);
|
||||||
|
@ -1286,7 +1313,8 @@ DEFINE_PROPERTY(clearflags, 0, Actor)
|
||||||
defaults->flags3 =
|
defaults->flags3 =
|
||||||
defaults->flags4 =
|
defaults->flags4 =
|
||||||
defaults->flags5 =
|
defaults->flags5 =
|
||||||
defaults->flags6 = 0;
|
defaults->flags6 =
|
||||||
|
defaults->flags7 = 0;
|
||||||
defaults->flags2 &= MF2_ARGSDEFINED; // this flag must not be cleared
|
defaults->flags2 &= MF2_ARGSDEFINED; // this flag must not be cleared
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2113,9 +2141,8 @@ DEFINE_CLASS_PROPERTY_PREFIX(powerup, strength, F, Inventory)
|
||||||
I_Error("\"powerup.strength\" requires an actor of type \"Powerup\"\n");
|
I_Error("\"powerup.strength\" requires an actor of type \"Powerup\"\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Puts a percent value in the 0.0..1.0 range
|
|
||||||
PROP_FIXED_PARM(f, 0);
|
PROP_FIXED_PARM(f, 0);
|
||||||
*pStrength = f / 100;
|
*pStrength = f;
|
||||||
}
|
}
|
||||||
|
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
@ -2419,6 +2446,15 @@ DEFINE_CLASS_PROPERTY_PREFIX(player, userange, F, PlayerPawn)
|
||||||
defaults->UseRange = z;
|
defaults->UseRange = z;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//==========================================================================
|
||||||
|
//
|
||||||
|
//==========================================================================
|
||||||
|
DEFINE_CLASS_PROPERTY_PREFIX(player, aircapacity, F, PlayerPawn)
|
||||||
|
{
|
||||||
|
PROP_FIXED_PARM(z, 0);
|
||||||
|
defaults->AirCapacity = z;
|
||||||
|
}
|
||||||
|
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
//
|
//
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
|
@ -166,7 +166,7 @@ static Instrument *load_instrument(Renderer *song, const char *name, int percuss
|
||||||
tmp += ".pat";
|
tmp += ".pat";
|
||||||
if ((fp = open_filereader(tmp, openmode, NULL)) == NULL)
|
if ((fp = open_filereader(tmp, openmode, NULL)) == NULL)
|
||||||
{
|
{
|
||||||
#ifdef unix // Windows isn't case-sensitive.
|
#ifdef __unix__ // Windows isn't case-sensitive.
|
||||||
tmp.ToUpper();
|
tmp.ToUpper();
|
||||||
if ((fp = open_filereader(tmp, openmode, NULL)) == NULL)
|
if ((fp = open_filereader(tmp, openmode, NULL)) == NULL)
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -76,7 +76,7 @@ const char *GetVersionString();
|
||||||
|
|
||||||
// Use 4500 as the base git save version, since it's higher than the
|
// Use 4500 as the base git save version, since it's higher than the
|
||||||
// SVN revision ever got.
|
// SVN revision ever got.
|
||||||
#define SAVEVER 4502
|
#define SAVEVER 4504
|
||||||
|
|
||||||
#define SAVEVERSTRINGIFY2(x) #x
|
#define SAVEVERSTRINGIFY2(x) #x
|
||||||
#define SAVEVERSTRINGIFY(x) SAVEVERSTRINGIFY2(x)
|
#define SAVEVERSTRINGIFY(x) SAVEVERSTRINGIFY2(x)
|
||||||
|
@ -91,7 +91,7 @@ const char *GetVersionString();
|
||||||
#define FORUM_URL "http://forum.zdoom.org"
|
#define FORUM_URL "http://forum.zdoom.org"
|
||||||
#define BUGS_FORUM_URL "http://forum.zdoom.org/index.php?c=3"
|
#define BUGS_FORUM_URL "http://forum.zdoom.org/index.php?c=3"
|
||||||
|
|
||||||
#ifdef unix
|
#ifdef __unix__
|
||||||
#define GAME_DIR ".config/zdoom"
|
#define GAME_DIR ".config/zdoom"
|
||||||
#elif defined(__APPLE__)
|
#elif defined(__APPLE__)
|
||||||
#define GAME_DIR GAMENAME
|
#define GAME_DIR GAMENAME
|
||||||
|
|
|
@ -1947,7 +1947,7 @@ void WI_Ticker(void)
|
||||||
if (level.info->InterMusic.IsNotEmpty())
|
if (level.info->InterMusic.IsNotEmpty())
|
||||||
S_ChangeMusic(level.info->InterMusic, level.info->intermusicorder);
|
S_ChangeMusic(level.info->InterMusic, level.info->intermusicorder);
|
||||||
else
|
else
|
||||||
S_ChangeMusic (gameinfo.intermissionMusic.GetChars());
|
S_ChangeMusic (gameinfo.intermissionMusic.GetChars(), gameinfo.intermissionOrder);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -84,7 +84,7 @@ ACTOR Actor native //: Thinker
|
||||||
action native A_VileChase();
|
action native A_VileChase();
|
||||||
action native A_VileStart();
|
action native A_VileStart();
|
||||||
action native A_VileTarget(class<Actor> fire = "ArchvileFire");
|
action native A_VileTarget(class<Actor> fire = "ArchvileFire");
|
||||||
action native A_VileAttack(sound snd = "vile/stop", int initialdmg = 20, int blastdmg = 70, int blastradius = 70, float thrustfac = 1.0, name damagetype = "Fire");
|
action native A_VileAttack(sound snd = "vile/stop", int initialdmg = 20, int blastdmg = 70, int blastradius = 70, float thrustfac = 1.0, name damagetype = "Fire", int flags = 0);
|
||||||
action native A_StartFire();
|
action native A_StartFire();
|
||||||
action native A_Fire(float spawnheight = 0);
|
action native A_Fire(float spawnheight = 0);
|
||||||
action native A_FireCrackle();
|
action native A_FireCrackle();
|
||||||
|
@ -180,7 +180,7 @@ ACTOR Actor native //: Thinker
|
||||||
action native A_TurretLook();
|
action native A_TurretLook();
|
||||||
action native A_KlaxonBlare();
|
action native A_KlaxonBlare();
|
||||||
action native A_Countdown();
|
action native A_Countdown();
|
||||||
action native A_AlertMonsters(float maxdist = 0);
|
action native A_AlertMonsters(float maxdist = 0, int flags = 0);
|
||||||
action native A_ClearSoundTarget();
|
action native A_ClearSoundTarget();
|
||||||
action native A_FireAssaultGun();
|
action native A_FireAssaultGun();
|
||||||
action native A_CheckTerrain();
|
action native A_CheckTerrain();
|
||||||
|
@ -300,6 +300,7 @@ ACTOR Actor native //: Thinker
|
||||||
action native A_Quake(int intensity, int duration, int damrad, int tremrad, sound sfx = "world/quake");
|
action native A_Quake(int intensity, int duration, int damrad, int tremrad, sound sfx = "world/quake");
|
||||||
action native A_SetTics(int tics);
|
action native A_SetTics(int tics);
|
||||||
action native A_SetDamageType(name damagetype);
|
action native A_SetDamageType(name damagetype);
|
||||||
|
action native A_DropItem(class<Actor> item, int dropamount = -1, int chance = 256);
|
||||||
|
|
||||||
action native A_CheckSightOrRange(float distance, state label);
|
action native A_CheckSightOrRange(float distance, state label);
|
||||||
action native A_CheckRange(float distance, state label);
|
action native A_CheckRange(float distance, state label);
|
||||||
|
|
|
@ -4,6 +4,9 @@ const int PAF_NOSKULLATTACK = 1;
|
||||||
const int PAF_AIMFACING = 2;
|
const int PAF_AIMFACING = 2;
|
||||||
const int PAF_NOTARGET = 4;
|
const int PAF_NOTARGET = 4;
|
||||||
|
|
||||||
|
// Flags for A_VileAttack
|
||||||
|
const int VAF_DMGTYPEAPPLYTODIRECT = 1;
|
||||||
|
|
||||||
// Flags for A_Saw
|
// Flags for A_Saw
|
||||||
const int SF_NORANDOM = 1;
|
const int SF_NORANDOM = 1;
|
||||||
const int SF_RANDOMLIGHTMISS = 2;
|
const int SF_RANDOMLIGHTMISS = 2;
|
||||||
|
@ -345,5 +348,12 @@ enum
|
||||||
CLOFF_NOAIM = CLOFF_NOAIM_VERT|CLOFF_NOAIM_HORZ
|
CLOFF_NOAIM = CLOFF_NOAIM_VERT|CLOFF_NOAIM_HORZ
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// Flags for A_AlertMonsters
|
||||||
|
const int AMF_TARGETEMITTER = 1;
|
||||||
|
const int AMF_TARGETNONPLAYER = 2;
|
||||||
|
const int AMF_EMITFROMTARGET = 4;
|
||||||
|
|
||||||
|
|
||||||
// This is only here to provide one global variable for testing.
|
// This is only here to provide one global variable for testing.
|
||||||
native int testglobalvar;
|
native int testglobalvar;
|
||||||
|
|
|
@ -300,6 +300,7 @@ ACTOR PowerDrain : Powerup native
|
||||||
ACTOR PowerRegeneration : Powerup native
|
ACTOR PowerRegeneration : Powerup native
|
||||||
{
|
{
|
||||||
Powerup.Duration -120
|
Powerup.Duration -120
|
||||||
|
Powerup.Strength 5
|
||||||
}
|
}
|
||||||
|
|
||||||
ACTOR PowerHighJump : Powerup native {}
|
ACTOR PowerHighJump : Powerup native {}
|
||||||
|
|
|
@ -32,6 +32,7 @@ Actor PlayerPawn : Actor native
|
||||||
Player.DamageScreenColor "ff 00 00"
|
Player.DamageScreenColor "ff 00 00"
|
||||||
Player.MugShotMaxHealth 0
|
Player.MugShotMaxHealth 0
|
||||||
Player.FlechetteType "ArtiPoisonBag3"
|
Player.FlechetteType "ArtiPoisonBag3"
|
||||||
|
Player.AirCapacity 1
|
||||||
Obituary "$OB_MPDEFAULT"
|
Obituary "$OB_MPDEFAULT"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,7 @@ ACTOR AlienSpectre1 : SpectralMonster 129
|
||||||
PainSound "alienspectre/pain"
|
PainSound "alienspectre/pain"
|
||||||
DeathSound "alienspectre/death"
|
DeathSound "alienspectre/death"
|
||||||
ActiveSound "alienspectre/active"
|
ActiveSound "alienspectre/active"
|
||||||
|
Obituary "$OB_ALIENSPECTRE"
|
||||||
+NOGRAVITY
|
+NOGRAVITY
|
||||||
+FLOAT
|
+FLOAT
|
||||||
+SHADOW
|
+SHADOW
|
||||||
|
|
|
@ -736,7 +736,7 @@ OB_MACIL = "%o should have never rebelled against Macil.";
|
||||||
OB_REBEL = "%o was gunned down by a Rebel.";
|
OB_REBEL = "%o was gunned down by a Rebel.";
|
||||||
OB_BEGGAR = "%o was beaten to death by the poor.";
|
OB_BEGGAR = "%o was beaten to death by the poor.";
|
||||||
OB_PEASANT = "%o should have never picked a fight with a civilian.";
|
OB_PEASANT = "%o should have never picked a fight with a civilian.";
|
||||||
OB_ALIENSPECTE = "%o was struck down by the Spectre.";
|
OB_ALIENSPECTRE = "%o was struck down by the Spectre.";
|
||||||
OB_ENTITY = "%o felt the wrath of The One God.";
|
OB_ENTITY = "%o felt the wrath of The One God.";
|
||||||
OB_LOREMASTER = "%o couldn't escape from the Lore Master's grasp.";
|
OB_LOREMASTER = "%o couldn't escape from the Lore Master's grasp.";
|
||||||
OB_PROGRAMMER = "%o was deleted by the Programmer.";
|
OB_PROGRAMMER = "%o was deleted by the Programmer.";
|
||||||
|
|
|
@ -779,7 +779,7 @@ OB_MACIL = "%o n'aurait jamais du se rebelle contre Macil.";
|
||||||
OB_REBEL = "%o a ete abbatu par un Rebel.";
|
OB_REBEL = "%o a ete abbatu par un Rebel.";
|
||||||
OB_BEGGAR = "%o a ete battu a mort par un pauvre.";
|
OB_BEGGAR = "%o a ete battu a mort par un pauvre.";
|
||||||
OB_PEASANT = "%o n'aurait jamais du chercher la bagarre a un civil.";
|
OB_PEASANT = "%o n'aurait jamais du chercher la bagarre a un civil.";
|
||||||
OB_ALIENSPECTE = "%o a ete terrasse par le Spectre.";
|
OB_ALIENSPECTRE = "%o a ete terrasse par le Spectre.";
|
||||||
OB_ENTITY = "%o a senti le courroux du dieu unique.";
|
OB_ENTITY = "%o a senti le courroux du dieu unique.";
|
||||||
OB_LOREMASTER = "%o n'a pu echapper a l'emprise du Maitre des Traditions.";
|
OB_LOREMASTER = "%o n'a pu echapper a l'emprise du Maitre des Traditions.";
|
||||||
OB_PROGRAMMER = "%o a ete efface par le Programmer.";
|
OB_PROGRAMMER = "%o a ete efface par le Programmer.";
|
||||||
|
|
|
@ -712,7 +712,7 @@ OB_MACIL = "%o should have never rebelled against Macil.";
|
||||||
OB_REBEL = "%o was gunned down by a Rebel.";
|
OB_REBEL = "%o was gunned down by a Rebel.";
|
||||||
OB_BEGGAR = "%o was beaten to death by the poor.";
|
OB_BEGGAR = "%o was beaten to death by the poor.";
|
||||||
OB_PEASANT = "%o should have never picked a fight with a civilian.";
|
OB_PEASANT = "%o should have never picked a fight with a civilian.";
|
||||||
OB_ALIENSPECTE = "%o was struck down by the Spectre.";
|
OB_ALIENSPECTRE = "%o was struck down by the Spectre.";
|
||||||
OB_ENTITY = "%o felt the wrath of The One God.";
|
OB_ENTITY = "%o felt the wrath of The One God.";
|
||||||
OB_LOREMASTER = "%o couldn't escape from the Lore Master's grasp.";
|
OB_LOREMASTER = "%o couldn't escape from the Lore Master's grasp.";
|
||||||
OB_PROGRAMMER = "%o was deleted by the Programmer.";
|
OB_PROGRAMMER = "%o was deleted by the Programmer.";
|
||||||
|
|
|
@ -850,6 +850,13 @@ OptionValue Autosave
|
||||||
2, "Never"
|
2, "Never"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
OptionValue dehopt
|
||||||
|
{
|
||||||
|
0, "Never"
|
||||||
|
1, "All"
|
||||||
|
2, "Only last one"
|
||||||
|
}
|
||||||
|
|
||||||
OptionMenu "MiscOptions"
|
OptionMenu "MiscOptions"
|
||||||
{
|
{
|
||||||
Title "Miscellaneous Options"
|
Title "Miscellaneous Options"
|
||||||
|
@ -864,6 +871,7 @@ OptionMenu "MiscOptions"
|
||||||
Option "Enable cheats from all games", "allcheats", "OnOff"
|
Option "Enable cheats from all games", "allcheats", "OnOff"
|
||||||
Option "Enable autosaves", "disableautosave", "Autosave"
|
Option "Enable autosaves", "disableautosave", "Autosave"
|
||||||
Slider "Number of autosaves", "autosavecount", 1, 20, 1, 0
|
Slider "Number of autosaves", "autosavecount", 1, 20, 1, 0
|
||||||
|
Option "Load *.deh/*.bex lumps", "dehload", "dehopt"
|
||||||
StaticText " "
|
StaticText " "
|
||||||
Option "Cache nodes", "gl_cachenodes", "OnOff"
|
Option "Cache nodes", "gl_cachenodes", "OnOff"
|
||||||
Slider "Time threshold for node caching", "gl_cachetime", 0.0, 2.0, 0.1
|
Slider "Time threshold for node caching", "gl_cachetime", 0.0, 2.0, 0.1
|
||||||
|
@ -920,10 +928,18 @@ OptionValue STSTypes
|
||||||
3, "Rotated"
|
3, "Rotated"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
OptionValue MapBackTypes
|
||||||
|
{
|
||||||
|
0, "Off"
|
||||||
|
1, "On"
|
||||||
|
2, "Map defined colors only"
|
||||||
|
}
|
||||||
|
|
||||||
OptionMenu AutomapOptions
|
OptionMenu AutomapOptions
|
||||||
{
|
{
|
||||||
Title "AUTOMAP OPTIONS"
|
Title "AUTOMAP OPTIONS"
|
||||||
Option "Map color set", "am_colorset", "MapColorTypes"
|
Option "Map color set", "am_colorset", "MapColorTypes"
|
||||||
|
Option "Allow map defined colors", "am_customcolors", "YesNo"
|
||||||
Submenu "Set custom colors", "MapColorMenu"
|
Submenu "Set custom colors", "MapColorMenu"
|
||||||
Submenu "Customize map controls", "MapControlsMenu"
|
Submenu "Customize map controls", "MapControlsMenu"
|
||||||
StaticText " "
|
StaticText " "
|
||||||
|
@ -939,7 +955,7 @@ OptionMenu AutomapOptions
|
||||||
Option "Show total time elapsed", "am_showtotaltime", "OnOff"
|
Option "Show total time elapsed", "am_showtotaltime", "OnOff"
|
||||||
Option "Show secrets on map", "am_map_secrets", "SecretTypes"
|
Option "Show secrets on map", "am_map_secrets", "SecretTypes"
|
||||||
Option "Show map label", "am_showmaplabel", "MaplabelTypes"
|
Option "Show map label", "am_showmaplabel", "MaplabelTypes"
|
||||||
Option "Draw map background", "am_drawmapback", "OnOff"
|
Option "Draw map background", "am_drawmapback", "MapBackTypes"
|
||||||
Option "Show keys (cheat)", "am_showkeys", "OnOff"
|
Option "Show keys (cheat)", "am_showkeys", "OnOff"
|
||||||
Option "Show trigger lines", "am_showtriggerlines", "OnOff"
|
Option "Show trigger lines", "am_showtriggerlines", "OnOff"
|
||||||
Option "Show things as sprites", "am_showthingsprites", "STSTypes"
|
Option "Show things as sprites", "am_showthingsprites", "STSTypes"
|
||||||
|
@ -1003,6 +1019,7 @@ OptionMenu MapColorMenu
|
||||||
ColorPicker "Secret walls", "am_secretwallcolor"
|
ColorPicker "Secret walls", "am_secretwallcolor"
|
||||||
ColorPicker "Actors", "am_thingcolor"
|
ColorPicker "Actors", "am_thingcolor"
|
||||||
ColorPicker "Monsters", "am_thingcolor_monster"
|
ColorPicker "Monsters", "am_thingcolor_monster"
|
||||||
|
ColorPicker "non-counting Monsters", "am_thingcolor_ncmonster"
|
||||||
ColorPicker "Friends", "am_thingcolor_friend"
|
ColorPicker "Friends", "am_thingcolor_friend"
|
||||||
ColorPicker "Items", "am_thingcolor_item"
|
ColorPicker "Items", "am_thingcolor_item"
|
||||||
ColorPicker "Count Items", "am_thingcolor_citem"
|
ColorPicker "Count Items", "am_thingcolor_citem"
|
||||||
|
@ -1010,15 +1027,22 @@ OptionMenu MapColorMenu
|
||||||
StaticText "Overlay Mode", 1
|
StaticText "Overlay Mode", 1
|
||||||
ColorPicker "You", "am_ovyourcolor"
|
ColorPicker "You", "am_ovyourcolor"
|
||||||
ColorPicker "1-sided walls", "am_ovwallcolor"
|
ColorPicker "1-sided walls", "am_ovwallcolor"
|
||||||
ColorPicker "2-sided walls", "am_ovotherwallscolor"
|
ColorPicker "2-sided walls with different floors", "am_ovfdwallcolor"
|
||||||
|
ColorPicker "2-sided walls with different ceilings", "am_ovcdwallcolor"
|
||||||
|
ColorPicker "2-sided walls with 3D floors", "am_ovefwallcolor"
|
||||||
ColorPicker "Not-yet-seen walls", "am_ovunseencolor"
|
ColorPicker "Not-yet-seen walls", "am_ovunseencolor"
|
||||||
ColorPicker "Teleporter", "am_ovtelecolor"
|
ColorPicker "Locked doors", "am_ovlockedcolor"
|
||||||
|
ColorPicker "Teleporter to the same map", "am_ovtelecolor"
|
||||||
|
ColorPicker "Teleporter to a different map", "am_ovinterlevelcolor"
|
||||||
ColorPicker "Secret sector", "am_ovsecretsectorcolor"
|
ColorPicker "Secret sector", "am_ovsecretsectorcolor"
|
||||||
ColorPicker "Special trigger lines", "am_ovspecialwallcolor"
|
ColorPicker "Special trigger lines", "am_ovspecialwallcolor"
|
||||||
StaticText " "
|
StaticText " "
|
||||||
StaticText "Overlay Cheat Mode", 1
|
StaticText "Overlay Cheat Mode", 1
|
||||||
|
ColorPicker "Invisible 2-sided walls", "am_ovotherwallscolor"
|
||||||
|
ColorPicker "Secret walls", "am_ovsecretwallcolor"
|
||||||
ColorPicker "Actors", "am_ovthingcolor"
|
ColorPicker "Actors", "am_ovthingcolor"
|
||||||
ColorPicker "Monsters", "am_ovthingcolor_monster"
|
ColorPicker "Monsters", "am_ovthingcolor_monster"
|
||||||
|
ColorPicker "non-counting Monsters", "am_ovthingcolor_ncmonster"
|
||||||
ColorPicker "Friends", "am_ovthingcolor_friend"
|
ColorPicker "Friends", "am_ovthingcolor_friend"
|
||||||
ColorPicker "Items", "am_ovthingcolor_item"
|
ColorPicker "Items", "am_ovthingcolor_item"
|
||||||
ColorPicker "Count Items", "am_ovthingcolor_citem"
|
ColorPicker "Count Items", "am_ovthingcolor_citem"
|
||||||
|
|
Loading…
Reference in a new issue