Skip to content

Commit

Permalink
Fixed bug in rear armor cost inclusion not being modified into a mult…
Browse files Browse the repository at this point in the history
…iplier before being added into considerations for cost.
  • Loading branch information
Dakota0001 committed Nov 6, 2021
1 parent b256d63 commit 86eeee9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lua/entities/dak_tankcore/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1373,9 +1373,10 @@ function ENT:Think()

do --Calculate armor multipliers
self.ArmorSideMult = math.max(self.SideArmor/250,0.1)
self.ArmorRearMult = math.max(self.RearArmor/250,0.1)
local Total = math.max(self.FrontalArmor,self.SideArmor,self.RearArmor)
self.BestAveArmor = Total
armormult = ((Total/420)*(1+(0.25*self.FrontalSpallLinerCoverage)))*(((self.ArmorSideMult+self.ArmorSideMult+self.RearArmor)/3)*(1+(0.25*((self.SideSpallLinerCoverage+self.SideSpallLinerCoverage+self.RearSpallLinerCoverage)/3))))
armormult = ((Total/420)*(1+(0.25*self.FrontalSpallLinerCoverage)))*(((self.ArmorSideMult+self.ArmorSideMult+self.ArmorRearMult)/3)*(1+(0.25*((self.SideSpallLinerCoverage+self.SideSpallLinerCoverage+self.RearSpallLinerCoverage)/3))))
self.ArmorMult = math.Round(math.max(0.01,armormult),3)
self.TotalArmorWeight = self.RHAWeight+self.CHAWeight+self.HHAWeight+self.NERAWeight+self.StillbrewWeight+self.TextoliteWeight+self.ConcreteWeight+self.ERAWeight
local ArmorTypeMult = (((1*(self.RHAWeight/self.TotalArmorWeight))+(0.75*(self.CHAWeight/self.TotalArmorWeight))+(1.25*(self.HHAWeight/self.TotalArmorWeight))+(1.75*(self.NERAWeight/self.TotalArmorWeight))+(1.0*(self.StillbrewWeight/self.TotalArmorWeight))+(1.5*(self.TextoliteWeight/self.TotalArmorWeight))+(0.05*(self.ConcreteWeight/self.TotalArmorWeight))+(1.25*(self.ERAWeight/self.TotalArmorWeight))))
Expand Down

0 comments on commit 86eeee9

Please sign in to comment.