This commit is contained in:
Rachael Alexanderson 2016-12-10 15:46:35 -05:00
commit 4eef1d99ee
16 changed files with 32 additions and 32 deletions

View file

@ -193,7 +193,7 @@ void DBot::Dofire (ticcmd_t *cmd)
else else
{ {
//*4 is for atmosphere, the chainsaws sounding and all.. //*4 is for atmosphere, the chainsaws sounding and all..
no_fire = (Dist > MELEERANGE*4); no_fire = (Dist > DEFMELEERANGE*4);
} }
} }
else if (player->ReadyWeapon->WeaponFlags & WIF_BOT_BFG) else if (player->ReadyWeapon->WeaponFlags & WIF_BOT_BFG)

View file

@ -2093,7 +2093,7 @@ DEFINE_ACTION_FUNCTION(AStateProvider, A_CustomPunch)
damage *= pr_cwpunch() % 8 + 1; damage *= pr_cwpunch() % 8 + 1;
angle = self->Angles.Yaw + pr_cwpunch.Random2() * (5.625 / 256); angle = self->Angles.Yaw + pr_cwpunch.Random2() * (5.625 / 256);
if (range == 0) range = MELEERANGE; if (range == 0) range = DEFMELEERANGE;
pitch = P_AimLineAttack (self, angle, range, &t); pitch = P_AimLineAttack (self, angle, range, &t);
// only use ammo when actually hitting something! // only use ammo when actually hitting something!

View file

@ -62,7 +62,7 @@ extern int bmapnegy;
#define TALKRANGE (128.) #define TALKRANGE (128.)
#define USERANGE (64.) #define USERANGE (64.)
#define MELEERANGE (64.) #define DEFMELEERANGE (64.)
#define SAWRANGE (64.+(1./65536.)) // use meleerange + 1 so the puff doesn't skip the flash (i.e. plays all states) #define SAWRANGE (64.+(1./65536.)) // use meleerange + 1 so the puff doesn't skip the flash (i.e. plays all states)
#define MISSILERANGE (32*64.) #define MISSILERANGE (32*64.)
#define PLAYERMISSILERANGE (8192.) // [RH] New MISSILERANGE for players #define PLAYERMISSILERANGE (8192.) // [RH] New MISSILERANGE for players

View file

@ -871,7 +871,7 @@ enum ELineAttackFlags
LAF_NOINTERACT = 8, LAF_NOINTERACT = 8,
} }
const MELEERANGE = 64; const DEFMELEERANGE = 64;
const SAWRANGE = (64.+(1./65536.)); // use meleerange + 1 so the puff doesn't skip the flash (i.e. plays all states) const SAWRANGE = (64.+(1./65536.)); // use meleerange + 1 so the puff doesn't skip the flash (i.e. plays all states)
const MISSILERANGE = (32*64); const MISSILERANGE = (32*64);
const PLAYERMISSILERANGE = 8192; // [RH] New MISSILERANGE for players const PLAYERMISSILERANGE = 8192; // [RH] New MISSILERANGE for players

View file

@ -372,8 +372,8 @@ class ScriptedMarine : Actor
A_FaceTarget (); A_FaceTarget ();
double ang = angle + random2[SMarinePunch]() * (5.625 / 256); double ang = angle + random2[SMarinePunch]() * (5.625 / 256);
double pitch = AimLineAttack (ang, MELEERANGE); double pitch = AimLineAttack (ang, DEFMELEERANGE);
LineAttack (ang, MELEERANGE, pitch, damage, 'Melee', "BulletPuff", true, t); LineAttack (ang, DEFMELEERANGE, pitch, damage, 'Melee', "BulletPuff", true, t);
// turn to face target // turn to face target
if (t.linetarget) if (t.linetarget)

View file

@ -65,9 +65,9 @@ extend class Actor
damage *= 10; damage *= 10;
double ang = angle + Random2[Punch]() * (5.625 / 256); double ang = angle + Random2[Punch]() * (5.625 / 256);
double pitch = AimLineAttack (ang, MELEERANGE); double pitch = AimLineAttack (ang, DEFMELEERANGE);
LineAttack (ang, MELEERANGE, pitch, damage, 'Melee', "BulletPuff", LAF_ISMELEEATTACK, t); LineAttack (ang, DEFMELEERANGE, pitch, damage, 'Melee', "BulletPuff", LAF_ISMELEEATTACK, t);
// turn to face target // turn to face target
if (t.linetarget) if (t.linetarget)

View file

@ -77,8 +77,8 @@ class Beak : Weapon
int damage = random[BeakAtk](1,3); int damage = random[BeakAtk](1,3);
double ang = angle; double ang = angle;
double slope = AimLineAttack (ang, MELEERANGE); double slope = AimLineAttack (ang, DEFMELEERANGE);
LineAttack (ang, MELEERANGE, slope, damage, 'Melee', "BeakPuff", true, t); LineAttack (ang, DEFMELEERANGE, slope, damage, 'Melee', "BeakPuff", true, t);
if (t.linetarget) if (t.linetarget)
{ {
angle = t.angleFromSource; angle = t.angleFromSource;
@ -125,8 +125,8 @@ class BeakPowered : Beak
int damage = random[BeakAtk](1,8) * 4; int damage = random[BeakAtk](1,8) * 4;
double ang = angle; double ang = angle;
double slope = AimLineAttack (ang, MELEERANGE); double slope = AimLineAttack (ang, DEFMELEERANGE);
LineAttack (ang, MELEERANGE, slope, damage, 'Melee', "BeakPuff", true, t); LineAttack (ang, DEFMELEERANGE, slope, damage, 'Melee', "BeakPuff", true, t);
if (t.linetarget) if (t.linetarget)
{ {
angle = t.angleFromSource; angle = t.angleFromSource;

View file

@ -74,7 +74,7 @@ class Gauntlets : Weapon
if (power) if (power)
{ {
damage = random[GauntletAtk](1, 8) * 2; damage = random[GauntletAtk](1, 8) * 2;
dist = 4*MELEERANGE; dist = 4*DEFMELEERANGE;
ang += random2[GauntletAtk]() * (2.8125 / 256); ang += random2[GauntletAtk]() * (2.8125 / 256);
pufftype = "GauntletPuff2"; pufftype = "GauntletPuff2";
} }

View file

@ -54,8 +54,8 @@ class Staff : HereticWeapon
return; return;
} }
double ang = angle + Random2[StaffAtk]() * (5.625 / 256); double ang = angle + Random2[StaffAtk]() * (5.625 / 256);
double slope = AimLineAttack (ang, MELEERANGE); double slope = AimLineAttack (ang, DEFMELEERANGE);
LineAttack (ang, MELEERANGE, slope, damage, 'Melee', puff, true, t); LineAttack (ang, DEFMELEERANGE, slope, damage, 'Melee', puff, true, t);
if (t.linetarget) if (t.linetarget)
{ {
//S_StartSound(player.mo, sfx_stfhit); //S_StartSound(player.mo, sfx_stfhit);

View file

@ -66,10 +66,10 @@ class CWeapMace : ClericWeapon
for (int j = 1; j >= -1; j -= 2) for (int j = 1; j >= -1; j -= 2)
{ {
double ang = angle + j*i*(45. / 16); double ang = angle + j*i*(45. / 16);
double slope = AimLineAttack(ang, 2 * MELEERANGE, t); double slope = AimLineAttack(ang, 2 * DEFMELEERANGE, t);
if (t.linetarget) if (t.linetarget)
{ {
LineAttack(ang, 2 * MELEERANGE, slope, damage, 'Melee', "HammerPuff", true, t); LineAttack(ang, 2 * DEFMELEERANGE, slope, damage, 'Melee', "HammerPuff", true, t);
if (t.linetarget != null) if (t.linetarget != null)
{ {
AdjustPlayerAngle(t); AdjustPlayerAngle(t);
@ -81,7 +81,7 @@ class CWeapMace : ClericWeapon
// didn't find any creatures, so try to strike any walls // didn't find any creatures, so try to strike any walls
weaponspecial = 0; weaponspecial = 0;
double slope = AimLineAttack (angle, MELEERANGE); double slope = AimLineAttack (angle, DEFMELEERANGE);
LineAttack (angle, MELEERANGE, slope, damage, 'Melee', "HammerPuff"); LineAttack (angle, DEFMELEERANGE, slope, damage, 'Melee', "HammerPuff");
} }
} }

View file

@ -74,10 +74,10 @@ class CWeapStaff : ClericWeapon
for (int j = 1; j >= -1; j -= 2) for (int j = 1; j >= -1; j -= 2)
{ {
double ang = angle + j*i*(45. / 16); double ang = angle + j*i*(45. / 16);
double slope = AimLineAttack(ang, 1.5 * MELEERANGE, t, 0., ALF_CHECK3D); double slope = AimLineAttack(ang, 1.5 * DEFMELEERANGE, t, 0., ALF_CHECK3D);
if (t.linetarget) if (t.linetarget)
{ {
LineAttack(ang, 1.5 * MELEERANGE, slope, damage, 'Melee', "CStaffPuff", false, t); LineAttack(ang, 1.5 * DEFMELEERANGE, slope, damage, 'Melee', "CStaffPuff", false, t);
if (t.linetarget != null) if (t.linetarget != null)
{ {
angle = t.angleFromSource; angle = t.angleFromSource;

View file

@ -3,7 +3,7 @@
class FWeapAxe : FighterWeapon class FWeapAxe : FighterWeapon
{ {
const AXERANGE = (2.25 * MELEERANGE); const AXERANGE = (2.25 * DEFMELEERANGE);
Default Default
{ {
@ -273,8 +273,8 @@ class FWeapAxe : FighterWeapon
// didn't find any creatures, so try to strike any walls // didn't find any creatures, so try to strike any walls
self.weaponspecial = 0; self.weaponspecial = 0;
double slope = AimLineAttack (angle, MELEERANGE); double slope = AimLineAttack (angle, DEFMELEERANGE);
LineAttack (angle, MELEERANGE, slope, damage, 'Melee', pufftype, true); LineAttack (angle, DEFMELEERANGE, slope, damage, 'Melee', pufftype, true);
} }
} }

View file

@ -56,7 +56,7 @@ class FWeapFist : FighterWeapon
Class<Actor> pufftype; Class<Actor> pufftype;
FTranslatedLineTarget t; FTranslatedLineTarget t;
double slope = AimLineAttack (angle, 2*MELEERANGE, t); double slope = AimLineAttack (angle, 2*DEFMELEERANGE, t);
if (t.linetarget != null) if (t.linetarget != null)
{ {
if (++weaponspecial >= 3) if (++weaponspecial >= 3)
@ -69,7 +69,7 @@ class FWeapFist : FighterWeapon
{ {
pufftype = "PunchPuff"; pufftype = "PunchPuff";
} }
LineAttack (angle, 2*MELEERANGE, slope, damage, 'Melee', pufftype, true, t); LineAttack (angle, 2*DEFMELEERANGE, slope, damage, 'Melee', pufftype, true, t);
if (t.linetarget != null) if (t.linetarget != null)
{ {
// The mass threshold has been changed to CommanderKeen's value which has been used most often for 'unmovable' stuff. // The mass threshold has been changed to CommanderKeen's value which has been used most often for 'unmovable' stuff.
@ -117,8 +117,8 @@ class FWeapFist : FighterWeapon
// didn't find any creatures, so try to strike any walls // didn't find any creatures, so try to strike any walls
weaponspecial = 0; weaponspecial = 0;
double slope = AimLineAttack (angle, MELEERANGE); double slope = AimLineAttack (angle, DEFMELEERANGE);
LineAttack (angle, MELEERANGE, slope, damage, 'Melee', "PunchPuff", true); LineAttack (angle, DEFMELEERANGE, slope, damage, 'Melee', "PunchPuff", true);
} }
} }

View file

@ -3,7 +3,7 @@
class FWeapHammer : FighterWeapon class FWeapHammer : FighterWeapon
{ {
const HAMMER_RANGE = 1.5 * MELEERANGE; const HAMMER_RANGE = 1.5 * DEFMELEERANGE;
Default Default
{ {

View file

@ -72,7 +72,7 @@ class MWeapFrost : MageWeapon
for (int i = 0; i < 16; i++) for (int i = 0; i < 16; i++)
{ {
double ang = angle + i*(45./16); double ang = angle + i*(45./16);
double slope = AimLineAttack (ang, MELEERANGE, t, 0., ALF_CHECK3D); double slope = AimLineAttack (ang, DEFMELEERANGE, t, 0., ALF_CHECK3D);
if (t.linetarget) if (t.linetarget)
{ {
t.linetarget.DamageMobj (self, self, damage, 'Ice', DMG_USEANGLE, t.angleFromSource); t.linetarget.DamageMobj (self, self, damage, 'Ice', DMG_USEANGLE, t.angleFromSource);

View file

@ -70,8 +70,8 @@ class Snout : Weapon
int damage = random[SnoutAttack](3, 6); int damage = random[SnoutAttack](3, 6);
double ang = angle; double ang = angle;
double slope = AimLineAttack(ang, MELEERANGE); double slope = AimLineAttack(ang, DEFMELEERANGE);
Actor puff = LineAttack(ang, MELEERANGE, slope, damage, 'Melee', "SnoutPuff", true, t); Actor puff = LineAttack(ang, DEFMELEERANGE, slope, damage, 'Melee', "SnoutPuff", true, t);
A_PlaySound("PigActive", CHAN_VOICE); A_PlaySound("PigActive", CHAN_VOICE);
if(t.linetarget) if(t.linetarget)
{ {