Hackaround for various Hexen non-projectiles being parried.

Fix Fabricators not autoactivating if spares are held.
Typo fixes. Other corrections.
This commit is contained in:
Mari the Deer 2020-03-21 04:13:41 +01:00
commit d2a9cce5be
5 changed files with 53 additions and 45 deletions

View file

@ -868,6 +868,8 @@ Class AmmoFabricator : Inventory abstract
Class FabricatorTier1 : AmmoFabricator
{
Mixin SWWMAutoUseFix;
Default
{
Tag "$T_FABRICATOR1";
@ -882,6 +884,8 @@ Class FabricatorTier1 : AmmoFabricator
}
Class FabricatorTier2 : AmmoFabricator
{
Mixin SWWMAutoUseFix;
Default
{
Tag "$T_FABRICATOR2";
@ -896,6 +900,8 @@ Class FabricatorTier2 : AmmoFabricator
}
Class FabricatorTier3 : AmmoFabricator
{
Mixin SWWMAutoUseFix;
Default
{
Tag "$T_FABRICATOR3";

View file

@ -506,6 +506,14 @@ Class ParryField : Actor
Height 40;
}
static bool ValidMissile( Actor a )
{
// fuuuuuuuuuuuuck why can't you just subclass them all from one base class, also wtf hexen, what's with all these things having +MISSILE
if ( (a is 'Rock1') || (a is 'Rock2') || (a is 'Rock3') || (a is 'Dirt1') || (a is 'Dirt2') || (a is 'Dirt3') || (a is 'Dirt4') || (a is 'Dirt5') || (a is 'Dirt6') || (a is 'GlassShard') || (a is 'PotteryBit') || (a is 'CorpseBloodDrip') || (a is 'Leaf1') || (a is 'HWaterDrip') || (a is 'IceGuyWisp1') || (a is 'WraithFX3') || (a is 'WraithFX4') || (a is 'Bat') || (a is 'SorcBall') )
return false;
return true;
}
override void Tick()
{
Super.Tick();
@ -523,7 +531,7 @@ Class ParryField : Actor
Actor a;
while ( a = Actor(ti.Next()) )
{
if ( !((a.bMISSILE && (a.target != master)) || a.bSKULLFLY) || a.bTHRUACTORS || (level.Vec3Diff(a.pos,Vec3Offset(0,0,20)).length() > 80) ) continue;
if ( !((a.bMISSILE && (a.target != master) && ValidMissile(a)) || a.bSKULLFLY) || a.bTHRUACTORS || (level.Vec3Diff(a.pos,Vec3Offset(0,0,20)).length() > 80) ) continue;
Vector3 vdir = a.vel;
Vector3 dir = level.Vec3Diff(master.Vec2OffsetZ(0,0,pos.z),a.pos).unit();
if ( dir dot vdir > 0 ) continue; // already moving away