Merge branch 'master' into gonesolong

Conflicts:
	src/CMakeLists.txt
	src/actor.h
	src/g_heretic/a_hereticmisc.cpp
	src/g_heretic/a_hereticweaps.cpp
	src/g_heretic/a_ironlich.cpp
	src/info.h
	src/namedef.h
	src/p_buildmap.cpp
	src/p_enemy.cpp
	src/p_map.cpp
	src/p_mobj.cpp
	src/thingdef/thingdef_codeptr.cpp
	zdoom.vcproj
This commit is contained in:
Randy Heit 2014-12-20 19:11:39 -06:00
commit 2d87eb0ba2
457 changed files with 13703 additions and 9290 deletions

View file

@ -108,10 +108,6 @@
#include "r_renderer.h"
#include "p_local.h"
#ifdef USE_POLYMOST
#include "r_polymost.h"
#endif
EXTERN_CVAR(Bool, hud_althud)
void DrawHUD();
@ -186,9 +182,6 @@ CUSTOM_CVAR (Int, fraglimit, 0, CVAR_SERVERINFO)
}
}
#ifdef USE_POLYMOST
CVAR(Bool, testpolymost, false, 0)
#endif
CVAR (Float, timelimit, 0.f, CVAR_SERVERINFO);
CVAR (Int, wipetype, 1, CVAR_ARCHIVE);
CVAR (Int, snd_drawoutput, 0, 0);
@ -218,6 +211,7 @@ int NoWipe; // [RH] Allow wipe? (Needs to be set each time)
bool singletics = false; // debug flag to cancel adaptiveness
FString startmap;
bool autostart;
FString StoredWarp;
bool advancedemo;
FILE *debugfile;
event_t events[MAXEVENTS];
@ -281,10 +275,6 @@ void D_ProcessEvents (void)
continue; // console ate the event
if (M_Responder (ev))
continue; // menu ate the event
#ifdef USE_POLYMOST
if (testpolymost)
Polymost_Responder (ev);
#endif
G_Responder (ev);
}
}
@ -306,9 +296,6 @@ void D_PostEvent (const event_t *ev)
}
events[eventhead] = *ev;
if (ev->type == EV_Mouse && !paused && menuactive == MENU_Off && ConsoleState != c_down && ConsoleState != c_falling
#ifdef USE_POLYMOST
&& !testpolymost
#endif
)
{
if (Button_Mlook.bDown || freelook)
@ -421,7 +408,7 @@ CVAR (Flag, sv_fastmonsters, dmflags, DF_FAST_MONSTERS);
CVAR (Flag, sv_nojump, dmflags, DF_NO_JUMP);
CVAR (Flag, sv_allowjump, dmflags, DF_YES_JUMP);
CVAR (Flag, sv_nofreelook, dmflags, DF_NO_FREELOOK);
CVAR (Flag, sv_respawnsuper, dmflags, DF_RESPAWN_SUPER);
CVAR (Flag, sv_allowfreelook, dmflags, DF_YES_FREELOOK);
CVAR (Flag, sv_nofov, dmflags, DF_NO_FOV);
CVAR (Flag, sv_noweaponspawn, dmflags, DF_NO_COOP_WEAPON_SPAWN);
CVAR (Flag, sv_nocrouch, dmflags, DF_NO_CROUCH);
@ -438,6 +425,7 @@ CVAR (Flag, sv_coophalveammo, dmflags, DF_COOP_HALVE_AMMO);
CVAR (Mask, sv_crouch, dmflags, DF_NO_CROUCH|DF_YES_CROUCH);
CVAR (Mask, sv_jump, dmflags, DF_NO_JUMP|DF_YES_JUMP);
CVAR (Mask, sv_fallingdamage, dmflags, DF_FORCE_FALLINGHX|DF_FORCE_FALLINGZD);
CVAR (Mask, sv_freelook, dmflags, DF_NO_FREELOOK|DF_YES_FREELOOK);
//==========================================================================
//
@ -509,6 +497,8 @@ CVAR (Flag, sv_noautoaim, dmflags2, DF2_NOAUTOAIM);
CVAR (Flag, sv_dontcheckammo, dmflags2, DF2_DONTCHECKAMMO);
CVAR (Flag, sv_killbossmonst, dmflags2, DF2_KILLBOSSMONST);
CVAR (Flag, sv_nocountendmonst, dmflags2, DF2_NOCOUNTENDMONST);
CVAR (Flag, sv_respawnsuper, dmflags2, DF2_RESPAWN_SUPER);
//==========================================================================
//
// CVAR compatflags
@ -739,15 +729,7 @@ void D_Display ()
hw2d = false;
#ifdef USE_POLYMOST
if (testpolymost)
{
drawpolymosttest();
C_DrawConsole(hw2d);
M_Drawer();
}
else
#endif
{
unsigned int nowtime = I_FPSTime();
TexMan.UpdateAnimations(nowtime);
@ -1233,7 +1215,7 @@ void D_DoAdvanceDemo (void)
static char demoname[8] = "DEMO1";
static int democount = 0;
static int pagecount;
const char *pagename = NULL;
FString pagename;
advancedemo = false;
@ -1298,7 +1280,7 @@ void D_DoAdvanceDemo (void)
default:
case 0:
gamestate = GS_DEMOSCREEN;
pagename = gameinfo.titlePage;
pagename = gameinfo.TitlePage;
pagetic = (int)(gameinfo.titleTime * TICRATE);
S_ChangeMusic (gameinfo.titleMusic, gameinfo.titleOrder, false);
demosequence = 3;
@ -1318,7 +1300,7 @@ void D_DoAdvanceDemo (void)
break;
}
if (pagename)
if (pagename.IsNotEmpty())
{
if (Page != NULL)
{
@ -1597,7 +1579,7 @@ void D_AddConfigWads (TArray<FString> &wadfiles, const char *section)
{
// D_AddWildFile resets GameConfig's position, so remember it
GameConfig->GetPosition (pos);
D_AddWildFile (wadfiles, value);
D_AddWildFile (wadfiles, ExpandEnvVars(value));
// Reset GameConfig's position to get next wad
GameConfig->SetPosition (pos);
}
@ -1806,19 +1788,23 @@ static FString ParseGameInfo(TArray<FString> &pwads, const char *fn, const char
// Try looking for the wad in the same directory as the .wad
// before looking for it in the current directory.
FString checkpath;
if (lastSlash != NULL)
{
FString checkpath(fn, (lastSlash - fn) + 1);
checkpath = FString(fn, (lastSlash - fn) + 1);
checkpath += sc.String;
if (!FileExists (checkpath))
{
pos += D_AddFile(pwads, sc.String, true, pos);
}
else
{
pos += D_AddFile(pwads, checkpath, true, pos);
}
}
else
{
checkpath = sc.String;
}
if (!FileExists(checkpath))
{
pos += D_AddFile(pwads, sc.String, true, pos);
}
else
{
pos += D_AddFile(pwads, checkpath, true, pos);
}
}
while (sc.CheckToken(','));
@ -1860,6 +1846,15 @@ static FString ParseGameInfo(TArray<FString> &pwads, const char *fn, const char
sc.MustGetString();
DoomStartupInfo.Song = sc.String;
}
else
{
// Silently ignore unknown properties
do
{
sc.MustGetAnyToken();
}
while(sc.CheckToken(','));
}
}
return iwad;
}
@ -1993,13 +1988,23 @@ static void D_DoomInit()
Args->CollectFiles("-playdemo", ".lmp");
Args->CollectFiles("-file", NULL); // anything left goes after -file
atterm (C_DeinitConsole);
gamestate = GS_STARTUP;
SetLanguageIDs ();
rngseed = I_MakeRNGSeed();
const char *v = Args->CheckValue("-rngseed");
if (v)
{
rngseed = staticrngseed = atoi(v);
use_staticrng = true;
Printf("D_DoomInit: Static RNGseed %d set.\n", rngseed);
}
else
{
rngseed = I_MakeRNGSeed();
use_staticrng = false;
}
FRandom::StaticClearRandom ();
Printf ("M_LoadDefaults: Load system defaults.\n");
@ -2101,7 +2106,7 @@ static void CheckCmdLine()
{
startmap = "&wt@01";
}
autostart = false;
autostart = StoredWarp.IsNotEmpty();
const char *val = Args->CheckValue ("-skill");
if (val)
@ -2157,17 +2162,6 @@ static void CheckCmdLine()
Printf ("%s", GStrings("D_DEVSTR"));
}
#if !defined(__unix__) && !defined(__APPLE__)
// 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
// the user's home directory.
if (Args->CheckParm("-cdrom"))
{
Printf ("%s", GStrings("D_CDROM"));
mkdir (CDROM_DIR, 0);
}
#endif
// turbo option // [RH] (now a cvar)
v = Args->CheckValue("-turbo");
if (v != NULL)
@ -2225,6 +2219,13 @@ void D_DoomMain (void)
FString *args;
int argcount;
// +logfile gets checked too late to catch the full startup log in the logfile so do some extra check for it here.
FString logfile = Args->TakeValue("+logfile");
if (logfile.IsNotEmpty())
{
execLogfile(logfile);
}
D_DoomInit();
// [RH] Make sure zdoom.pk3 is always loaded,
@ -2255,7 +2256,7 @@ void D_DoomMain (void)
// The IWAD selection dialogue does not show in fullscreen so if the
// restart is initiated without a defined IWAD assume for now that it's not going to change.
if (iwad.Len() == 0) iwad = lastIWAD;
if (iwad.IsEmpty()) iwad = lastIWAD;
FIWadManager *iwad_man = new FIWadManager;
const FIWADInfo *iwad_info = iwad_man->FindIWAD(allwads, iwad, basewad);
@ -2283,8 +2284,6 @@ void D_DoomMain (void)
execFiles = Args->GatherFiles ("-exec");
D_MultiExec (execFiles, true);
C_ExecCmdLineParams (); // [RH] do all +set commands on the command line
CopyFiles(allwads, pwads);
// Since this function will never leave we must delete this array here manually.
@ -2300,6 +2299,8 @@ void D_DoomMain (void)
// Now that wads are loaded, define mod-specific cvars.
ParseCVarInfo();
C_ExecCmdLineParams (); // [RH] do all +set commands on the command line
// [RH] Initialize localizable strings.
GStrings.LoadStrings (false);
@ -2530,6 +2531,11 @@ void D_DoomMain (void)
if (demorecording)
G_BeginRecording (startmap);
G_InitNew (startmap, false);
if (StoredWarp.IsNotEmpty())
{
AddCommandString(StoredWarp.LockBuffer());
StoredWarp = NULL;
}
}
else
{