From 3997eb51ad353973192e7ad1249bb9ec3dd18206 Mon Sep 17 00:00:00 2001 From: Frakist <90983918+Frakist@users.noreply.github.com> Date: Sun, 5 Nov 2023 14:08:54 +0200 Subject: [PATCH] add ability to position custom characters in stage --- source/funkin/game/Stage.hx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/source/funkin/game/Stage.hx b/source/funkin/game/Stage.hx index f8c5f0ce..bd54b1aa 100644 --- a/source/funkin/game/Stage.hx +++ b/source/funkin/game/Stage.hx @@ -123,7 +123,7 @@ class Stage extends FlxBasic implements IBeatReceiver { scroll: 1, flip: false }); - case "character": + case "character" | "char": if (!node.has.name) continue; addCharPos(node.att.name, node); case "ratings" | "combo": @@ -224,8 +224,14 @@ class Stage extends FlxBasic implements IBeatReceiver { return characterPoses[posName] != null ? characterPoses[posName].flipX : def; public function applyCharStuff(char:Character, posName:String, id:Float = 0) { - if (characterPoses[posName] == null) + if (characterPoses[posName] == null) { + if (characterPoses[char.curCharacter] != null) { + var charPos = characterPoses[char.curCharacter]; + charPos.prepareCharacter(char, id); + state.insert(state.members.indexOf(charPos), char); + } state.add(char); + } else { var charPos = characterPoses[posName]; charPos.prepareCharacter(char, id);