mirror of
https://github.com/ENSL/NS.git
synced 2024-11-10 15:21:54 +00:00
Mantis: 866
o Fixed shotgun falloff. git-svn-id: https://unknownworlds.svn.cloudforge.com/ns1@128 67975925-1194-0748-b3d5-c16f83f1a3a1
This commit is contained in:
parent
c5fca99522
commit
690aa6d22e
1 changed files with 2 additions and 2 deletions
|
@ -1730,10 +1730,10 @@ Vector CBaseEntity::FireBulletsPlayer ( ULONG cShots, Vector vecSrc, Vector vecD
|
|||
|
||||
if(theAdjustedDamage)
|
||||
{
|
||||
if ( isShotgun && !( theEntityHit->pev->iuser3 & AVH_USER3_BREAKABLE) )
|
||||
if ( isShotgun )
|
||||
{
|
||||
float distance=fabs((vecSrc - theEntityHit->pev->origin).Length());
|
||||
if ( distance > BALANCE_FVAR(kShotgunDamageRange) )
|
||||
if ( distance > BALANCE_FVAR(kShotgunDamageRange) && distance <= kSGRange )
|
||||
{
|
||||
float fallOffDistance=distance-BALANCE_FVAR(kShotgunDamageRange);
|
||||
float fallOff=max(0.0, 1.0f-(fallOffDistance/(kSGRange/2)));
|
||||
|
|
Loading…
Reference in a new issue