mirror of
https://github.com/unknownworlds/NS.git
synced 2024-11-29 07:41:55 +00:00
o Removed shotgun falloff
git-svn-id: https://unknownworlds.svn.cloudforge.com/ns1@179 67975925-1194-0748-b3d5-c16f83f1a3a1
This commit is contained in:
parent
4a65ca88fc
commit
5a696789fb
3 changed files with 2 additions and 18 deletions
Binary file not shown.
Binary file not shown.
|
@ -1728,24 +1728,8 @@ Vector CBaseEntity::FireBulletsPlayer ( ULONG cShots, Vector vecSrc, Vector vecD
|
||||||
{
|
{
|
||||||
int theAdjustedDamage = iDamage*theScalar;
|
int theAdjustedDamage = iDamage*theScalar;
|
||||||
|
|
||||||
if(theAdjustedDamage)
|
if(theAdjustedDamage) {
|
||||||
{
|
theEntityHit->TraceAttack(pevAttacker, theAdjustedDamage, vecDir, &tr, theDamageType | ((theAdjustedDamage > 16) ? DMG_ALWAYSGIB : DMG_NEVERGIB) );
|
||||||
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 );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue