@@ -397,7 +397,9 @@ class StageEditor extends UIState {
397397 char .extra .set (exID (" lowMemory" ), parent .name == " low-memory" );
398398
399399 chars .push (char );
400- stage .applyCharStuff (char , charPos .name , 0 );
400+ // stage.applyCharStuff(char, charPos.name, 0); it can grab characterPoses[char.curCharacter] which is REALLY BAD SINCE I DESTROY THEM
401+ charPos .prepareCharacter (char , 0 );
402+ insert (members .indexOf (charPos ), char );
401403 charMap [charName ] = char ;
402404
403405 remove (charPos , true );
@@ -583,14 +585,12 @@ class StageEditor extends UIState {
583585 stage .stageXML .x .addChild (node .x );
584586 node .att .name = " character_" + stageSpritesWindow .buttons .members .length ;
585587
586- var char = new Character (0 ,0 , " bf " , false , true );
588+ var char = new Character (0 ,0 , Flags . DEFAULT_OPPONENT , false , true );
587589 char .name = node .att .name ;
588590 char .debugMode = true ;
589- // Play first anim, and make it the last frame
591+ // Play first anim, and make it the last frame by reversing and stopping
590592 var animToPlay = char .getAnimOrder ()[0 ];
591- char .playAnim (animToPlay , true , NONE );
592- var lastIndx = char .animation .curAnim .numFrames - 1 ;
593- char .playAnim (animToPlay , true , NONE , false , lastIndx );
593+ char .playAnim (animToPlay , true , NONE , true , 0 );
594594 char .stopAnimation ();
595595
596596 // Add it to the stage
0 commit comments