This should work a bit better.
This commit is contained in:
parent
54ab0cf6ed
commit
3c591536dc
2 changed files with 2 additions and 3 deletions
|
@ -117,7 +117,7 @@ void Damage_Apply( entity eTarget, entity eAttacker, int iDamage, vector vHitPos
|
||||||
if ( eTarget.armor ) {
|
if ( eTarget.armor ) {
|
||||||
float fRatio = 0.5;
|
float fRatio = 0.5;
|
||||||
|
|
||||||
if ( eAttacker != world ) {
|
if ( eAttacker.weapon ) {
|
||||||
fRatio = wptTable[ eAttacker.weapon ].fWeaponArmorRatio;
|
fRatio = wptTable[ eAttacker.weapon ].fWeaponArmorRatio;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -132,11 +132,10 @@ void Damage_Apply( entity eTarget, entity eAttacker, int iDamage, vector vHitPos
|
||||||
eTarget.armor = 0;
|
eTarget.armor = 0;
|
||||||
eTarget.iEquipment -= EQUIPMENT_KEVLAR;
|
eTarget.iEquipment -= EQUIPMENT_KEVLAR;
|
||||||
} else {
|
} else {
|
||||||
int oldValue = eTarget.armor;
|
|
||||||
if ( fNewArmor < 0 ) {
|
if ( fNewArmor < 0 ) {
|
||||||
fNewArmor = 1;
|
fNewArmor = 1;
|
||||||
}
|
}
|
||||||
eTarget.armor = ( oldValue - fNewArmor );
|
eTarget.armor -= fNewArmor;
|
||||||
}
|
}
|
||||||
eTarget.health -= fNewDmg;
|
eTarget.health -= fNewDmg;
|
||||||
} else {
|
} else {
|
||||||
|
|
BIN
freecs/progs.dat
BIN
freecs/progs.dat
Binary file not shown.
Loading…
Reference in a new issue