From b982482f74e71fa0e9ab549bef2b7c0cdf4c773c Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Sun, 17 Jun 2012 03:18:26 +0000 Subject: [PATCH] - Fixed: P_LineAttack() calls that use damage type 'None' should use 'Hitscan' instead. SVN r3694 (trunk) --- src/fragglescript/t_func.cpp | 2 +- src/g_doom/a_doomweaps.cpp | 2 +- src/g_doom/a_possessed.cpp | 6 +++--- src/g_doom/a_scriptedmarine.cpp | 2 +- src/g_heretic/a_hereticweaps.cpp | 6 +++--- src/g_strife/a_reaver.cpp | 2 +- src/g_strife/a_rebels.cpp | 2 +- src/g_strife/a_strifeweapons.cpp | 4 ++-- src/g_strife/a_templar.cpp | 2 +- src/thingdef/thingdef_codeptr.cpp | 6 +++--- 10 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/fragglescript/t_func.cpp b/src/fragglescript/t_func.cpp index 1837a5e9c..058741401 100644 --- a/src/fragglescript/t_func.cpp +++ b/src/fragglescript/t_func.cpp @@ -3747,7 +3747,7 @@ void FParser::SF_LineAttack() angle = (intvalue(t_argv[1]) * (ANG45 / 45)); slope = P_AimLineAttack(mo, angle, MISSILERANGE); - P_LineAttack(mo, angle, MISSILERANGE, slope, damage, NAME_None, NAME_BulletPuff); + P_LineAttack(mo, angle, MISSILERANGE, slope, damage, NAME_Hitscan, NAME_BulletPuff); } } diff --git a/src/g_doom/a_doomweaps.cpp b/src/g_doom/a_doomweaps.cpp index 5fd73cfbf..4ebeccd24 100644 --- a/src/g_doom/a_doomweaps.cpp +++ b/src/g_doom/a_doomweaps.cpp @@ -278,7 +278,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_FireShotgun2) angle, PLAYERMISSILERANGE, pitch + (pr_fireshotgun2.Random2() * 332063), damage, - NAME_None, NAME_BulletPuff); + NAME_Hitscan, NAME_BulletPuff); } } diff --git a/src/g_doom/a_possessed.cpp b/src/g_doom/a_possessed.cpp index c792a489d..a5fef2532 100644 --- a/src/g_doom/a_possessed.cpp +++ b/src/g_doom/a_possessed.cpp @@ -34,7 +34,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_PosAttack) S_Sound (self, CHAN_WEAPON, "grunt/attack", 1, ATTN_NORM); angle += pr_posattack.Random2() << 20; damage = ((pr_posattack()%5)+1)*3; - P_LineAttack (self, angle, MISSILERANGE, slope, damage, NAME_None, NAME_BulletPuff); + P_LineAttack (self, angle, MISSILERANGE, slope, damage, NAME_Hitscan, NAME_BulletPuff); } static void A_SPosAttack2 (AActor *self) @@ -51,7 +51,7 @@ static void A_SPosAttack2 (AActor *self) { int angle = bangle + (pr_sposattack.Random2() << 20); int damage = ((pr_sposattack()%5)+1)*3; - P_LineAttack(self, angle, MISSILERANGE, slope, damage, NAME_None, NAME_BulletPuff); + P_LineAttack(self, angle, MISSILERANGE, slope, damage, NAME_Hitscan, NAME_BulletPuff); } } @@ -98,7 +98,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_CPosAttack) angle = bangle + (pr_cposattack.Random2() << 20); damage = ((pr_cposattack()%5)+1)*3; - P_LineAttack (self, angle, MISSILERANGE, slope, damage, NAME_None, NAME_BulletPuff); + P_LineAttack (self, angle, MISSILERANGE, slope, damage, NAME_Hitscan, NAME_BulletPuff); } DEFINE_ACTION_FUNCTION(AActor, A_CPosRefire) diff --git a/src/g_doom/a_scriptedmarine.cpp b/src/g_doom/a_scriptedmarine.cpp index db87f2589..3d994f502 100644 --- a/src/g_doom/a_scriptedmarine.cpp +++ b/src/g_doom/a_scriptedmarine.cpp @@ -441,7 +441,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_M_FireShotgun2) P_LineAttack (self, angle, MISSILERANGE, pitch + (pr_m_fireshotgun2.Random2() * 332063), damage, - NAME_None, NAME_BulletPuff); + NAME_Hitscan, NAME_BulletPuff); } self->special1 = level.maptime; } diff --git a/src/g_heretic/a_hereticweaps.cpp b/src/g_heretic/a_hereticweaps.cpp index d287b01b7..79291659f 100644 --- a/src/g_heretic/a_hereticweaps.cpp +++ b/src/g_heretic/a_hereticweaps.cpp @@ -126,7 +126,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_FireGoldWandPL1) { angle += pr_fgw.Random2() << 18; } - P_LineAttack (self, angle, PLAYERMISSILERANGE, pitch, damage, NAME_None, "GoldWandPuff1"); + P_LineAttack (self, angle, PLAYERMISSILERANGE, pitch, damage, NAME_Hitscan, "GoldWandPuff1"); S_Sound (self, CHAN_WEAPON, "weapons/wandhit", 1, ATTN_NORM); } @@ -164,7 +164,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_FireGoldWandPL2) for(i = 0; i < 5; i++) { damage = 1+(pr_fgw2()&7); - P_LineAttack (self, angle, PLAYERMISSILERANGE, pitch, damage, NAME_None, "GoldWandPuff2"); + P_LineAttack (self, angle, PLAYERMISSILERANGE, pitch, damage, NAME_Hitscan, "GoldWandPuff2"); angle += ((ANG45/8)*2)/4; } S_Sound (self, CHAN_WEAPON, "weapons/wandhit", 1, ATTN_NORM); @@ -784,7 +784,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_FireBlasterPL1) { angle += pr_fb1.Random2() << 18; } - P_LineAttack (self, angle, PLAYERMISSILERANGE, pitch, damage, NAME_None, "BlasterPuff"); + P_LineAttack (self, angle, PLAYERMISSILERANGE, pitch, damage, NAME_Hitscan, "BlasterPuff"); S_Sound (self, CHAN_WEAPON, "weapons/blastershoot", 1, ATTN_NORM); } diff --git a/src/g_strife/a_reaver.cpp b/src/g_strife/a_reaver.cpp index 893386534..6cf0d4601 100644 --- a/src/g_strife/a_reaver.cpp +++ b/src/g_strife/a_reaver.cpp @@ -27,7 +27,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_ReaverRanged) { angle_t angle = bangle + (pr_reaverattack.Random2() << 20); int damage = ((pr_reaverattack() & 7) + 1) * 3; - P_LineAttack (self, angle, MISSILERANGE, pitch, damage, NAME_None, NAME_StrifePuff); + P_LineAttack (self, angle, MISSILERANGE, pitch, damage, NAME_Hitscan, NAME_StrifePuff); } } } diff --git a/src/g_strife/a_rebels.cpp b/src/g_strife/a_rebels.cpp index 58a2f02d1..81490c361 100644 --- a/src/g_strife/a_rebels.cpp +++ b/src/g_strife/a_rebels.cpp @@ -32,7 +32,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_ShootGun) pitch = P_AimLineAttack (self, self->angle, MISSILERANGE); P_LineAttack (self, self->angle + (pr_shootgun.Random2() << 19), MISSILERANGE, pitch, - 3*(pr_shootgun() % 5 + 1), NAME_None, NAME_StrifePuff); + 3*(pr_shootgun() % 5 + 1), NAME_Hitscan, NAME_StrifePuff); } // Teleporter Beacon -------------------------------------------------------- diff --git a/src/g_strife/a_strifeweapons.cpp b/src/g_strife/a_strifeweapons.cpp index b2abb4b43..e7a9a8533 100644 --- a/src/g_strife/a_strifeweapons.cpp +++ b/src/g_strife/a_strifeweapons.cpp @@ -266,7 +266,7 @@ void P_StrifeGunShot (AActor *mo, bool accurate, angle_t pitch) angle += pr_sgunshot.Random2() << (20 - mo->player->mo->accuracy * 5 / 100); } - P_LineAttack (mo, angle, PLAYERMISSILERANGE, pitch, damage, NAME_None, NAME_StrifePuff); + P_LineAttack (mo, angle, PLAYERMISSILERANGE, pitch, damage, NAME_Hitscan, NAME_StrifePuff); } //============================================================================ @@ -432,7 +432,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_FireMauler1) // it should use a different puff. ZDoom's default range is longer // than this, so let's not handicap it by being too faithful to the // original. - P_LineAttack (self, angle, PLAYERMISSILERANGE, pitch, damage, NAME_None, NAME_MaulerPuff); + P_LineAttack (self, angle, PLAYERMISSILERANGE, pitch, damage, NAME_Hitscan, NAME_MaulerPuff); } } diff --git a/src/g_strife/a_templar.cpp b/src/g_strife/a_templar.cpp index a6a733a00..282193d48 100644 --- a/src/g_strife/a_templar.cpp +++ b/src/g_strife/a_templar.cpp @@ -30,6 +30,6 @@ DEFINE_ACTION_FUNCTION(AActor, A_TemplarAttack) damage = (pr_templar() & 4) * 2; angle = self->angle + (pr_templar.Random2() << 19); pitchdiff = pr_templar.Random2() * 332063; - P_LineAttack (self, angle, MISSILERANGE+64*FRACUNIT, pitch+pitchdiff, damage, NAME_None, NAME_MaulerPuff); + P_LineAttack (self, angle, MISSILERANGE+64*FRACUNIT, pitch+pitchdiff, damage, NAME_Hitscan, NAME_MaulerPuff); } } diff --git a/src/thingdef/thingdef_codeptr.cpp b/src/thingdef/thingdef_codeptr.cpp index 6bf18b443..1d5da0e3b 100644 --- a/src/thingdef/thingdef_codeptr.cpp +++ b/src/thingdef/thingdef_codeptr.cpp @@ -531,7 +531,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_BulletAttack) int angle = bangle + (pr_cabullet.Random2() << 20); int damage = ((pr_cabullet()%5)+1)*3; P_LineAttack(self, angle, MISSILERANGE, slope, damage, - NAME_None, NAME_BulletPuff); + NAME_Hitscan, NAME_BulletPuff); } } @@ -763,7 +763,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_Explode) // Comparing the results of a test wad with Eternity, it seems A_NailBomb does not aim P_LineAttack (self, ang, MISSILERANGE, 0, //P_AimLineAttack (self, ang, MISSILERANGE), - naildamage, NAME_None, pufftype); + naildamage, NAME_Hitscan, pufftype); } } @@ -1055,7 +1055,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CustomBulletAttack) if (!(Flags & CBAF_NORANDOM)) damage *= ((pr_cabullet()%3)+1); - P_LineAttack(self, angle, Range, slope, damage, NAME_None, pufftype); + P_LineAttack(self, angle, Range, slope, damage, NAME_Hitscan, pufftype); } } }