mirror of
https://github.com/CapsAdmin/pac3.git
synced 2025-03-04 03:03:01 -05:00
Trim trailing whitespaces
This commit is contained in:
parent
ed7dc55d67
commit
9d56c2d8ec
@ -16,7 +16,7 @@ AnimStack = {
|
||||
local top = self:getTop()
|
||||
if top ~= part then
|
||||
if top then top:OnStackStop() end
|
||||
|
||||
|
||||
-- Remove self from stack to move to end and also prevent things from breaking because table.RemoveByValue() only removes the first instance
|
||||
table.RemoveByValue(stack, part)
|
||||
table.insert(stack, part)
|
||||
@ -28,7 +28,7 @@ AnimStack = {
|
||||
pop = function(self, part)
|
||||
part:OnStackStop()
|
||||
local stack = self.stack
|
||||
|
||||
|
||||
-- Remove self from animation stack
|
||||
if table.RemoveByValue(stack, part) == #stack + 1 then
|
||||
-- This was the current animation so play the next in the stack
|
||||
|
@ -200,7 +200,7 @@ end
|
||||
|
||||
function PART:OnDraw()
|
||||
local part = self.EndPoint
|
||||
|
||||
|
||||
if self.Materialm and self.StartColorC and self.EndColorC and part:IsValid() and part.GetWorldPosition then
|
||||
local pos, ang = self:GetDrawPosition()
|
||||
render.SetMaterial(self.Materialm)
|
||||
|
@ -35,12 +35,12 @@ BUILDER:StartStorableVars()
|
||||
BUILDER:EndStorableVars()
|
||||
|
||||
function PART:SetEvent(event)
|
||||
local reset = (self.Arguments == "") or
|
||||
local reset = (self.Arguments == "") or
|
||||
(self.Arguments ~= "" and self.Event ~= "" and self.Event ~= event)
|
||||
|
||||
self.Event = event
|
||||
self:SetWarning()
|
||||
self:GetDynamicProperties(reset)
|
||||
self:GetDynamicProperties(reset)
|
||||
end
|
||||
|
||||
local function get_default(typ)
|
||||
@ -95,8 +95,8 @@ function PART:GetDynamicProperties(reset_to_default)
|
||||
}
|
||||
|
||||
local arg = tbl[key]
|
||||
if arg.get() == nil or reset_to_default then
|
||||
if udata.default then
|
||||
if arg.get() == nil or reset_to_default then
|
||||
if udata.default then
|
||||
arg.set(udata.default)
|
||||
else
|
||||
arg.set(nil)
|
||||
@ -824,8 +824,8 @@ PART.OldEvents = {
|
||||
command = {
|
||||
arguments = {{find = "string"}, {time = "number"}, {hide_in_eventwheel = "boolean"}},
|
||||
userdata = {
|
||||
{default = "change_me", editor_friendly = "CommandName"},
|
||||
{default = 0.1, editor_friendly = "EventDuration"},
|
||||
{default = "change_me", editor_friendly = "CommandName"},
|
||||
{default = 0.1, editor_friendly = "EventDuration"},
|
||||
{default = false, group = "event wheel", editor_friendly = "HideInEventWheel"}
|
||||
},
|
||||
nice = function(self, ent, find, time)
|
||||
|
@ -185,9 +185,9 @@ function PART:PlaySound(osnd, ovol)
|
||||
if #sounds > 1 then
|
||||
if self.Sequential then
|
||||
self.seq_index = self.seq_index or 1
|
||||
|
||||
|
||||
snd = sounds[self.seq_index]
|
||||
|
||||
|
||||
self.seq_index = self.seq_index + self.SequentialStep
|
||||
self.seq_index = self.seq_index % (#sounds+1)
|
||||
if self.seq_index == 0 then self.seq_index = 1 end
|
||||
@ -212,7 +212,7 @@ function PART:PlaySound(osnd, ovol)
|
||||
"(%[%d-,%d-%])",self.seq_index
|
||||
)
|
||||
self.seq_index = self.seq_index + self.SequentialStep
|
||||
|
||||
|
||||
local span = minmaxpath(self.Sound,"max") - minmaxpath(self.Sound,"min") + 1
|
||||
if self.seq_index > minmaxpath(self.Sound,"max") then
|
||||
self.seq_index = self.seq_index - span
|
||||
|
@ -168,11 +168,11 @@ function PART:OnShow()
|
||||
end
|
||||
end
|
||||
|
||||
if not self.real_model then
|
||||
self.real_model = ent:GetModel()
|
||||
if not self.real_model then
|
||||
self.real_model = ent:GetModel()
|
||||
end
|
||||
|
||||
if not (self.old_model == self:GetModel()) or
|
||||
if not (self.old_model == self:GetModel()) or
|
||||
(pac.LocalHands:IsValid() and ent == pac.LocalHands
|
||||
and not (self.real_model == pac.LocalHands:GetModel())) then
|
||||
self.old_model = self:GetModel()
|
||||
|
@ -356,7 +356,7 @@ function PART:EmitParticles(pos, ang, real_ang)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
self.NextShot = pac.RealTime + self.FireDelay
|
||||
end
|
||||
self.FirstShot = false
|
||||
|
@ -307,7 +307,7 @@ PART.Inputs.random_once = function(self, seed, min, max)
|
||||
self.rand_id = self.rand_id or {}
|
||||
if seed then
|
||||
self.rand_id[seed] = self.rand_id[seed] or min + math.random()*(max-min)
|
||||
else
|
||||
else
|
||||
self.rand = self.rand or min + math.random()*(max-min)
|
||||
end
|
||||
|
||||
|
@ -8,7 +8,7 @@ util.AddNetworkString("pac3_test_suite_backdoor")
|
||||
net.Receive("pac3_test_suite_backdoor", function(len, ply)
|
||||
-- needs to be enabled through lua first, eg lua_run pac.test_suite_backdoor_enabled = true
|
||||
if not pac.test_suite_backdoor_enabled then return end
|
||||
|
||||
|
||||
-- need to be at least super admin
|
||||
if not ply:IsSuperAdmin() then return end
|
||||
|
||||
|
@ -4,11 +4,11 @@ if game.SinglePlayer() then
|
||||
util.AddNetworkString('pac_footstep')
|
||||
util.AddNetworkString('pac_footstep_request_state_update')
|
||||
util.AddNetworkString('pac_signal_mute_footstep')
|
||||
|
||||
|
||||
hook.Add("PlayerFootstep", "footstep_fix", function(ply, pos, _, snd, vol)
|
||||
net.Start("pac_footstep_request_state_update")
|
||||
net.Send(ply)
|
||||
|
||||
|
||||
net.Start("pac_footstep")
|
||||
net.WriteEntity(ply)
|
||||
net.WriteVector(pos)
|
||||
@ -16,7 +16,7 @@ if game.SinglePlayer() then
|
||||
net.WriteFloat(vol)
|
||||
net.Broadcast()
|
||||
end)
|
||||
|
||||
|
||||
net.Receive("pac_signal_mute_footstep", function(len,ply)
|
||||
local b = net.ReadBool()
|
||||
ply.pac_mute_footsteps = b
|
||||
@ -26,8 +26,8 @@ if game.SinglePlayer() then
|
||||
end)
|
||||
else hook.Remove("PlayerFootstep", "pac_footstep_silence") end
|
||||
end)
|
||||
|
||||
|
||||
|
||||
|
||||
end
|
||||
|
||||
if CLIENT then
|
||||
|
@ -2555,7 +2555,7 @@ pace.example_outfits["southpark"] = {
|
||||
["Duplicate"] = false,
|
||||
["ClassName"] = "group",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
|
@ -746,7 +746,7 @@ do -- event is_touching
|
||||
mins = mins,
|
||||
filter = ent
|
||||
} )
|
||||
|
||||
|
||||
if self.udata then
|
||||
render.DrawWireframeBox( startpos, Angle( 0, 0, 0 ), mins, maxs, tr.Hit and Color(255,0,0) or Color(255,255,255), true )
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user