Fix rescaling

This commit is contained in:
Max 2023-07-12 15:35:04 -05:00
parent 0e76b4f551
commit 6db8fdd311

View file

@ -379,6 +379,7 @@ local lastUpdate = os.clock()
local lastAngle: Vector3int16? local lastAngle: Vector3int16?
local mario: Mario = Mario.new() local mario: Mario = Mario.new()
local activeScale = 1
local subframe = 0 -- 30hz subframe local subframe = 0 -- 30hz subframe
local emptyId = "" local emptyId = ""
@ -460,10 +461,16 @@ local function update()
local now = os.clock() local now = os.clock()
local gfxRot = CFrame.identity local gfxRot = CFrame.identity
local scale = character:GetScale() local scale = character:GetScale()
if scale ~= activeScale then
local marioPos = Util.ToRoblox(mario.Position)
Util.Scale = scale / 20 -- HACK! Should this be instanced? Util.Scale = scale / 20 -- HACK! Should this be instanced?
mario.Position = Util.ToSM64(marioPos)
activeScale = scale
end
-- Disabled for now because this causes parallel universes to break. -- Disabled for now because this causes parallel universes to break.
-- TODO: Find a better way to do two-way syncing between these values. -- TODO: Find a better way to do two-way syncing between these values.