diff options
author | Jack <66967891+ASpoonPlaysGames@users.noreply.github.com> | 2023-07-25 21:40:30 +0100 |
---|---|---|
committer | GeckoEidechse <gecko.eidechse+git@pm.me> | 2023-07-25 23:01:31 +0200 |
commit | 5c087b095be2968da9555a0f94499e2c8b491089 (patch) | |
tree | 115272bb1cdbb5370a59dd7abe4b4d1e658a2220 /Northstar.Custom/mod | |
parent | 93a7b2dfdb2c1bf08831b8c7ece0a16e17b1a6ec (diff) | |
download | NorthstarMods-1.17.1-rc4.tar.gz NorthstarMods-1.17.1-rc4.zip |
Fix Arc Cannon not dealing damage when used by NPCs (#666)v1.17.3-rc1v1.17.3v1.17.2-rc1v1.17.2v1.17.1-rc5v1.17.1-rc4v1.17.1-rc3v1.17.11.17.X
Fixes NPCs using mp_titanweapon_arc_cannon not dealing damage to other entities
(cherry picked from commit 18298d266cea088f777a59ef94ec8fafdd78d339)
Diffstat (limited to 'Northstar.Custom/mod')
-rw-r--r-- | Northstar.Custom/mod/scripts/vscripts/weapons/_arc_cannon.nut | 10 | ||||
-rw-r--r-- | Northstar.Custom/mod/scripts/weapons/mp_titanweapon_arc_cannon.txt | 8 |
2 files changed, 14 insertions, 4 deletions
diff --git a/Northstar.Custom/mod/scripts/vscripts/weapons/_arc_cannon.nut b/Northstar.Custom/mod/scripts/vscripts/weapons/_arc_cannon.nut index cd58ef06..01138967 100644 --- a/Northstar.Custom/mod/scripts/vscripts/weapons/_arc_cannon.nut +++ b/Northstar.Custom/mod/scripts/vscripts/weapons/_arc_cannon.nut @@ -552,12 +552,16 @@ function ZapTarget( zapInfo, target, beamStartPos, beamEndPos, chainNum = 1 ) int damageNearValue = eWeaponVar.damage_near_value int damageFarValueTitanArmor = eWeaponVar.damage_far_value_titanarmor int damageNearValueTitanArmor = eWeaponVar.damage_near_value_titanarmor + int damageFarDistance = eWeaponVar.damage_far_distance + int damageNearDistance = eWeaponVar.damage_near_distance if ( zapInfo.player.IsNPC() ) { damageFarValue = eWeaponVar.npc_damage_far_value damageNearValue = eWeaponVar.npc_damage_near_value damageFarValueTitanArmor = eWeaponVar.npc_damage_far_value_titanarmor damageNearValueTitanArmor = eWeaponVar.npc_damage_near_value_titanarmor + damageFarDistance = eWeaponVar.npc_damage_far_distance + damageNearDistance = eWeaponVar.npc_damage_near_distance } if ( IsValid( target ) && IsValid( zapInfo.player ) ) @@ -613,8 +617,8 @@ function ZapTarget( zapInfo, target, beamStartPos, beamEndPos, chainNum = 1 ) { // use distance for damage if the weapon auto-fires entity weapon = expect entity( zapInfo.weapon ) - float nearDist = weapon.GetWeaponSettingFloat( eWeaponVar.damage_near_distance ) - float farDist = weapon.GetWeaponSettingFloat( eWeaponVar.damage_far_distance ) + float nearDist = weapon.GetWeaponSettingFloat( damageNearDistance ) + float farDist = weapon.GetWeaponSettingFloat( damageFarDistance ) float dist = Distance( weapon.GetOrigin(), target.GetOrigin() ) damageAmount = GraphCapped( dist, farDist, nearDist, damageMin, damageMax ) @@ -1044,4 +1048,4 @@ function GetWeaponChargeFrac( weapon ) if ( weapon.IsChargeWeapon() ) return weapon.GetWeaponChargeFraction() return 1.0 -}
\ No newline at end of file +} diff --git a/Northstar.Custom/mod/scripts/weapons/mp_titanweapon_arc_cannon.txt b/Northstar.Custom/mod/scripts/weapons/mp_titanweapon_arc_cannon.txt index 11d87a4d..2672dca9 100644 --- a/Northstar.Custom/mod/scripts/weapons/mp_titanweapon_arc_cannon.txt +++ b/Northstar.Custom/mod/scripts/weapons/mp_titanweapon_arc_cannon.txt @@ -56,6 +56,12 @@ WeaponData "damage_far_value_titanarmor" "100" // Damage - When Used by NPCs + "npc_damage_near_distance" "200" + "npc_damage_far_distance" "2500" + "npc_damage_near_value" "220" + "npc_damage_far_value" "170" + "npc_damage_near_value_titanarmor" "1800" + "npc_damage_far_value_titanarmor" "100" "critical_hit" "0" "critical_hit_damage_scale" "1.5" @@ -340,4 +346,4 @@ WeaponData } } } -}
\ No newline at end of file +} |