From d8a50a736ef9350dc300fb83afc64eac6b391f4b Mon Sep 17 00:00:00 2001 From: tankefugl Date: Tue, 14 Jun 2005 13:26:01 +0000 Subject: [PATCH] Removed shotgun falloff. git-svn-id: https://unknownworlds.svn.cloudforge.com/ns1@186 67975925-1194-0748-b3d5-c16f83f1a3a1 --- releases/valve/source/dlls/combat.cpp | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/releases/valve/source/dlls/combat.cpp b/releases/valve/source/dlls/combat.cpp index bd3ffbcd..2a5ba11a 100644 --- a/releases/valve/source/dlls/combat.cpp +++ b/releases/valve/source/dlls/combat.cpp @@ -1728,24 +1728,8 @@ Vector CBaseEntity::FireBulletsPlayer ( ULONG cShots, Vector vecSrc, Vector vecD { int theAdjustedDamage = iDamage*theScalar; - if(theAdjustedDamage) - { - if ( isShotgun && !( theEntityHit->pev->iuser3 & AVH_USER3_BREAKABLE) ) - { - float distance=fabs((vecSrc - theEntityHit->pev->origin).Length()); - if ( distance > BALANCE_FVAR(kShotgunDamageRange) ) - { - float fallOffDistance=distance-BALANCE_FVAR(kShotgunDamageRange); - float fallOff=max(0.0, 1.0f-(fallOffDistance/(kSGRange/2))); - theAdjustedDamage*=fallOff; - } - } - if ( theAdjustedDamage ) { - theEntityHit->TraceAttack(pevAttacker, theAdjustedDamage, vecDir, &tr, theDamageType | ((theAdjustedDamage > 16) ? DMG_ALWAYSGIB : DMG_NEVERGIB) ); - } - -// TEXTURETYPE_PlaySound(&tr, vecSrc, vecEnd, iBulletType); -// DecalGunshot( &tr, iBulletType ); + if(theAdjustedDamage) { + theEntityHit->TraceAttack(pevAttacker, theAdjustedDamage, vecDir, &tr, theDamageType | ((theAdjustedDamage > 16) ? DMG_ALWAYSGIB : DMG_NEVERGIB) ); } } }