mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-11 07:11:54 +00:00
Merge branch 'master' of https://github.com/rheit/zdoom
This commit is contained in:
commit
4ec1459ac0
2 changed files with 54 additions and 14 deletions
|
@ -52,6 +52,7 @@
|
||||||
#include "p_conversation.h"
|
#include "p_conversation.h"
|
||||||
#include "r_data/r_translate.h"
|
#include "r_data/r_translate.h"
|
||||||
#include "g_level.h"
|
#include "g_level.h"
|
||||||
|
#include "r_sky.h"
|
||||||
|
|
||||||
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)
|
||||||
|
@ -4293,6 +4294,8 @@ void P_RailAttack(AActor *source, int damage, int offset_xy, fixed_t offset_z, i
|
||||||
if (puffclass != NULL && puffDefaults->flags3 & MF3_ALWAYSPUFF)
|
if (puffclass != NULL && puffDefaults->flags3 & MF3_ALWAYSPUFF)
|
||||||
{
|
{
|
||||||
puff = P_SpawnPuff(source, puffclass, trace.X, trace.Y, trace.Z, (source->angle + angleoffset) - ANG90, 1, 0);
|
puff = P_SpawnPuff(source, puffclass, trace.X, trace.Y, trace.Z, (source->angle + angleoffset) - ANG90, 1, 0);
|
||||||
|
if (puff && (trace.Line != NULL) && (trace.Line->special == Line_Horizon) && !(puff->flags3 & MF3_SKYEXPLODE))
|
||||||
|
puff->Destroy();
|
||||||
}
|
}
|
||||||
if (puff != NULL && puffDefaults->flags7 & MF7_FORCEDECAL && puff->DecalGenerator)
|
if (puff != NULL && puffDefaults->flags7 & MF7_FORCEDECAL && puff->DecalGenerator)
|
||||||
SpawnShootDecal(puff, trace);
|
SpawnShootDecal(puff, trace);
|
||||||
|
@ -4306,6 +4309,12 @@ void P_RailAttack(AActor *source, int damage, int offset_xy, fixed_t offset_z, i
|
||||||
if (puffclass != NULL && puffDefaults->flags3 & MF3_ALWAYSPUFF)
|
if (puffclass != NULL && puffDefaults->flags3 & MF3_ALWAYSPUFF)
|
||||||
{
|
{
|
||||||
puff = P_SpawnPuff(source, puffclass, trace.X, trace.Y, trace.Z, (source->angle + angleoffset) - ANG90, 1, 0);
|
puff = P_SpawnPuff(source, puffclass, trace.X, trace.Y, trace.Z, (source->angle + angleoffset) - ANG90, 1, 0);
|
||||||
|
if (puff && !(puff->flags3 & MF3_SKYEXPLODE) &&
|
||||||
|
(((trace.HitType == TRACE_HitFloor) && (puff->floorpic == skyflatnum)) ||
|
||||||
|
((trace.HitType == TRACE_HitCeiling) && (puff->ceilingpic == skyflatnum))))
|
||||||
|
{
|
||||||
|
puff->Destroy();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (thepuff != NULL)
|
if (thepuff != NULL)
|
||||||
|
|
|
@ -961,8 +961,10 @@ void FWadCollection::RenameNerve ()
|
||||||
//
|
//
|
||||||
// FixMacHexen
|
// FixMacHexen
|
||||||
//
|
//
|
||||||
// Rename unused high resolution font lumps because they are incorrectly
|
// Discard all extra lumps in Mac version of Hexen IWAD (demo or full)
|
||||||
// treated as extended characters
|
// to avoid any issues caused by names of these lumps, including:
|
||||||
|
// * Wrong height of small font
|
||||||
|
// * Broken life bar of mage class
|
||||||
//
|
//
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
||||||
|
@ -973,22 +975,51 @@ void FWadCollection::FixMacHexen()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = GetFirstLump(IWAD_FILENUM), last = GetLastLump(IWAD_FILENUM); i <= last; ++i)
|
FileReader* const reader = GetFileReader(IWAD_FILENUM);
|
||||||
|
const long iwadSize = reader->GetLength();
|
||||||
|
|
||||||
|
static const long DEMO_SIZE = 13596228;
|
||||||
|
static const long FULL_SIZE = 21078584;
|
||||||
|
|
||||||
|
if ( DEMO_SIZE != iwadSize
|
||||||
|
&& FULL_SIZE != iwadSize)
|
||||||
{
|
{
|
||||||
assert(IWAD_FILENUM == LumpInfo[i].wadnum);
|
return;
|
||||||
|
|
||||||
FResourceLump* const lump = LumpInfo[i].lump;
|
|
||||||
char* const name = lump->Name;
|
|
||||||
|
|
||||||
// Unwanted lumps are named like FONTA??1
|
|
||||||
|
|
||||||
if (8 == strlen(name)
|
|
||||||
&& MAKE_ID('F', 'O', 'N', 'T') == lump->dwName
|
|
||||||
&& 'A' == name[4] && '1' == name[7]
|
|
||||||
&& isdigit(name[5]) && isdigit(name[6]))
|
|
||||||
{
|
|
||||||
name[0] = '\0';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
reader->Seek(0, SEEK_SET);
|
||||||
|
|
||||||
|
BYTE checksum[16];
|
||||||
|
MD5Context md5;
|
||||||
|
md5.Update(reader, iwadSize);
|
||||||
|
md5.Final(checksum);
|
||||||
|
|
||||||
|
static const BYTE HEXEN_DEMO_MD5[16] =
|
||||||
|
{
|
||||||
|
0x92, 0x5f, 0x9f, 0x50, 0x00, 0xe1, 0x7d, 0xc8,
|
||||||
|
0x4b, 0x0a, 0x6a, 0x3b, 0xed, 0x3a, 0x6f, 0x31
|
||||||
|
};
|
||||||
|
|
||||||
|
static const BYTE HEXEN_FULL_MD5[16] =
|
||||||
|
{
|
||||||
|
0xb6, 0x81, 0x40, 0xa7, 0x96, 0xf6, 0xfd, 0x7f,
|
||||||
|
0x3a, 0x5d, 0x32, 0x26, 0xa3, 0x2b, 0x93, 0xbe
|
||||||
|
};
|
||||||
|
|
||||||
|
if ( 0 != memcmp(HEXEN_DEMO_MD5, checksum, sizeof checksum)
|
||||||
|
&& 0 != memcmp(HEXEN_FULL_MD5, checksum, sizeof checksum))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
static const int EXTRA_LUMPS = 299;
|
||||||
|
|
||||||
|
const int lastLump = GetLastLump(IWAD_FILENUM);
|
||||||
|
assert(GetFirstLump(IWAD_FILENUM) + 299 < lastLump);
|
||||||
|
|
||||||
|
for (int i = lastLump - EXTRA_LUMPS + 1; i <= lastLump; ++i)
|
||||||
|
{
|
||||||
|
LumpInfo[i].lump->Name[0] = '\0';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue