mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-10 14:51:46 +00:00
- Finally has the right idea how to restore Doom's original clipping of projectiles
against decorations without breaking anything newer: Added a new 'projectilepassheight' property that defines an alternative height that is only used when checking a projectile's movement against this actor. If the value is positive it is used regardless of other settings, if it is negative, its absolute will be used if a new compatibility option is enabled and if it is 0 the normal height will be used. SVN r1253 (trunk)
This commit is contained in:
parent
d9ab611db2
commit
2221ab5668
13 changed files with 80 additions and 2 deletions
|
@ -1,4 +1,11 @@
|
||||||
October 5, 2008 (Changes by Graf Zahl)
|
October 5, 2008 (Changes by Graf Zahl)
|
||||||
|
- Finally has the right idea how to restore Doom's original clipping of projectiles
|
||||||
|
against decorations without breaking anything newer:
|
||||||
|
Added a new 'projectilepassheight' property that defines an alternative height
|
||||||
|
that is only used when checking a projectile's movement against this actor.
|
||||||
|
If the value is positive it is used regardless of other settings, if it is
|
||||||
|
negative, its absolute will be used if a new compatibility option is enabled
|
||||||
|
and if it is 0 the normal height will be used.
|
||||||
- Fixed: Powerup.Color's handler contained an unnecessary 'else' which resulted
|
- Fixed: Powerup.Color's handler contained an unnecessary 'else' which resulted
|
||||||
in opaque powerup blends.
|
in opaque powerup blends.
|
||||||
|
|
||||||
|
|
|
@ -650,6 +650,7 @@ public:
|
||||||
struct sector_t *ceilingsector;
|
struct sector_t *ceilingsector;
|
||||||
FTextureID ceilingpic; // contacted sec ceilingpic
|
FTextureID ceilingpic; // contacted sec ceilingpic
|
||||||
fixed_t radius, height; // for movement checking
|
fixed_t radius, height; // for movement checking
|
||||||
|
fixed_t projectilepassheight; // height for clipping projectile movement against this actor
|
||||||
fixed_t momx, momy, momz; // momentums
|
fixed_t momx, momy, momz; // momentums
|
||||||
SDWORD tics; // state tic counter
|
SDWORD tics; // state tic counter
|
||||||
FState *state;
|
FState *state;
|
||||||
|
|
|
@ -746,6 +746,7 @@ static int PatchThing (int thingy)
|
||||||
else if (linelen == 6 && stricmp (Line1, "Height") == 0)
|
else if (linelen == 6 && stricmp (Line1, "Height") == 0)
|
||||||
{
|
{
|
||||||
info->height = val;
|
info->height = val;
|
||||||
|
info->projectilepassheight = 0; // needs to be disabled
|
||||||
hadHeight = true;
|
hadHeight = true;
|
||||||
}
|
}
|
||||||
else if (linelen == 14 && stricmp (Line1, "Missile damage") == 0)
|
else if (linelen == 14 && stricmp (Line1, "Missile damage") == 0)
|
||||||
|
@ -1009,6 +1010,7 @@ static int PatchThing (int thingy)
|
||||||
thingy <= NumOrgHeights && thingy > 0)
|
thingy <= NumOrgHeights && thingy > 0)
|
||||||
{
|
{
|
||||||
info->height = OrgHeights[thingy - 1] * FRACUNIT;
|
info->height = OrgHeights[thingy - 1] * FRACUNIT;
|
||||||
|
info->projectilepassheight = 0;
|
||||||
}
|
}
|
||||||
// If the thing's shadow changed, change its fuzziness if not already specified
|
// If the thing's shadow changed, change its fuzziness if not already specified
|
||||||
if ((info->flags ^ oldflags) & MF_SHADOW)
|
if ((info->flags ^ oldflags) & MF_SHADOW)
|
||||||
|
|
|
@ -486,6 +486,7 @@ CVAR (Flag, compat_boomscroll, compatflags, COMPATF_BOOMSCROLL);
|
||||||
CVAR (Flag, compat_invisibility,compatflags, COMPATF_INVISIBILITY);
|
CVAR (Flag, compat_invisibility,compatflags, COMPATF_INVISIBILITY);
|
||||||
CVAR (Flag, compat_silentinstantfloors,compatflags, COMPATF_SILENT_INSTANT_FLOORS);
|
CVAR (Flag, compat_silentinstantfloors,compatflags, COMPATF_SILENT_INSTANT_FLOORS);
|
||||||
CVAR (Flag, compat_sectorsounds,compatflags, COMPATF_SECTORSOUNDS);
|
CVAR (Flag, compat_sectorsounds,compatflags, COMPATF_SECTORSOUNDS);
|
||||||
|
CVAR (Flag, compat_missileclip, compatflags, COMPATF_MISSILECLIP);
|
||||||
|
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
//
|
//
|
||||||
|
|
|
@ -273,6 +273,7 @@ enum
|
||||||
COMPATF_INVISIBILITY = 1 << 16, // Monsters can see semi-invisible players
|
COMPATF_INVISIBILITY = 1 << 16, // Monsters can see semi-invisible players
|
||||||
COMPATF_SILENT_INSTANT_FLOORS = 1<<17, // Instantly moving floors are not silent
|
COMPATF_SILENT_INSTANT_FLOORS = 1<<17, // Instantly moving floors are not silent
|
||||||
COMPATF_SECTORSOUNDS = 1 << 18, // Sector sounds use original method for sound origin.
|
COMPATF_SECTORSOUNDS = 1 << 18, // Sector sounds use original method for sound origin.
|
||||||
|
COMPATF_MISSILECLIP = 1 << 19, // Use original Doom heights for clipping against projectiles
|
||||||
};
|
};
|
||||||
|
|
||||||
// phares 3/20/98:
|
// phares 3/20/98:
|
||||||
|
|
|
@ -351,6 +351,7 @@ static const char *MapInfoMapLevel[] =
|
||||||
"compat_invisibility",
|
"compat_invisibility",
|
||||||
"compat_silent_instant_floors",
|
"compat_silent_instant_floors",
|
||||||
"compat_sectorsounds",
|
"compat_sectorsounds",
|
||||||
|
"compat_missileclip",
|
||||||
"bordertexture",
|
"bordertexture",
|
||||||
"f1", // [RC] F1 help
|
"f1", // [RC] F1 help
|
||||||
"noinfighting",
|
"noinfighting",
|
||||||
|
@ -503,6 +504,7 @@ MapHandlers[] =
|
||||||
{ MITYPE_COMPATFLAG, COMPATF_INVISIBILITY},
|
{ MITYPE_COMPATFLAG, COMPATF_INVISIBILITY},
|
||||||
{ MITYPE_COMPATFLAG, COMPATF_SILENT_INSTANT_FLOORS},
|
{ MITYPE_COMPATFLAG, COMPATF_SILENT_INSTANT_FLOORS},
|
||||||
{ MITYPE_COMPATFLAG, COMPATF_SECTORSOUNDS},
|
{ MITYPE_COMPATFLAG, COMPATF_SECTORSOUNDS},
|
||||||
|
{ MITYPE_COMPATFLAG, COMPATF_MISSILECLIP},
|
||||||
{ MITYPE_LUMPNAME, lioffset(bordertexture), 0 },
|
{ MITYPE_LUMPNAME, lioffset(bordertexture), 0 },
|
||||||
{ MITYPE_LUMPNAME, lioffset(f1), 0, },
|
{ MITYPE_LUMPNAME, lioffset(f1), 0, },
|
||||||
{ MITYPE_SCFLAGS, LEVEL_NOINFIGHTING, ~LEVEL_TOTALINFIGHTING },
|
{ MITYPE_SCFLAGS, LEVEL_NOINFIGHTING, ~LEVEL_TOTALINFIGHTING },
|
||||||
|
|
|
@ -1103,6 +1103,7 @@ static menuitem_t CompatibilityItems[] = {
|
||||||
{ bitflag, "Boom scrollers are additive", {&compatflags}, {0}, {0}, {0}, {(value_t *)COMPATF_BOOMSCROLL} },
|
{ bitflag, "Boom scrollers are additive", {&compatflags}, {0}, {0}, {0}, {(value_t *)COMPATF_BOOMSCROLL} },
|
||||||
{ bitflag, "Inst. moving floors are not silent", {&compatflags}, {0}, {0}, {0}, {(value_t *)COMPATF_SILENT_INSTANT_FLOORS} },
|
{ bitflag, "Inst. moving floors are not silent", {&compatflags}, {0}, {0}, {0}, {(value_t *)COMPATF_SILENT_INSTANT_FLOORS} },
|
||||||
{ bitflag, "Sector sounds use center as source", {&compatflags}, {0}, {0}, {0}, {(value_t *)COMPATF_SECTORSOUNDS} },
|
{ bitflag, "Sector sounds use center as source", {&compatflags}, {0}, {0}, {0}, {(value_t *)COMPATF_SECTORSOUNDS} },
|
||||||
|
{ bitflag, "Use Doom heights for missile clipping", {&compatflags}, {0}, {0}, {0}, {(value_t *)COMPATF_MISSILECLIP} },
|
||||||
|
|
||||||
{ discrete, "Interpolate monster movement", {&nomonsterinterpolation}, {2.0}, {0.0}, {0.0}, {NoYes} },
|
{ discrete, "Interpolate monster movement", {&nomonsterinterpolation}, {2.0}, {0.0}, {0.0}, {NoYes} },
|
||||||
};
|
};
|
||||||
|
|
|
@ -745,8 +745,24 @@ bool PIT_CheckThing (AActor *thing, FCheckPosition &tm)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int clipheight;
|
||||||
|
|
||||||
|
if (thing->projectilepassheight > 0)
|
||||||
|
{
|
||||||
|
clipheight = thing->projectilepassheight;
|
||||||
|
}
|
||||||
|
else if (thing->projectilepassheight < 0 && (i_compatflags & COMPATF_MISSILECLIP))
|
||||||
|
{
|
||||||
|
clipheight = -thing->projectilepassheight;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
clipheight = thing->height;
|
||||||
|
}
|
||||||
|
|
||||||
// Check if it went over / under
|
// Check if it went over / under
|
||||||
if (tm.thing->z > thing->z + thing->height)
|
if (tm.thing->z > thing->z + clipheight)
|
||||||
{ // Over thing
|
{ // Over thing
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -220,6 +220,7 @@ void AActor::Serialize (FArchive &arc)
|
||||||
<< ceilingsector
|
<< ceilingsector
|
||||||
<< radius
|
<< radius
|
||||||
<< height
|
<< height
|
||||||
|
<< projectilepassheight
|
||||||
<< momx
|
<< momx
|
||||||
<< momy
|
<< momy
|
||||||
<< momz
|
<< momz
|
||||||
|
|
|
@ -695,6 +695,15 @@ DEFINE_PROPERTY(height, F, Actor)
|
||||||
defaults->height=id;
|
defaults->height=id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//==========================================================================
|
||||||
|
//
|
||||||
|
//==========================================================================
|
||||||
|
DEFINE_PROPERTY(projectilepassheight, F, Actor)
|
||||||
|
{
|
||||||
|
PROP_FIXED_PARM(id, 0);
|
||||||
|
defaults->projectilepassheight=id;
|
||||||
|
}
|
||||||
|
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
//
|
//
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
|
@ -75,7 +75,7 @@
|
||||||
// SAVESIG should match SAVEVER.
|
// SAVESIG should match SAVEVER.
|
||||||
|
|
||||||
// MINSAVEVER is the minimum level snapshot version that can be loaded.
|
// MINSAVEVER is the minimum level snapshot version that can be loaded.
|
||||||
#define MINSAVEVER 1215
|
#define MINSAVEVER 1253
|
||||||
|
|
||||||
#if SVN_REVISION_NUMBER < MINSAVEVER
|
#if SVN_REVISION_NUMBER < MINSAVEVER
|
||||||
// Never write a savegame with a version lower than what we need
|
// Never write a savegame with a version lower than what we need
|
||||||
|
|
|
@ -6,6 +6,7 @@ ACTOR TechLamp 85
|
||||||
Game Doom
|
Game Doom
|
||||||
Radius 16
|
Radius 16
|
||||||
Height 80
|
Height 80
|
||||||
|
ProjectilePassHeight -16
|
||||||
+SOLID
|
+SOLID
|
||||||
States
|
States
|
||||||
{
|
{
|
||||||
|
@ -22,6 +23,7 @@ ACTOR TechLamp2 86
|
||||||
Game Doom
|
Game Doom
|
||||||
Radius 16
|
Radius 16
|
||||||
Height 60
|
Height 60
|
||||||
|
ProjectilePassHeight -16
|
||||||
+SOLID
|
+SOLID
|
||||||
States
|
States
|
||||||
{
|
{
|
||||||
|
@ -38,6 +40,7 @@ ACTOR Column 2028
|
||||||
Game Doom
|
Game Doom
|
||||||
Radius 16
|
Radius 16
|
||||||
Height 48
|
Height 48
|
||||||
|
ProjectilePassHeight -16
|
||||||
+SOLID
|
+SOLID
|
||||||
States
|
States
|
||||||
{
|
{
|
||||||
|
@ -54,6 +57,7 @@ ACTOR TallGreenColumn 30
|
||||||
Game Doom
|
Game Doom
|
||||||
Radius 16
|
Radius 16
|
||||||
Height 52
|
Height 52
|
||||||
|
ProjectilePassHeight -16
|
||||||
+SOLID
|
+SOLID
|
||||||
States
|
States
|
||||||
{
|
{
|
||||||
|
@ -70,6 +74,7 @@ ACTOR ShortGreenColumn 31
|
||||||
Game Doom
|
Game Doom
|
||||||
Radius 16
|
Radius 16
|
||||||
Height 40
|
Height 40
|
||||||
|
ProjectilePassHeight -16
|
||||||
+SOLID
|
+SOLID
|
||||||
States
|
States
|
||||||
{
|
{
|
||||||
|
@ -86,6 +91,7 @@ ACTOR TallRedColumn 32
|
||||||
Game Doom
|
Game Doom
|
||||||
Radius 16
|
Radius 16
|
||||||
Height 52
|
Height 52
|
||||||
|
ProjectilePassHeight -16
|
||||||
+SOLID
|
+SOLID
|
||||||
States
|
States
|
||||||
{
|
{
|
||||||
|
@ -102,6 +108,7 @@ ACTOR ShortRedColumn 33
|
||||||
Game Doom
|
Game Doom
|
||||||
Radius 16
|
Radius 16
|
||||||
Height 40
|
Height 40
|
||||||
|
ProjectilePassHeight -16
|
||||||
+SOLID
|
+SOLID
|
||||||
States
|
States
|
||||||
{
|
{
|
||||||
|
@ -118,6 +125,7 @@ ACTOR SkullColumn 37
|
||||||
Game Doom
|
Game Doom
|
||||||
Radius 16
|
Radius 16
|
||||||
Height 40
|
Height 40
|
||||||
|
ProjectilePassHeight -16
|
||||||
+SOLID
|
+SOLID
|
||||||
States
|
States
|
||||||
{
|
{
|
||||||
|
@ -134,6 +142,7 @@ ACTOR HeartColumn 36
|
||||||
Game Doom
|
Game Doom
|
||||||
Radius 16
|
Radius 16
|
||||||
Height 40
|
Height 40
|
||||||
|
ProjectilePassHeight -16
|
||||||
+SOLID
|
+SOLID
|
||||||
States
|
States
|
||||||
{
|
{
|
||||||
|
@ -150,6 +159,7 @@ ACTOR EvilEye 41
|
||||||
Game Doom
|
Game Doom
|
||||||
Radius 16
|
Radius 16
|
||||||
Height 54
|
Height 54
|
||||||
|
ProjectilePassHeight -16
|
||||||
+SOLID
|
+SOLID
|
||||||
States
|
States
|
||||||
{
|
{
|
||||||
|
@ -166,6 +176,7 @@ ACTOR FloatingSkull 42
|
||||||
Game Doom
|
Game Doom
|
||||||
Radius 16
|
Radius 16
|
||||||
Height 26
|
Height 26
|
||||||
|
ProjectilePassHeight -16
|
||||||
+SOLID
|
+SOLID
|
||||||
States
|
States
|
||||||
{
|
{
|
||||||
|
@ -182,6 +193,7 @@ ACTOR TorchTree 43
|
||||||
Game Doom
|
Game Doom
|
||||||
Radius 16
|
Radius 16
|
||||||
Height 56
|
Height 56
|
||||||
|
ProjectilePassHeight -16
|
||||||
+SOLID
|
+SOLID
|
||||||
States
|
States
|
||||||
{
|
{
|
||||||
|
@ -198,6 +210,7 @@ ACTOR BlueTorch 44
|
||||||
Game Doom
|
Game Doom
|
||||||
Radius 16
|
Radius 16
|
||||||
Height 68
|
Height 68
|
||||||
|
ProjectilePassHeight -16
|
||||||
+SOLID
|
+SOLID
|
||||||
States
|
States
|
||||||
{
|
{
|
||||||
|
@ -214,6 +227,7 @@ ACTOR GreenTorch 45
|
||||||
Game Doom
|
Game Doom
|
||||||
Radius 16
|
Radius 16
|
||||||
Height 68
|
Height 68
|
||||||
|
ProjectilePassHeight -16
|
||||||
+SOLID
|
+SOLID
|
||||||
States
|
States
|
||||||
{
|
{
|
||||||
|
@ -230,6 +244,7 @@ ACTOR RedTorch 46
|
||||||
Game Doom
|
Game Doom
|
||||||
Radius 16
|
Radius 16
|
||||||
Height 68
|
Height 68
|
||||||
|
ProjectilePassHeight -16
|
||||||
+SOLID
|
+SOLID
|
||||||
States
|
States
|
||||||
{
|
{
|
||||||
|
@ -246,6 +261,7 @@ ACTOR ShortBlueTorch 55
|
||||||
Game Doom
|
Game Doom
|
||||||
Radius 16
|
Radius 16
|
||||||
Height 37
|
Height 37
|
||||||
|
ProjectilePassHeight -16
|
||||||
+SOLID
|
+SOLID
|
||||||
States
|
States
|
||||||
{
|
{
|
||||||
|
@ -262,6 +278,7 @@ ACTOR ShortGreenTorch 56
|
||||||
Game Doom
|
Game Doom
|
||||||
Radius 16
|
Radius 16
|
||||||
Height 37
|
Height 37
|
||||||
|
ProjectilePassHeight -16
|
||||||
+SOLID
|
+SOLID
|
||||||
States
|
States
|
||||||
{
|
{
|
||||||
|
@ -278,6 +295,7 @@ ACTOR ShortRedTorch 57
|
||||||
Game Doom
|
Game Doom
|
||||||
Radius 16
|
Radius 16
|
||||||
Height 37
|
Height 37
|
||||||
|
ProjectilePassHeight -16
|
||||||
+SOLID
|
+SOLID
|
||||||
States
|
States
|
||||||
{
|
{
|
||||||
|
@ -294,6 +312,7 @@ ACTOR Stalagtite 47
|
||||||
Game Doom
|
Game Doom
|
||||||
Radius 16
|
Radius 16
|
||||||
Height 40
|
Height 40
|
||||||
|
ProjectilePassHeight -16
|
||||||
+SOLID
|
+SOLID
|
||||||
States
|
States
|
||||||
{
|
{
|
||||||
|
@ -310,6 +329,7 @@ ACTOR TechPillar 48
|
||||||
Game Doom
|
Game Doom
|
||||||
Radius 16
|
Radius 16
|
||||||
Height 128
|
Height 128
|
||||||
|
ProjectilePassHeight -16
|
||||||
+SOLID
|
+SOLID
|
||||||
States
|
States
|
||||||
{
|
{
|
||||||
|
@ -326,6 +346,7 @@ ACTOR Candlestick 34
|
||||||
Game Doom
|
Game Doom
|
||||||
Radius 20
|
Radius 20
|
||||||
Height 14
|
Height 14
|
||||||
|
ProjectilePassHeight -16
|
||||||
States
|
States
|
||||||
{
|
{
|
||||||
Spawn:
|
Spawn:
|
||||||
|
@ -341,6 +362,7 @@ ACTOR Candelabra 35
|
||||||
Game Doom
|
Game Doom
|
||||||
Radius 16
|
Radius 16
|
||||||
Height 60
|
Height 60
|
||||||
|
ProjectilePassHeight -16
|
||||||
+SOLID
|
+SOLID
|
||||||
States
|
States
|
||||||
{
|
{
|
||||||
|
@ -489,6 +511,7 @@ ACTOR HeadOnAStick 27
|
||||||
Game Doom
|
Game Doom
|
||||||
Radius 16
|
Radius 16
|
||||||
Height 56
|
Height 56
|
||||||
|
ProjectilePassHeight -16
|
||||||
+SOLID
|
+SOLID
|
||||||
States
|
States
|
||||||
{
|
{
|
||||||
|
@ -505,6 +528,7 @@ ACTOR HeadsOnAStick 28
|
||||||
Game Doom
|
Game Doom
|
||||||
Radius 16
|
Radius 16
|
||||||
Height 64
|
Height 64
|
||||||
|
ProjectilePassHeight -16
|
||||||
+SOLID
|
+SOLID
|
||||||
States
|
States
|
||||||
{
|
{
|
||||||
|
@ -521,6 +545,7 @@ ACTOR HeadCandles 29
|
||||||
Game Doom
|
Game Doom
|
||||||
Radius 16
|
Radius 16
|
||||||
Height 42
|
Height 42
|
||||||
|
ProjectilePassHeight -16
|
||||||
+SOLID
|
+SOLID
|
||||||
States
|
States
|
||||||
{
|
{
|
||||||
|
@ -537,6 +562,7 @@ ACTOR DeadStick 25
|
||||||
Game Doom
|
Game Doom
|
||||||
Radius 16
|
Radius 16
|
||||||
Height 64
|
Height 64
|
||||||
|
ProjectilePassHeight -16
|
||||||
+SOLID
|
+SOLID
|
||||||
States
|
States
|
||||||
{
|
{
|
||||||
|
@ -553,6 +579,7 @@ ACTOR LiveStick 26
|
||||||
Game Doom
|
Game Doom
|
||||||
Radius 16
|
Radius 16
|
||||||
Height 64
|
Height 64
|
||||||
|
ProjectilePassHeight -16
|
||||||
+SOLID
|
+SOLID
|
||||||
States
|
States
|
||||||
{
|
{
|
||||||
|
@ -570,6 +597,7 @@ ACTOR BigTree 54
|
||||||
Game Doom
|
Game Doom
|
||||||
Radius 32
|
Radius 32
|
||||||
Height 108
|
Height 108
|
||||||
|
ProjectilePassHeight -16
|
||||||
+SOLID
|
+SOLID
|
||||||
States
|
States
|
||||||
{
|
{
|
||||||
|
@ -587,6 +615,7 @@ ACTOR BurningBarrel 70
|
||||||
SpawnID 149
|
SpawnID 149
|
||||||
Radius 16
|
Radius 16
|
||||||
Height 32
|
Height 32
|
||||||
|
ProjectilePassHeight -16
|
||||||
+SOLID
|
+SOLID
|
||||||
States
|
States
|
||||||
{
|
{
|
||||||
|
|
|
@ -1063,6 +1063,14 @@
|
||||||
RelativePath=".\src\thingdef\thingdef_exp.cpp"
|
RelativePath=".\src\thingdef\thingdef_exp.cpp"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\thingdef\thingdef_exp.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\thingdef\thingdef_exp_execute.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\src\thingdef\thingdef_main.cpp"
|
RelativePath=".\src\thingdef\thingdef_main.cpp"
|
||||||
>
|
>
|
||||||
|
|
Loading…
Reference in a new issue