diff --git a/wadsrc/static/zscript/actors/actor.zs b/wadsrc/static/zscript/actors/actor.zs index 45e170331..5184e3fdf 100644 --- a/wadsrc/static/zscript/actors/actor.zs +++ b/wadsrc/static/zscript/actors/actor.zs @@ -81,6 +81,7 @@ class Actor : Thinker native const ORIG_FRICTION = (0xE800/65536.); // original value const ORIG_FRICTION_FACTOR = (2048/65536.); // original value const DEFMORPHTICS = 40 * TICRATE; + const MELEEDELTA = 20; // flags are not defined here, the native fields for those get synthesized from the internal tables. @@ -380,7 +381,7 @@ class Actor : Thinker native RenderStyle 'Normal'; Alpha 1; MinMissileChance 200; - MeleeRange 64 - 20; + MeleeRange 64 - MELEEDELTA; MaxDropoffHeight 24; MaxStepHeight 24; MaxSlopeSteepness STEEPSLOPE; diff --git a/wadsrc/static/zscript/actors/doom/weaponchainsaw.zs b/wadsrc/static/zscript/actors/doom/weaponchainsaw.zs index d3b6932d1..ac05b1828 100644 --- a/wadsrc/static/zscript/actors/doom/weaponchainsaw.zs +++ b/wadsrc/static/zscript/actors/doom/weaponchainsaw.zs @@ -65,7 +65,7 @@ extend class StateProvider } if (range == 0) { - range = MeleeRange + (1. / 65536.); // MBF21 SAWRANGE; + range = MeleeRange + MELEEDELTA + (1. / 65536.); // MBF21 SAWRANGE; } double ang = angle + spread_xy * (Random2[Saw]() / 255.); diff --git a/wadsrc/static/zscript/actors/doom/weaponfist.zs b/wadsrc/static/zscript/actors/doom/weaponfist.zs index d02099bcc..c1535f8c7 100644 --- a/wadsrc/static/zscript/actors/doom/weaponfist.zs +++ b/wadsrc/static/zscript/actors/doom/weaponfist.zs @@ -66,7 +66,7 @@ extend class Actor damage *= 10; double ang = angle + Random2[Punch]() * (5.625 / 256); - double pitch = AimLineAttack (ang, MeleeRange, null, 0., ALF_CHECK3D); + double pitch = AimLineAttack (ang, MeleeRange + MELEEDELTA, null, 0., ALF_CHECK3D); LineAttack (ang, MeleeRange, pitch, damage, 'Melee', "BulletPuff", LAF_ISMELEEATTACK, t); diff --git a/wadsrc/static/zscript/actors/mbf21.zs b/wadsrc/static/zscript/actors/mbf21.zs index 798ac0419..b6eb4ef89 100644 --- a/wadsrc/static/zscript/actors/mbf21.zs +++ b/wadsrc/static/zscript/actors/mbf21.zs @@ -379,7 +379,7 @@ extend class Weapon // slight randomization; weird vanillaism here. :P FTranslatedLineTarget t; double ang = angle + Random2[mbf21]() * (5.625 / 256); - double pitch = AimLineAttack(ang, MeleeRange, t, 0., ALF_CHECK3D); + double pitch = AimLineAttack(ang, range + MELEEDELTA, t, 0., ALF_CHECK3D); LineAttack(ang, range, pitch, damage, 'Melee', "BulletPuff", LAF_ISMELEEATTACK, t); // turn to face target