mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-24 13:01:47 +00:00
Merge branch 'master' of https://github.com/DaZombieKiller/zdoom
Conflicts: src/actor.h
This commit is contained in:
commit
405fc31e81
5 changed files with 18 additions and 8 deletions
|
@ -354,9 +354,7 @@ enum
|
|||
MF7_HITMASTER = 0x00008000, // Same as HITTARGET, except it's master instead of target.
|
||||
MF7_HITTRACER = 0x00010000, // Same as HITTARGET, but for tracer.
|
||||
MF7_FLYCHEAT = 0x00020000, // must be part of the actor so that it can be tracked properly
|
||||
|
||||
|
||||
|
||||
MF7_NODECAL = 0x00040000, // [ZK] Forces puff to have no impact decal
|
||||
// --- mobj.renderflags ---
|
||||
|
||||
RF_XFLIP = 0x0001, // Flip sprite horizontally
|
||||
|
|
|
@ -113,8 +113,9 @@ FRandom pr_acs ("ACS");
|
|||
#define NOT_FLOOR 8
|
||||
#define NOT_CEILING 16
|
||||
|
||||
// LineAtack flags
|
||||
// LineAttack flags
|
||||
#define FHF_NORANDOMPUFFZ 1
|
||||
#define FHF_NOIMPACTDECAL 2
|
||||
|
||||
// SpawnDecal flags
|
||||
#define SDF_ABSANGLE 1
|
||||
|
@ -5342,7 +5343,9 @@ int DLevelScript::CallFunction(int argCount, int funcIndex, SDWORD *args, const
|
|||
fixed_t range = argCount > 6 && args[6]? args[6] : MISSILERANGE;
|
||||
int flags = argCount > 7 && args[7]? args[7] : 0;
|
||||
|
||||
int fhflags = (flags & FHF_NORANDOMPUFFZ)? LAF_NORANDOMPUFFZ : 0;
|
||||
int fhflags = 0;
|
||||
if (flags & FHF_NORANDOMPUFFZ) fhflags |= LAF_NORANDOMPUFFZ;
|
||||
if (flags & FHF_NOIMPACTDECAL) fhflags |= LAF_NOIMPACTDECAL;
|
||||
|
||||
if (args[0] == 0)
|
||||
{
|
||||
|
|
|
@ -461,7 +461,8 @@ enum // P_AimLineAttack flags
|
|||
enum // P_LineAttack flags
|
||||
{
|
||||
LAF_ISMELEEATTACK = 1,
|
||||
LAF_NORANDOMPUFFZ = 2
|
||||
LAF_NORANDOMPUFFZ = 2,
|
||||
LAF_NOIMPACTDECAL = 4
|
||||
};
|
||||
|
||||
AActor *P_LineAttack (AActor *t1, angle_t angle, fixed_t distance, int pitch, int damage, FName damageType, const PClass *pufftype, int flags = 0, AActor **victim = NULL, int *actualdamage = NULL);
|
||||
|
|
|
@ -3726,12 +3726,16 @@ AActor *P_LineAttack(AActor *t1, angle_t angle, fixed_t distance,
|
|||
}
|
||||
|
||||
// [RH] Spawn a decal
|
||||
if (trace.HitType == TRACE_HitWall && trace.Line->special != Line_Horizon)
|
||||
if (trace.HitType == TRACE_HitWall && trace.Line->special != Line_Horizon && !(flags & LAF_NOIMPACTDECAL) && !(puffDefaults->flags7 & MF7_NODECAL))
|
||||
{
|
||||
// [TN] If the actor or weapon has a decal defined, use that one.
|
||||
if (t1->DecalGenerator != NULL ||
|
||||
(t1->player != NULL && t1->player->ReadyWeapon != NULL && t1->player->ReadyWeapon->DecalGenerator != NULL))
|
||||
{
|
||||
// [ZK] If puff has FORCEDECAL set, do not use the weapon's decal
|
||||
if (puffDefaults->flags7 & MF7_FORCEDECAL && puff != NULL && puff->DecalGenerator)
|
||||
SpawnShootDecal(puff, trace);
|
||||
else
|
||||
SpawnShootDecal(t1, trace);
|
||||
}
|
||||
|
||||
|
|
|
@ -254,6 +254,10 @@ static FFlagDef ActorFlags[]=
|
|||
DEFINE_FLAG(MF7, HITMASTER, AActor, flags7),
|
||||
DEFINE_FLAG(MF7, HITTRACER, AActor, flags7),
|
||||
|
||||
// [ZK] Decal flags
|
||||
DEFINE_FLAG(MF7, NODECAL, AActor, flags7),
|
||||
DEFINE_FLAG(MF7, FORCEDECAL, AActor, flags7),
|
||||
|
||||
// Effect flags
|
||||
DEFINE_FLAG(FX, VISIBILITYPULSE, AActor, effects),
|
||||
DEFINE_FLAG2(FX_ROCKET, ROCKETTRAIL, AActor, effects),
|
||||
|
|
Loading…
Reference in a new issue