Skip to content

Commit

Permalink
fixed irst angle and textolite
Browse files Browse the repository at this point in the history
- the angle output is relative to the irst entity. If the target is above you, the pitch is positive. Concept based on the cheezus SF test.
- fixed textolite causing errors when using HEAT type shells vs it
  • Loading branch information
MartyX5555 committed Oct 18, 2023
1 parent 14de907 commit 1343cbb
Show file tree
Hide file tree
Showing 3 changed files with 108 additions and 110 deletions.
6 changes: 2 additions & 4 deletions lua/acf/server/sv_heat.lua
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,13 @@
function ACE_InfraredHeatFromProp( guidance, Target , dist )

if not guidance.SeekSensitivity then print("[ACE | WARN]- Unable to track Heat. SeekSensitivity not found!") return 0 end
if not IsValid(Target) then print("[ACE | WARN]- Unable to track Heat. Target Entity not valid!") return 0 end
if not dist then print("[ACE | WARN]- Unable to track Heat. dist not valid!") return end

local Speed = Target:GetVelocity():Length()
--local Heat = ( guidance.SeekSensitivity * ( Speed / dist * 0.001 / ACE.HeatDistanceLoss ) ) + ACE.AmbientTemp

local Heat = ((guidance.SeekSensitivity * Speed) / dist * 1000 / ACE.HeatDistanceLoss) + ACE.AmbientTemp
--print(') Heat: ' .. Heat)

return Heat

end

--[[-------------------------------------------------------------------------------------
Expand Down
61 changes: 31 additions & 30 deletions lua/acf/shared/armor/textolite.lua
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@

local Material = {}
local Material = {}

Material.id = "Texto"
Material.name = "Textolite"
Material.sname = "Textolite"
Material.desc = "Fiberglass based material, this material provides decent protection agaisnt both chemical especially and kinetic rounds, while taking reduced damage from explosions."
Material.year = 1955
Material.id = "Texto"
Material.name = "Textolite"
Material.sname = "Textolite"
Material.desc = "Fiberglass based material, this material provides decent protection agaisnt both chemical especially and kinetic rounds, while taking reduced damage from explosions."
Material.year = 1955

Material.massMod = 0.35
Material.curve = 0.94
Material.massMod = 0.35
Material.curve = 0.94

--All effectiveness values multiply the Line of Sight armor values of armor.
--All Resiliance values are damage multipliers. Higher = more damage. Lower = less damage.

Material.effectiveness = 0.5
Material.HEATeffectiveness = 1.2
Material.HEeffectiveness = 0.9
Material.resiliance = 50
Material.HEATresiliance = 0.5
Material.HEresiliance = 0.75
Material.effectiveness = 0.5
Material.HEATeffectiveness = 1.2
Material.HEeffectiveness = 0.9
Material.resiliance = 50
Material.HEATresiliance = 0.5
Material.HEresiliance = 0.75

Material.spallarmor = 1
Material.spallresist = 0.65
Material.spallarmor = 1
Material.spallresist = 0.65

Material.spallmult = 1.3
Material.ArmorMul = 0.23
Material.NormMult = 0.5
Material.spallmult = 1.3
Material.ArmorMul = 0.23
Material.NormMult = 0.5

if SERVER then
function Material.ArmorResolution( Entity, armor, losArmor, losArmorHealth, maxPenetration, FrArea, caliber, _, Type)
Expand All @@ -42,16 +42,16 @@ if SERVER then
losArmor = losArmor ^ curve

local HeatTypes = { --
["HEAT"] = true,
["THEAT"] = true,
["HEATFS"] = true,
["THEATFS"] = true,
HEAT = true,
THEAT = true,
HEATFS = true,
THEATFS = true,
}

local OtherImpactType = { --
["HE"] = true,
["Spall"] = true,
["HESH"] = true,
HE = true,
Spall = true,
HESH = true,
}

if HeatTypes[Type] then
Expand Down Expand Up @@ -97,7 +97,7 @@ if SERVER then
HitRes.Overkill = 0
HitRes.Loss = 1

return HitReHeatTypess
return HitRes

elseif OtherImpactType[Type] then

Expand Down Expand Up @@ -179,9 +179,10 @@ if SERVER then
-- Projectile did not breach nor penetrate armor
local Penetration = math.min( maxPenetration , losArmor * effectiveness )

HitRes.Damage = ( Penetration / losArmorHealth / effectiveness ) ^ 2 * FrArea * resiliance * ductilitymult
HitRes.Overkill = 0
HitRes.Loss = 1
HitRes.Damage = ( Penetration / losArmorHealth / effectiveness ) ^ 2 * FrArea * resiliance * ductilitymult
HitRes.Overkill = 0
HitRes.Loss = 1

return HitRes

end
Expand Down
Loading

0 comments on commit 1343cbb

Please sign in to comment.