From 78c561215a58d42ad30a468ebf7a0f390efbce18 Mon Sep 17 00:00:00 2001 From: StyledStrike Date: Thu, 26 Dec 2024 21:37:45 -0300 Subject: [PATCH] Clamp Wheel Model tool scale --- lua/weapons/gmod_tool/stools/glide_wheel_model.lua | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lua/weapons/gmod_tool/stools/glide_wheel_model.lua b/lua/weapons/gmod_tool/stools/glide_wheel_model.lua index 1675535..4049980 100644 --- a/lua/weapons/gmod_tool/stools/glide_wheel_model.lua +++ b/lua/weapons/gmod_tool/stools/glide_wheel_model.lua @@ -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 )