mirror of
https://github.com/HaodongMo/ARC-9.git
synced 2025-03-04 03:02:58 -05:00
comment out all dev checks, calling globals bad
This commit is contained in:
parent
471ed11afd
commit
b6984abe50
@ -369,13 +369,13 @@ function ARC9:ProgressPhysBullet(bullet, timestep)
|
||||
attacker.ARC9_LAGCOMP = false
|
||||
end
|
||||
|
||||
if ARC9.Dev(2) then
|
||||
if SERVER then
|
||||
debugoverlay.Line(oldpos, tr.HitPos, 5, Color(100,100,255), true)
|
||||
else
|
||||
debugoverlay.Line(oldpos, tr.HitPos, 5, Color(255,200,100), true)
|
||||
end
|
||||
end
|
||||
-- if ARC9.Dev(2) then
|
||||
-- if SERVER then
|
||||
-- debugoverlay.Line(oldpos, tr.HitPos, 5, Color(100,100,255), true)
|
||||
-- else
|
||||
-- debugoverlay.Line(oldpos, tr.HitPos, 5, Color(255,200,100), true)
|
||||
-- end
|
||||
-- end
|
||||
|
||||
if tr.HitSky then
|
||||
if CLIENT and bulletImaginary:GetBool() then
|
||||
@ -401,13 +401,13 @@ function ARC9:ProgressPhysBullet(bullet, timestep)
|
||||
attacker.ARC9_LAGCOMP = true
|
||||
end
|
||||
|
||||
if ARC9.Dev(2) then
|
||||
if SERVER then
|
||||
debugoverlay.Cross(tr.HitPos, 5, 5, Color(100,100,255), true)
|
||||
else
|
||||
debugoverlay.Cross(tr.HitPos, 5, 5, Color(255,200,100), true)
|
||||
end
|
||||
end
|
||||
-- if ARC9.Dev(2) then
|
||||
-- if SERVER then
|
||||
-- debugoverlay.Cross(tr.HitPos, 5, 5, Color(100,100,255), true)
|
||||
-- else
|
||||
-- debugoverlay.Cross(tr.HitPos, 5, 5, Color(255,200,100), true)
|
||||
-- end
|
||||
-- end
|
||||
|
||||
local eid = tr.Entity:EntIndex()
|
||||
|
||||
|
@ -90,7 +90,7 @@ function EFFECT:Init(data)
|
||||
end
|
||||
end
|
||||
|
||||
if ARC9.Dev(2) then debugoverlay.Sphere(pos, 2, 1, Color(255, 255, 255, 1)) end
|
||||
-- if ARC9.Dev(2) then debugoverlay.Sphere(pos, 2, 1, Color(255, 255, 255, 1)) end
|
||||
end
|
||||
|
||||
function EFFECT:Think()
|
||||
|
@ -131,6 +131,7 @@ function SWEP:GetCameraControl(wm)
|
||||
if !camqca then return end
|
||||
|
||||
local mdl = slottbl.GunDriverModel
|
||||
if !IsValid(mdl) then return end
|
||||
|
||||
mdl:SetPos(vector_origin)
|
||||
mdl:SetAngles(angle_zero)
|
||||
|
@ -259,11 +259,11 @@ function SWEP:DoTPIK()
|
||||
ply_r_forearm_pos = LocalToWorld(self.TPIKCache.r_forearm_pos, angle_zero, ply_r_shoulder_matrix:GetTranslation(), ply_r_shoulder_matrix:GetAngles())
|
||||
end
|
||||
|
||||
if ARC9.Dev(2) then
|
||||
debugoverlay.Line(ply_r_shoulder_matrix:GetTranslation(), ply_r_upperarm_pos, 0.1)
|
||||
debugoverlay.Line(ply_r_upperarm_pos, ply_r_forearm_pos, 0.1)
|
||||
-- if ARC9.Dev(2) then
|
||||
-- debugoverlay.Line(ply_r_shoulder_matrix:GetTranslation(), ply_r_upperarm_pos, 0.1)
|
||||
-- debugoverlay.Line(ply_r_upperarm_pos, ply_r_forearm_pos, 0.1)
|
||||
-- debugoverlay.Line(ply_r_forearm_pos, ply_r_hand_matrix:GetTranslation(), 0.1)
|
||||
end
|
||||
-- end
|
||||
-- ply_r_shoulder_matrix:SetTranslation(ply_r_upperarm_pos)
|
||||
ply_r_elbow_matrix:SetTranslation(ply_r_upperarm_pos)
|
||||
|
||||
@ -318,11 +318,11 @@ function SWEP:DoTPIK()
|
||||
ply_l_forearm_pos = LocalToWorld(self.TPIKCache.l_forearm_pos, angle_zero, ply_l_shoulder_matrix:GetTranslation(), ply_l_shoulder_matrix:GetAngles())
|
||||
end
|
||||
|
||||
if ARC9.Dev(2) then
|
||||
debugoverlay.Line(ply_l_shoulder_matrix:GetTranslation(), ply_l_upperarm_pos, 0.1, Color(255, 255, 255), true)
|
||||
debugoverlay.Line(ply_l_upperarm_pos, ply_l_forearm_pos, 0.1, Color(255, 255, 255), true)
|
||||
-- if ARC9.Dev(2) then
|
||||
-- debugoverlay.Line(ply_l_shoulder_matrix:GetTranslation(), ply_l_upperarm_pos, 0.1, Color(255, 255, 255), true)
|
||||
-- debugoverlay.Line(ply_l_upperarm_pos, ply_l_forearm_pos, 0.1, Color(255, 255, 255), true)
|
||||
-- debugoverlay.Line(ply_l_forearm_pos, ply_l_hand_matrix:GetTranslation(), 0.1, Color(255, 255, 255), true)
|
||||
end
|
||||
-- end
|
||||
|
||||
-- ply_l_shoulder_matrix:SetTranslation(ply_l_upperarm_pos)
|
||||
ply_l_hand_matrix:SetTranslation(ply_l_forearm_pos)
|
||||
|
@ -199,17 +199,17 @@ function SWEP:GetIndoor()
|
||||
traceTable.filter = wo
|
||||
t_influ = t_influ + (tin.Influence or 1)
|
||||
local result = util.TraceLine(traceTable)
|
||||
if ARC9.Dev(2) then
|
||||
debugoverlay.Line(wop - (vector_up * 4), result.HitPos - (vector_up * 4), 5, Color((_ / 4) * 255, 0, (1 - (_ / 4)) * 255))
|
||||
debugoverlay.Text(result.HitPos - (vector_up * 4), math.Round((result.HitSky and 1 or result.Fraction) * 100) .. "%", 5)
|
||||
end
|
||||
-- if ARC9.Dev(2) then
|
||||
-- debugoverlay.Line(wop - (vector_up * 4), result.HitPos - (vector_up * 4), 5, Color((_ / 4) * 255, 0, (1 - (_ / 4)) * 255))
|
||||
-- debugoverlay.Text(result.HitPos - (vector_up * 4), math.Round((result.HitSky and 1 or result.Fraction) * 100) .. "%", 5)
|
||||
-- end
|
||||
vol = vol + (result.HitSky and 1 or result.Fraction) ^ 1.5 * tin.Influence
|
||||
end
|
||||
|
||||
self.IsIndoors = 1 - vol / t_influ
|
||||
if ARC9.Dev(2) then
|
||||
print(self.IsIndoors)
|
||||
end
|
||||
-- if ARC9.Dev(2) then
|
||||
-- print(self.IsIndoors)
|
||||
-- end
|
||||
|
||||
return self.IsIndoors
|
||||
end
|
@ -9,9 +9,9 @@ local function IsPenetrating(ptr, ptrent)
|
||||
mins = mins + (mins - wsc) * 0.25
|
||||
maxs = maxs + (maxs - wsc) * 0.25
|
||||
local withinbounding = ptr.HitPos:WithinAABox(mins, maxs)
|
||||
if ARC9.Dev(2) then
|
||||
debugoverlay.Cross(ptr.HitPos, withinbounding and 2 or 6, 5, withinbounding and Color(255, 255, 0) or Color(128, 255, 0), true)
|
||||
end
|
||||
-- if ARC9.Dev(2) then
|
||||
-- debugoverlay.Cross(ptr.HitPos, withinbounding and 2 or 6, 5, withinbounding and Color(255, 255, 0) or Color(128, 255, 0), true)
|
||||
-- end
|
||||
|
||||
if withinbounding then return true end
|
||||
end
|
||||
@ -126,9 +126,9 @@ function SWEP:Penetrate(tr, range, penleft, alreadypenned)
|
||||
-- debugoverlay.Line(endpos, endpos + (dir * pentracelen), 10, Color(255, colorlr, colorlr), true)
|
||||
-- end
|
||||
|
||||
if ARC9.Dev(2) then
|
||||
debugoverlay.Line(endpos, endpos + (dir * pentracelen), 10, Color(255, 0, 0), true)
|
||||
end
|
||||
-- if ARC9.Dev(2) then
|
||||
-- debugoverlay.Line(endpos, endpos + (dir * pentracelen), 10, Color(255, 0, 0), true)
|
||||
-- end
|
||||
|
||||
endpos = endpos + (dir * pentracelen)
|
||||
range = range + pentracelen
|
||||
@ -203,13 +203,13 @@ function SWEP:Penetrate(tr, range, penleft, alreadypenned)
|
||||
range = range + (btr.HitPos - btr.StartPos):Length()
|
||||
self:AfterShotFunction(btr, dmg, range, penleft, alreadypenned)
|
||||
|
||||
if ARC9.Dev(2) then
|
||||
if SERVER then
|
||||
debugoverlay.Cross(btr.HitPos, 4, 5, Color(255, 0, 0), false)
|
||||
else
|
||||
debugoverlay.Cross(btr.HitPos, 4, 5, Color(255, 255, 255), false)
|
||||
end
|
||||
end
|
||||
-- if ARC9.Dev(2) then
|
||||
-- if SERVER then
|
||||
-- debugoverlay.Cross(btr.HitPos, 4, 5, Color(255, 0, 0), false)
|
||||
-- else
|
||||
-- debugoverlay.Cross(btr.HitPos, 4, 5, Color(255, 255, 255), false)
|
||||
-- end
|
||||
-- end
|
||||
end
|
||||
}
|
||||
if(table.Count(alreadypenned) == 1) then
|
||||
|
@ -427,9 +427,9 @@ function SWEP:GetViewModelRecoil(pos, ang, correct)
|
||||
|
||||
pos, ang = self:RotateAroundPoint(pos, ang, vrc, self:GetVisualRecoilPos(), vra * correct)
|
||||
|
||||
if ARC9.Dev(2) then
|
||||
debugoverlay.Axis(self:GetVM():LocalToWorld(self:GetProcessedValue("VisualRecoilCenter", true)), ang, 2, 0.1, true)
|
||||
end
|
||||
-- if ARC9.Dev(2) then
|
||||
-- debugoverlay.Axis(self:GetVM():LocalToWorld(self:GetProcessedValue("VisualRecoilCenter", true)), ang, 2, 0.1, true)
|
||||
-- end
|
||||
|
||||
return pos, ang
|
||||
end
|
||||
|
@ -670,13 +670,13 @@ function SWEP:DoProjectileAttack(pos, ang, spread)
|
||||
self.Penned = 0
|
||||
self:AfterShotFunction(btr, dmg, range, self:GetProcessedValue("Penetration", true), {})
|
||||
|
||||
if ARC9.Dev(2) then
|
||||
if SERVER then
|
||||
debugoverlay.Cross(btr.HitPos, 4, 5, Color(255, 0, 0), false)
|
||||
else
|
||||
debugoverlay.Cross(btr.HitPos, 4, 5, Color(255, 255, 255), false)
|
||||
end
|
||||
end
|
||||
-- if ARC9.Dev(2) then
|
||||
-- if SERVER then
|
||||
-- debugoverlay.Cross(btr.HitPos, 4, 5, Color(255, 0, 0), false)
|
||||
-- else
|
||||
-- debugoverlay.Cross(btr.HitPos, 4, 5, Color(255, 255, 255), false)
|
||||
-- end
|
||||
-- end
|
||||
end
|
||||
|
||||
owner:FireBullets(fireBullets)
|
||||
|
@ -100,7 +100,8 @@ function SWEP:BuildMultiSight()
|
||||
local keepbaseirons = true
|
||||
local keepmodularirons = true
|
||||
|
||||
local dev3 = ARC9.Dev(3)
|
||||
-- local dev3 = ARC9.Dev(3)
|
||||
local dev3 = false
|
||||
|
||||
for i, slottbl in ipairs(self:GetSubSlotList()) do
|
||||
if !slottbl.Installed then continue end
|
||||
@ -364,9 +365,9 @@ do
|
||||
end
|
||||
|
||||
function SWEP:GetSight()
|
||||
if ARC9.Dev(2) then
|
||||
self:BuildMultiSight() -- this is what was fixing toggle sights
|
||||
end
|
||||
-- if ARC9.Dev(2) then
|
||||
-- self:BuildMultiSight() -- this is what was fixing toggle sights
|
||||
-- end
|
||||
-- if !self.MultiSightTable and self:GetValue("Sights") then self:BuildMultiSight() end
|
||||
return self.MultiSightTable[self:GetMultiSight()] or self:GetValue("IronSights")
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user