Skip to content

Commit

Permalink
Clamp Wheel Model tool scale
Browse files Browse the repository at this point in the history
  • Loading branch information
StyledStrike committed Dec 27, 2024
1 parent 8b88134 commit 78c5612
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lua/weapons/gmod_tool/stools/glide_wheel_model.lua
Original file line number Diff line number Diff line change
Expand Up @@ -121,15 +121,15 @@ function TOOL:LeftClick( trace )
local rearModel = self:GetClientInfo( "rear" )

local frontScale = Vector(
self:GetClientNumber( "front_scale_x", 1 ),
self:GetClientNumber( "front_scale_y", 1 ),
self:GetClientNumber( "front_scale_z", 1 )
math.Clamp( self:GetClientNumber( "front_scale_x", 1 ), 0.1, 5 ),
math.Clamp( self:GetClientNumber( "front_scale_y", 1 ), 0.1, 5 ),
math.Clamp( self:GetClientNumber( "front_scale_z", 1 ), 0.1, 5 )
)

local rearScale = Vector(
self:GetClientNumber( "rear_scale_x", 1 ),
self:GetClientNumber( "rear_scale_y", 1 ),
self:GetClientNumber( "rear_scale_z", 1 )
math.Clamp( self:GetClientNumber( "rear_scale_x", 1 ), 0.1, 5 ),
math.Clamp( self:GetClientNumber( "rear_scale_y", 1 ), 0.1, 5 ),
math.Clamp( self:GetClientNumber( "rear_scale_z", 1 ), 0.1, 5 )
)

self:ApplyModifications( frontWheels, frontModel, frontScale )
Expand Down

0 comments on commit 78c5612

Please sign in to comment.