diff --git a/src/client/Character/Client/Camera/Bobbing.lua b/src/client/Character/Client/Camera/Bobbing.lua index f688f69..ead177a 100644 --- a/src/client/Character/Client/Camera/Bobbing.lua +++ b/src/client/Character/Client/Camera/Bobbing.lua @@ -8,6 +8,7 @@ Bobbing.AnimationAlpha = 0.5 Bobbing.MaxGimbalLockY = 65 Bobbing.AnimationSpeed = 200 Bobbing.Tick = 0 +Bobbing.ForceStop = false type AnimationsMap = {[string]: (tick: number, dt: number) -> Euler} @@ -60,6 +61,10 @@ function Animations.Stop() return ANG(0,0,0) end +function Animations.Falling() + return ANG(0,0,0) +end + local function maxmin(min: number, mid: number, max: number): number return math.max(min, math.min(mid, max)) end @@ -70,13 +75,18 @@ local function Camera_YArc(Camera: Camera): EulerValue --stop Euler gimbal lock end local function CameraAnimation(self, dt: deltatime) + --crying Bobbing.Tick += 1 - local Root = self.HumanoidRootPart - local RootMagnitude = Root:GetVelocityAtPosition(Root.Position).Magnitude - local MaxMinY = Camera_YArc(self.CurrentCamera)>Bobbing.MaxGimbalLockY --TODO: instead, make this an equation so it will just subtract from the existing animation radians - local AnimationType = RootMagnitude>1 and "Walk" or (not MaxMinY and "Idle" or "Stop") - local CurrentAnimation = Animations[AnimationType](Bobbing.Tick, dt) + local Root: BasePart = self.HumanoidRootPart + local Velocity: Vector3 = Root:GetVelocityAtPosition(Root.Position) + local RootMagnitude: number = Velocity.Magnitude + + --go go boolean algebra + local MaxMinY: boolean = Camera_YArc(self.CurrentCamera)>Bobbing.MaxGimbalLockY --TODO: instead, make this an equation so it will just subtract from the existing animation radians + local ForceStop: boolean = Bobbing.ForceStop and "Stop" + local AnimationType: string = ForceStop or RootMagnitude>1 and "Walk" or (not MaxMinY and "Idle" or "Stop") + local CurrentAnimation: CFrame = Animations[AnimationType](Bobbing.Tick, dt) --"Lerp" so the transitions between walking and idling are smoothed instead of instant return Animation:Lerp(CurrentAnimation, Bobbing.AnimationAlpha) diff --git a/src/client/Player/CoreGuis.lua b/src/client/Player/CoreGuis.lua index cb76c56..f5e2324 100644 --- a/src/client/Player/CoreGuis.lua +++ b/src/client/Player/CoreGuis.lua @@ -1,7 +1,8 @@ local CoreGuis = { AllowReset = false, - AllowEmotes = false, --controversial - AllowBackpack = false + AllowEmotes = true, + AllowBackpack = false, + AllowPlayerList = false } CoreGuis.__index = CoreGuis diff --git a/src/client/Player/init.client.lua b/src/client/Player/init.client.lua index 5429f39..2b6454e 100644 --- a/src/client/Player/init.client.lua +++ b/src/client/Player/init.client.lua @@ -3,7 +3,6 @@ local CrosshairSettings = require(UI:WaitForChild("Crosshair")) local VignetteSettings = require(UI:WaitForChild("Vignette")) local CoreGuis = require(script:WaitForChild("CoreGuis")) local Mouse = require(script:WaitForChild("Mouse")) -local CameraSettings = require(script:WaitForChild("Camera")) local Players = game:GetService("Players") local Storage = game:GetService("ReplicatedStorage") @@ -11,6 +10,7 @@ local Storage = game:GetService("ReplicatedStorage") local ClientStorage = Storage:WaitForChild("Client") local LoadCompleted = ClientStorage:WaitForChild("LoadingComplete") local KeyBindsModule = require(ClientStorage:WaitForChild("KeyBinds")) +local CameraSettings = require(ClientStorage:WaitForChild("Camera")) local Player = Players.LocalPlayer local PlayerGui = Player:WaitForChild("PlayerGui")