From ce19a63225df3eba0135959f14e83ec4731b602f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=8D=9A=7ENex?= <87421482+NexIsDumb@users.noreply.github.com> Date: Thu, 27 Jun 2024 20:39:20 +0200 Subject: [PATCH] fixing two character offset bugs rq --- source/funkin/editors/character/CharacterEditor.hx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/source/funkin/editors/character/CharacterEditor.hx b/source/funkin/editors/character/CharacterEditor.hx index 10fa4efa6..95da49893 100644 --- a/source/funkin/editors/character/CharacterEditor.hx +++ b/source/funkin/editors/character/CharacterEditor.hx @@ -348,10 +348,6 @@ class CharacterEditor extends UIState { } function buildCharacter():String { - if (character.isPlayer != character.playerOffsets) { - character.switchOffset('singLEFT', 'singRIGHT'); - character.switchOffset('singLEFTmiss', 'singRIGHTmiss'); - } var charXML:Xml = character.buildXML([ for (button in characterAnimsWindow.buttons.members) button.anim @@ -588,6 +584,12 @@ class CharacterEditor extends UIState { function changeOffset(anim:String, change:FlxPoint, addtoUndo:Bool = true) { if (character.getNameList().length == 0) return; + var animData = character.animDatas.get(anim); + if (animData != null) { + animData.x += change.x; + animData.y += change.y; + } + character.animOffsets.set(anim, character.getAnimOffset(anim) + change); for (i in characterAnimsWindow.buttons.members) if (i.anim == anim)