Merge remote-tracking branch 'gzdoom/master'

This commit is contained in:
Magnus Norddahl 2023-10-27 20:44:09 +02:00
commit d93c1798f6
4 changed files with 16 additions and 11 deletions

View file

@ -848,6 +848,13 @@ DEFINE_ACTION_FUNCTION(_Wads, ReadLump)
ACTION_RETURN_STRING(isLumpValid ? GetStringFromLump(lump, false) : FString());
}
DEFINE_ACTION_FUNCTION(_Wads, GetLumpLength)
{
PARAM_PROLOGUE;
PARAM_INT(lump);
ACTION_RETURN_INT(fileSystem.FileLength(lump));
}
//==========================================================================
//
// CVARs

View file

@ -1890,12 +1890,12 @@ static bool CheckSingleWad (const char *name, bool &printRequires, bool printwar
bool G_CheckSaveGameWads (FSerializer &arc, bool printwarn)
{
bool printRequires = false;
FString text;
text = arc.GetString("Game WAD");
CheckSingleWad (text.GetChars(), printRequires, printwarn);
text = arc.GetString("Map WAD");
CheckSingleWad (text.GetChars(), printRequires, printwarn);
const char *text = arc.GetString("Game WAD");
CheckSingleWad (text, printRequires, printwarn);
const char *text2 = arc.GetString("Map WAD");
// do not validate the same file twice.
if (text != nullptr && text2 != nullptr && stricmp(text, text2) != 0) CheckSingleWad (text2, printRequires, printwarn);
if (printRequires)
{
@ -2271,11 +2271,8 @@ static void PutSaveWads (FSerializer &arc)
arc.AddString("Game WAD", name);
// Name of wad the map resides in
if (fileSystem.GetFileContainer (primaryLevel->lumpnum) > fileSystem.GetIwadNum())
{
name = fileSystem.GetResourceFileName (fileSystem.GetFileContainer (primaryLevel->lumpnum));
arc.AddString("Map WAD", name);
}
name = fileSystem.GetResourceFileName (fileSystem.GetFileContainer (primaryLevel->lumpnum));
arc.AddString("Map WAD", name);
}
static void PutSaveComment (FSerializer &arc)

View file

@ -2299,7 +2299,7 @@ void HWWall::Process(HWWallDispatcher *di, FRenderState& state, seg_t *seg, sect
/* bottom texture */
// the back sector's ceiling obstructs part of this wall (specially important for sky sectors)
float bfh1a = bch1, bfh2a = bch2;
float bfh1a = bfh1, bfh2a = bfh2;
if (fch1 < bfh1 && fch2 < bfh2 && (seg->linedef->flags & ML_DRAWFULLHEIGHT) == 0)
{
bfh1 = fch1;

View file

@ -862,6 +862,7 @@ struct Wads // todo: make FileSystem an alias to 'Wads'
native static int FindLump(string name, int startlump = 0, FindLumpNamespace ns = GlobalNamespace);
native static int FindLumpFullName(string name, int startlump = 0, bool noext = false);
native static string ReadLump(int lump);
native static int GetLumpLength(int lump);
native static int GetNumLumps();
native static string GetLumpName(int lump);