Skip to content

Commit

Permalink
projectile adjustments
Browse files Browse the repository at this point in the history
bump up some of the network-sent maximum bit depths supporting up to 80s delay and +/- 160 bounce
  • Loading branch information
pingu7867 committed Sep 22, 2024
1 parent 7644e4f commit 04b4336
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions lua/pac3/core/client/parts/projectile.lua
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ BUILDER:StartStorableVars()
BUILDER:GetSet("AddOwnerSpeed", false)
BUILDER:GetSet("Spread", 0)
BUILDER:GetSet("NumberProjectiles", 1)
BUILDER:GetSet("Delay", 0)
BUILDER:GetSet("Delay", 0, {editor_clamp = {0,80}})
BUILDER:GetSet("Maximum", 0)
BUILDER:GetSet("RandomAngleVelocity", Vector(0,0,0))
BUILDER:GetSet("LocalAngleVelocity", Vector(0,0,0))
Expand All @@ -41,7 +41,7 @@ BUILDER:StartStorableVars()
BUILDER:GetSet("Collisions", true)
BUILDER:GetSet("Sphere", false)
BUILDER:GetSet("Radius", 1, {editor_panel = "projectile_radii"})
BUILDER:GetSet("Bounce", 0)
BUILDER:GetSet("Bounce", 0, {editor_clamp = {-160,160}})
BUILDER:GetSet("Sticky", false)
BUILDER:GetSet("CollideWithOwner", false)
BUILDER:GetSet("CollideWithSelf", false)
Expand Down Expand Up @@ -294,13 +294,13 @@ function PART:Shoot(pos, ang, multi_projectile_count)
net.WriteInt(1000*self.Speed,18)
net.WriteUInt(self.Maximum,7)
net.WriteUInt(100*self.LifeTime,14) --might need decimals
net.WriteUInt(100*self.Delay,9) --might need decimals
net.WriteUInt(100*self.Delay,13) --might need decimals
net.WriteUInt(self.Mass,16)
net.WriteInt(100*self.Spread,10)
net.WriteInt(100*self.Damping,20) --might need decimals
net.WriteInt(self.Attract,14)
net.WriteUInt(self.AttractRadius,10)
net.WriteInt(100*self.Bounce,8) --might need decimals
net.WriteInt(100*self.Bounce,15) --might need decimals

net.SendToServer()
else
Expand Down
4 changes: 2 additions & 2 deletions lua/pac3/extra/shared/projectiles.lua
Original file line number Diff line number Diff line change
Expand Up @@ -579,13 +579,13 @@ if SERVER then
part.Speed = math.Clamp(net.ReadInt(18) / 1000, -pac_sv_projectile_max_speed:GetFloat(), pac_sv_projectile_max_speed:GetFloat())
part.Maximum = net.ReadUInt(7)
part.LifeTime = net.ReadUInt(14) / 100
part.Delay = net.ReadUInt(9) / 100
part.Delay = net.ReadUInt(13) / 100
part.Mass = net.ReadUInt(16)
part.Spread = net.ReadInt(10) / 100
part.Damping = net.ReadInt(20) / 100
part.Attract = net.ReadInt(14)
part.AttractRadius = net.ReadUInt(10)
part.Bounce = net.ReadInt(8) / 100
part.Bounce = net.ReadInt(15) / 100

local radius_limit = 2000

Expand Down

0 comments on commit 04b4336

Please sign in to comment.