Added charms base material

This commit is contained in:
Haodong Mo 2020-10-14 17:53:43 +10:00
parent 7dfdcbbf01
commit 86c9198eeb
11 changed files with 37 additions and 54 deletions

View File

@ -1,15 +1,6 @@
local srf = surface local srf = surface
local og_ScreenScale = ScreenScale
local ScreenScale_Cache = {}
local function ScreenScale(a)
if ScreenScale_Cache[a] then return ScreenScale_Cache[a] end
ScreenScale_Cache[a] = og_ScreenScale(a)
return ScreenScale_Cache[a]
end
local function ScreenScaleMulti(input) local function ScreenScaleMulti(input)
return ScreenScale(input) * GetConVar("arccw_hud_size"):GetFloat() return ScreenScale(input) * GetConVar("arccw_hud_size"):GetFloat()

View File

@ -111,6 +111,17 @@ local function generatefonts()
end end
local og_ScreenScale = ScreenScale
local ScreenScale_Cache = {}
function ScreenScale(a)
if ScreenScale_Cache[a] then return ScreenScale_Cache[a] end
ScreenScale_Cache[a] = og_ScreenScale(a)
return ScreenScale_Cache[a]
end
generatefonts() generatefonts()
language.Add("SniperPenetratedRound_ammo", "Sniper Ammo") language.Add("SniperPenetratedRound_ammo", "Sniper Ammo")
@ -121,6 +132,7 @@ local lastScrW = ScrW()
hook.Add("HUDPaint", "ArcCW_FontRegen", function() hook.Add("HUDPaint", "ArcCW_FontRegen", function()
if (lastScrH != ScrH()) or (lastScrW != ScrW()) then if (lastScrH != ScrH()) or (lastScrW != ScrW()) then
generatefonts() generatefonts()
ScreenScale_Cache = {}
end end
lastScrH = ScrH() lastScrH = ScrH()

View File

@ -51,6 +51,20 @@ concommand.Add("arccw_listvmanims", function()
PrintTable(vm:GetSequenceList()) PrintTable(vm:GetSequenceList())
end) end)
concommand.Add("arccw_listvmbones", function()
local wep = LocalPlayer():GetActiveWeapon()
if !wep then return end
local vm = LocalPlayer():GetViewModel()
if !vm then return end
for i = 0, (vm:GetBoneCount() - 1) do
print(vm:GetBoneName(i))
end
end)
net.Receive("arccw_sp_loadautosave", function(len, ply) net.Receive("arccw_sp_loadautosave", function(len, ply)
local wep = LocalPlayer():GetActiveWeapon() local wep = LocalPlayer():GetActiveWeapon()

View File

@ -1,15 +1,6 @@
if engine.ActiveGamemode() != "terrortown" then return end if engine.ActiveGamemode() != "terrortown" then return end
local og_ScreenScale = ScreenScale
local ScreenScale_Cache = {}
local function ScreenScale(a)
if ScreenScale_Cache[a] then return ScreenScale_Cache[a] end
ScreenScale_Cache[a] = og_ScreenScale(a)
return ScreenScale_Cache[a]
end
CreateClientConVar("arccw_ttt_inforoundstart", "1", true, false, "Whether to show ArcCW config every round.") CreateClientConVar("arccw_ttt_inforoundstart", "1", true, false, "Whether to show ArcCW config every round.")
CreateClientConVar("arccw_ttt_rolecrosshair", "1", true, false, "Whether to color your crosshair according to your role.") CreateClientConVar("arccw_ttt_rolecrosshair", "1", true, false, "Whether to color your crosshair according to your role.")

View File

@ -11,16 +11,7 @@ ArcCW.IncompatibleAddons = {
-- ["1429489453"] = "Causes issues with arms." -- bio annihilation extended sninctbur -- ["1429489453"] = "Causes issues with arms." -- bio annihilation extended sninctbur
} }
local og_ScreenScale = ScreenScale
local ScreenScale_Cache = {}
local function ScreenScale(a)
if ScreenScale_Cache[a] then return ScreenScale_Cache[a] end
ScreenScale_Cache[a] = og_ScreenScale(a)
return ScreenScale_Cache[a]
end
local function ScreenScaleMulti(input) local function ScreenScaleMulti(input)
return ScreenScale(input) * GetConVar("arccw_hud_size"):GetFloat() return ScreenScale(input) * GetConVar("arccw_hud_size"):GetFloat()

View File

@ -4,16 +4,7 @@ local cw = nil
local clump_inner = Material("hud/clump_inner.png", "mips smooth") local clump_inner = Material("hud/clump_inner.png", "mips smooth")
local clump_outer = Material("hud/clump_outer.png", "mips smooth") local clump_outer = Material("hud/clump_outer.png", "mips smooth")
local og_ScreenScale = ScreenScale
local ScreenScale_Cache = {}
local function ScreenScale(a)
if ScreenScale_Cache[a] then return ScreenScale_Cache[a] end
ScreenScale_Cache[a] = og_ScreenScale(a)
return ScreenScale_Cache[a]
end
function SWEP:ShouldDrawCrosshair() function SWEP:ShouldDrawCrosshair()
if GetConVar("arccw_override_crosshair_off"):GetBool() then return false end if GetConVar("arccw_override_crosshair_off"):GetBool() then return false end

View File

@ -1,13 +1,4 @@
local og_ScreenScale = ScreenScale
local ScreenScale_Cache = {}
local function ScreenScale(a)
if ScreenScale_Cache[a] then return ScreenScale_Cache[a] end
ScreenScale_Cache[a] = og_ScreenScale(a)
return ScreenScale_Cache[a]
end
local function ScreenScaleMulti(input) local function ScreenScaleMulti(input)
return ScreenScale(input) * GetConVar("arccw_hud_size"):GetFloat() return ScreenScale(input) * GetConVar("arccw_hud_size"):GetFloat()

View File

@ -1,16 +1,7 @@
-- atts are comma separated -- atts are comma separated
-- optic_mrs,,,perk_quickdraw,ammo_match -- optic_mrs,,,perk_quickdraw,ammo_match
local og_ScreenScale = ScreenScale
local ScreenScale_Cache = {}
local function ScreenScale(a)
if ScreenScale_Cache[a] then return ScreenScale_Cache[a] end
ScreenScale_Cache[a] = og_ScreenScale(a)
return ScreenScale_Cache[a]
end
local function ScreenScaleMulti(input) local function ScreenScaleMulti(input)
return ScreenScale(input) * GetConVar("arccw_hud_size"):GetFloat() return ScreenScale(input) * GetConVar("arccw_hud_size"):GetFloat()

View File

@ -0,0 +1,11 @@
"VertexLitGeneric"
{
"$basetexture" "models\drgordon\weapons\akt\akt_74s"
"$bumpmap" "models\drgordon\weapons\akt\akt_74s_n"
"$phong" "1"
"$phongexponent" "4"
"$phongalbedotint" "1"
"$phongboost" "0.4"
"$phongfresnelranges" "[1 1 1]"
}

Binary file not shown.

Binary file not shown.