Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions lua/pac3/core/client/base_part.lua
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ function PART:PreInitialize()
self.hide_disturbing = false
self.active_events = {}
self.active_events_ref_count = 0
local cvarName = "pac_enable_" .. string.Replace(self.ClassName, " ", "_"):lower()
if not GetConVar(cvarName):GetBool() then self:SetWarning("This part class is disabled! Enable it with " .. cvarName .. " 1") end
end

function PART:Initialize() end
Expand Down
5 changes: 3 additions & 2 deletions lua/pac3/core/client/parts.lua
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,10 @@ function pac.RegisterPart(META)
assert(istable(META.StorableVars), "Part " .. META.ClassName .. " has no StorableVars")

do
local cvar = CreateClientConVar("pac_enable_" .. META.ClassName, "1", true)
local cvarName = "pac_enable_" .. string.Replace(META.ClassName, " ", "_"):lower()
local cvar = CreateClientConVar(cvarName, "1", true)

cvars.AddChangeCallback("pac_enable_" .. META.ClassName, function(name, old, new)
cvars.AddChangeCallback(cvarName, function(name, old, new)
local enable = tobool(new)
META.GloballyEnabled = enable
if enable then
Expand Down
6 changes: 4 additions & 2 deletions lua/pac3/editor/client/tools.lua
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ pace.AddTool(L"Convert group of models to Expression 2 holograms", function(part
local str_ref =
[[

I++, HN++, HT[HN,table] = table(I, Base, Base, 0, POSITION, ANGLES, SCALE, MODEL, MATERIAL, vec4(COLOR, ALPHA), SKIN)
I++, HN++, HT[HN,table] = table(I, Base, Base, 0, POSITION, ANGLES, SCALE, MODEL, MATERIAL, vec4(COLOR, ALPHA), SKIN, INVERT)
]]

local str_header =
Expand All @@ -513,7 +513,7 @@ if (first() | dupefinished()) {
Indices = 1

#- Data structure
#- HN++, HT[HN, table] = table(Index, Local Entity (Entity:toWorld()), Parent Entity, ScaleType (Default 0), Pos, Ang, Scale, Model, Material, Color, Skin)
#- HN++, HT[HN, table] = table(Index, Local Entity (Entity:toWorld()), Parent Entity, ScaleType (Default 0), Pos, Ang, Scale, Model, Material, Color, Skin, Invert)
#- CN++, CT[CN, table] = table(Index, Clip Index, Pos, Ang)

#- Editing holograms
Expand Down Expand Up @@ -556,6 +556,7 @@ if (first() | dupefinished()) {
holoMaterial(Index, This[9, string])
holoColor(Index, This[10, vector4])
holoSkin(Index, This[11, number])
holoInvertModel(Index, This[12, number])
}

if (ToggleShading) { holoDisableShading(Index, 1) }
Expand Down Expand Up @@ -675,6 +676,7 @@ elseif (CoreStatus == "RunThisCode") {
MATERIAL = ("%q"):format(part:GetMaterial()),
MODEL = ("%q"):format(part:GetModel()),
SKIN = part.GetSkin and part:GetSkin() or "0",
INVERT = part:GetInvert() and "1" or "0",
PARENT = "entity()"
})

Expand Down
8 changes: 4 additions & 4 deletions lua/pac3/editor/client/wires.lua
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@

local function CubicHermite(p0, p1, m0, m1, t)
local tS = t*t;

Check warning on line 3 in lua/pac3/editor/client/wires.lua

View workflow job for this annotation

GitHub Actions / lint

"Whitespace style"

Style: Please put some whitespace before the operator
local tC = tS*t;

Check warning on line 4 in lua/pac3/editor/client/wires.lua

View workflow job for this annotation

GitHub Actions / lint

"Whitespace style"

Style: Please put some whitespace before the operator

return (2*tC - 3*tS + 1)*p0 + (tC - 2*tS + t)*m0 + (-2*tC + 3*tS)*p1 + (tC - tS)*m1

Check warning on line 6 in lua/pac3/editor/client/wires.lua

View workflow job for this annotation

GitHub Actions / lint

"Whitespace style"

Style: Please put some whitespace before the operator

Check warning on line 6 in lua/pac3/editor/client/wires.lua

View workflow job for this annotation

GitHub Actions / lint

"Whitespace style"

Style: Please put some whitespace before the operator

Check warning on line 6 in lua/pac3/editor/client/wires.lua

View workflow job for this annotation

GitHub Actions / lint

"Whitespace style"

Style: Please put some whitespace after ')'

Check warning on line 6 in lua/pac3/editor/client/wires.lua

View workflow job for this annotation

GitHub Actions / lint

"Whitespace style"

Style: Please put some whitespace before the operator

Check warning on line 6 in lua/pac3/editor/client/wires.lua

View workflow job for this annotation

GitHub Actions / lint

"Whitespace style"

Style: Please put some whitespace after ')'

Check warning on line 6 in lua/pac3/editor/client/wires.lua

View workflow job for this annotation

GitHub Actions / lint

"Whitespace style"

Style: Please put some whitespace before the operator

Check warning on line 6 in lua/pac3/editor/client/wires.lua

View workflow job for this annotation

GitHub Actions / lint

"Whitespace style"

Style: Please put some whitespace before the operator
end

local vsamples = {}
Expand All @@ -16,18 +16,18 @@
local math_cos = math.cos
local math_pi = math.pi

local black = Color(0,0,0,100)
local vector_add = Vector(0, 2.5, 0)

local mtVector = FindMetaTable("Vector")
local mtColor = FindMetaTable("Color")
local mtColor = getmetatable(black)
local render_startBeam = render.StartBeam
local render_endBeam = render.EndBeam
local render_addBeam = render.AddBeam
local setVecUnpacked = mtVector.SetUnpacked
local setColUnpacked = mtColor.SetUnpacked
local colUnpack = mtColor.Unpack

local black = Color(0,0,0,100)
local vector_add = Vector(0, 2.5, 0)

local function DrawHermite(width, x0,y0,x1,y1,c0,c1,alpha,samples)

--[[if x0 < 0 and x1 < 0 then return end
Expand Down
2 changes: 2 additions & 0 deletions lua/pac3/extra/client/wire_expression_extension.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

local function SetKeyValue(ply, ent, unique_id, key, val)
local set = "Set" .. key

Check warning on line 11 in lua/pac3/extra/client/wire_expression_extension.lua

View workflow job for this annotation

GitHub Actions / lint

"Trailing whitespace"

Trailing whitespace
if ent == game.GetWorld() then ent = pac.WorldEntity end

local part = pac.GetPartFromUniqueID(pac.Hash(ply), unique_id)
if not IsValid( part ) then return end
Expand Down
Binary file removed models/pac/default.dx80.vtx
Binary file not shown.
Binary file removed models/pac/default.sw.vtx
Binary file not shown.
Binary file removed models/pac/female/base_female.dx80.vtx
Binary file not shown.
Binary file removed models/pac/female/base_female.sw.vtx
Binary file not shown.
Binary file removed models/pac/female/base_female_arm_l.dx80.vtx
Binary file not shown.
Binary file removed models/pac/female/base_female_arm_l.sw.vtx
Binary file not shown.
Binary file removed models/pac/female/base_female_arm_r.dx80.vtx
Binary file not shown.
Binary file removed models/pac/female/base_female_arm_r.sw.vtx
Binary file not shown.
Binary file removed models/pac/female/base_female_jiggle.dx80.vtx
Binary file not shown.
Binary file removed models/pac/female/base_female_jiggle.sw.vtx
Binary file not shown.
Binary file removed models/pac/female/base_female_leg_l.dx80.vtx
Binary file not shown.
Binary file removed models/pac/female/base_female_leg_l.sw.vtx
Binary file not shown.
Binary file removed models/pac/female/base_female_leg_r.dx80.vtx
Binary file not shown.
Binary file removed models/pac/female/base_female_leg_r.sw.vtx
Binary file not shown.
Binary file removed models/pac/female/base_female_torso.dx80.vtx
Binary file not shown.
Binary file removed models/pac/female/base_female_torso.sw.vtx
Binary file not shown.
Binary file removed models/pac/female/base_female_torso_jiggle.dx80.vtx
Binary file not shown.
Binary file removed models/pac/female/base_female_torso_jiggle.sw.vtx
Binary file not shown.
Binary file removed models/pac/female_base.dx80.vtx
Binary file not shown.
Binary file removed models/pac/female_base.sw.vtx
Binary file not shown.
Binary file removed models/pac/jiggle/base_cloth_0.dx80.vtx
Binary file not shown.
Binary file removed models/pac/jiggle/base_cloth_0.sw.vtx
Binary file not shown.
Binary file removed models/pac/jiggle/base_cloth_0_gravity.dx80.vtx
Binary file not shown.
Binary file removed models/pac/jiggle/base_cloth_0_gravity.sw.vtx
Binary file not shown.
Binary file removed models/pac/jiggle/base_cloth_1.dx80.vtx
Binary file not shown.
Binary file removed models/pac/jiggle/base_cloth_1.sw.vtx
Binary file not shown.
Binary file removed models/pac/jiggle/base_cloth_1_gravity.dx80.vtx
Binary file not shown.
Binary file removed models/pac/jiggle/base_cloth_1_gravity.sw.vtx
Binary file not shown.
Binary file removed models/pac/jiggle/base_cloth_2.dx80.vtx
Binary file not shown.
Binary file removed models/pac/jiggle/base_cloth_2.sw.vtx
Binary file not shown.
Binary file removed models/pac/jiggle/base_cloth_2_gravity.dx80.vtx
Binary file not shown.
Binary file removed models/pac/jiggle/base_cloth_2_gravity.sw.vtx
Binary file not shown.
Binary file removed models/pac/jiggle/base_cloth_3.dx80.vtx
Binary file not shown.
Binary file removed models/pac/jiggle/base_cloth_3.sw.vtx
Binary file not shown.
Binary file removed models/pac/jiggle/base_cloth_3_gravity.dx80.vtx
Binary file not shown.
Binary file removed models/pac/jiggle/base_cloth_3_gravity.sw.vtx
Binary file not shown.
Binary file removed models/pac/jiggle/base_cloth_4.dx80.vtx
Binary file not shown.
Binary file removed models/pac/jiggle/base_cloth_4.sw.vtx
Binary file not shown.
Binary file removed models/pac/jiggle/base_cloth_4_gravity.dx80.vtx
Binary file not shown.
Binary file removed models/pac/jiggle/base_cloth_4_gravity.sw.vtx
Binary file not shown.
Binary file removed models/pac/jiggle/base_cloth_5.dx80.vtx
Binary file not shown.
Binary file removed models/pac/jiggle/base_cloth_5.sw.vtx
Binary file not shown.
Binary file removed models/pac/jiggle/base_cloth_5_gravity.dx80.vtx
Binary file not shown.
Binary file removed models/pac/jiggle/base_cloth_5_gravity.sw.vtx
Binary file not shown.
Binary file removed models/pac/jiggle/base_jiggle_0.dx80.vtx
Binary file not shown.
Binary file removed models/pac/jiggle/base_jiggle_0.sw.vtx
Binary file not shown.
Binary file removed models/pac/jiggle/base_jiggle_0_gravity.dx80.vtx
Binary file not shown.
Binary file removed models/pac/jiggle/base_jiggle_0_gravity.sw.vtx
Binary file not shown.
Binary file removed models/pac/jiggle/base_jiggle_1.dx80.vtx
Binary file not shown.
Binary file removed models/pac/jiggle/base_jiggle_1.sw.vtx
Binary file not shown.
Binary file removed models/pac/jiggle/base_jiggle_1_gravity.dx80.vtx
Binary file not shown.
Binary file removed models/pac/jiggle/base_jiggle_1_gravity.sw.vtx
Binary file not shown.
Binary file removed models/pac/jiggle/base_jiggle_2.dx80.vtx
Binary file not shown.
Binary file removed models/pac/jiggle/base_jiggle_2.sw.vtx
Binary file not shown.
Binary file removed models/pac/jiggle/base_jiggle_2_gravity.dx80.vtx
Binary file not shown.
Binary file removed models/pac/jiggle/base_jiggle_2_gravity.sw.vtx
Binary file not shown.
Binary file removed models/pac/jiggle/base_jiggle_3.dx80.vtx
Binary file not shown.
Binary file removed models/pac/jiggle/base_jiggle_3.sw.vtx
Binary file not shown.
Binary file removed models/pac/jiggle/base_jiggle_3_gravity.dx80.vtx
Binary file not shown.
Binary file removed models/pac/jiggle/base_jiggle_3_gravity.sw.vtx
Binary file not shown.
Binary file removed models/pac/jiggle/base_jiggle_4.dx80.vtx
Binary file not shown.
Binary file removed models/pac/jiggle/base_jiggle_4.sw.vtx
Binary file not shown.
Binary file removed models/pac/jiggle/base_jiggle_4_gravity.dx80.vtx
Binary file not shown.
Binary file removed models/pac/jiggle/base_jiggle_4_gravity.sw.vtx
Binary file not shown.
Binary file removed models/pac/jiggle/base_jiggle_5.dx80.vtx
Binary file not shown.
Binary file removed models/pac/jiggle/base_jiggle_5.sw.vtx
Binary file not shown.
Binary file removed models/pac/jiggle/base_jiggle_5_gravity.dx80.vtx
Binary file not shown.
Binary file removed models/pac/jiggle/base_jiggle_5_gravity.sw.vtx
Binary file not shown.
Binary file removed models/pac/jiggle/clothing/base_cape_1.dx80.vtx
Binary file not shown.
Binary file removed models/pac/jiggle/clothing/base_cape_1.sw.vtx
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed models/pac/jiggle/clothing/base_cape_2.dx80.vtx
Binary file not shown.
Binary file removed models/pac/jiggle/clothing/base_cape_2.sw.vtx
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed models/pac/jiggle/clothing/base_trench_1.dx80.vtx
Binary file not shown.
Binary file removed models/pac/jiggle/clothing/base_trench_1.sw.vtx
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed models/pac/male/base_male.dx80.vtx
Binary file not shown.
Binary file removed models/pac/male/base_male.sw.vtx
Binary file not shown.
Binary file removed models/pac/male/base_male_arm_l.dx80.vtx
Binary file not shown.
Binary file removed models/pac/male/base_male_arm_l.sw.vtx
Binary file not shown.
Binary file removed models/pac/male/base_male_arm_r.dx80.vtx
Binary file not shown.
Binary file removed models/pac/male/base_male_arm_r.sw.vtx
Binary file not shown.
Binary file removed models/pac/male/base_male_leg_l.dx80.vtx
Binary file not shown.
Binary file removed models/pac/male/base_male_leg_l.sw.vtx
Binary file not shown.
Binary file removed models/pac/male/base_male_leg_r.dx80.vtx
Binary file not shown.
Binary file removed models/pac/male/base_male_leg_r.sw.vtx
Binary file not shown.
Binary file removed models/pac/male/base_male_torso.dx80.vtx
Binary file not shown.
Binary file removed models/pac/male/base_male_torso.sw.vtx
Binary file not shown.
Loading