mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-28 14:52:01 +00:00
Merge branch 'master' of https://github.com/rheit/zdoom
This commit is contained in:
commit
951782578f
12 changed files with 30 additions and 3 deletions
|
@ -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
|
||||||
|
|
||||||
|
@ -204,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
|
||||||
|
|
||||||
|
|
|
@ -268,7 +268,7 @@ enum
|
||||||
MF5_DONTDRAIN = 0x00000001, // cannot be drained health from.
|
MF5_DONTDRAIN = 0x00000001, // cannot be drained health from.
|
||||||
/* = 0x00000002, */
|
/* = 0x00000002, */
|
||||||
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
|
||||||
|
|
|
@ -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 &);
|
||||||
};
|
};
|
||||||
|
|
|
@ -465,6 +465,7 @@ xx(blockprojectiles)
|
||||||
xx(blockuse)
|
xx(blockuse)
|
||||||
xx(hidden)
|
xx(hidden)
|
||||||
xx(blocksight)
|
xx(blocksight)
|
||||||
|
xx(blockhitscan)
|
||||||
|
|
||||||
xx(Renderstyle)
|
xx(Renderstyle)
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -1143,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;
|
||||||
|
|
|
@ -2545,6 +2545,7 @@ FUNC(LS_Line_SetBlocking)
|
||||||
ML_RAILING,
|
ML_RAILING,
|
||||||
ML_BLOCKUSE,
|
ML_BLOCKUSE,
|
||||||
ML_BLOCKSIGHT,
|
ML_BLOCKSIGHT,
|
||||||
|
ML_BLOCKHITSCAN,
|
||||||
-1
|
-1
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -3563,7 +3563,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)
|
||||||
|
|
|
@ -4712,6 +4712,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))
|
||||||
|
|
|
@ -1750,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
|
||||||
|
@ -1825,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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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);
|
||||||
|
|
|
@ -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),
|
||||||
|
|
Loading…
Reference in a new issue