fixes
This commit is contained in:
@@ -30,6 +30,7 @@ using StringTools;
|
||||
|
||||
@:allow(funkin.desktop.editors.CharacterEditor)
|
||||
@:allow(funkin.game.StrumLine)
|
||||
@:allow(funkin.game.PlayState)
|
||||
class Character extends FunkinSprite implements IBeatReceiver implements IOffsetCompatible
|
||||
{
|
||||
private var __stunnedTime:Float = 0;
|
||||
|
||||
@@ -590,11 +590,10 @@ class PlayState extends MusicBeatState
|
||||
var strOffset:Float = strumLine.strumLinePos == null ? (strumLine.opponent ? 0.25 : 0.75) : strumLine.strumLinePos;
|
||||
var strLine = new StrumLine(chars, strOffset, !coopMode && (strumLine.opponent != opponentMode), strumLine.opponent, coopMode ? (strumLine.opponent ? controlsP2 : controlsP1) : controls);
|
||||
strLine.cameras = [camHUD];
|
||||
strLine.data = strumLine;
|
||||
players.push(strLine);
|
||||
if (strumLine.visible != false)
|
||||
add(strLine);
|
||||
|
||||
strLine.generate(strumLine);
|
||||
}
|
||||
|
||||
splashHandler = new SplashHandler();
|
||||
@@ -606,6 +605,9 @@ class PlayState extends MusicBeatState
|
||||
|
||||
// CAMERA & HUD INITIALISATION
|
||||
#if REGION
|
||||
for(str in players)
|
||||
str.generate(str.data);
|
||||
|
||||
camFollow = new FlxObject(0, 0, 2, 2);
|
||||
camFollow.setPosition(camPos.x, camPos.y);
|
||||
add(camFollow);
|
||||
@@ -1304,6 +1306,9 @@ class PlayState extends MusicBeatState
|
||||
|
||||
var notePerStrum = [for(_ in 0...4) null];
|
||||
if (__justPressed.contains(true)) {
|
||||
for(c in p.characters)
|
||||
c.__lockAnimThisFrame = true;
|
||||
|
||||
__funcsToExec.push(function(note:Note) {
|
||||
if (__justPressed[note.strumID] && !note.isSustainNote && !note.wasGoodHit && note.canBeHit) {
|
||||
if (notePerStrum[note.strumID] == null) notePerStrum[note.strumID] = note;
|
||||
|
||||
@@ -92,13 +92,22 @@ class Stage extends FlxBasic implements IBeatReceiver {
|
||||
state.add(spr);
|
||||
spr;
|
||||
case "boyfriend" | "bf":
|
||||
addCharPos("boyfriend", node);
|
||||
addCharPos("boyfriend", node, {
|
||||
x: 770,
|
||||
y: 100
|
||||
});
|
||||
null;
|
||||
case "girlfriend" | "gf":
|
||||
addCharPos("girlfriend", node);
|
||||
addCharPos("girlfriend", node, {
|
||||
x: 400,
|
||||
y: 130
|
||||
});
|
||||
null;
|
||||
case "dad" | "opponent":
|
||||
addCharPos("dad", node);
|
||||
addCharPos("dad", node, {
|
||||
x: 100,
|
||||
y: 100
|
||||
});
|
||||
null;
|
||||
case "character":
|
||||
if (!node.has.name) continue;
|
||||
@@ -165,11 +174,10 @@ class Stage extends FlxBasic implements IBeatReceiver {
|
||||
state.add(char);
|
||||
else {
|
||||
var charPos = characterPoses[posName];
|
||||
if (charPos.node != null) {
|
||||
doCharNodeShit(char, charPos.node);
|
||||
} else if (charPos.nonXMLInfo != null) {
|
||||
if (charPos.nonXMLInfo != null)
|
||||
char.setPosition(charPos.nonXMLInfo.x, charPos.nonXMLInfo.y);
|
||||
}
|
||||
if (charPos.node != null)
|
||||
doCharNodeShit(char, charPos.node);
|
||||
state.insert(state.members.indexOf(charPos.dummy), char);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,6 +27,10 @@ class StrumLine extends FlxTypedGroup<Strum> {
|
||||
* Controls assigned to this strumline.
|
||||
*/
|
||||
public var controls:Controls = null;
|
||||
/**
|
||||
* Chart JSON data assigned to this StrumLine (Codename format)
|
||||
*/
|
||||
public var data:ChartStrumLine = null;
|
||||
/**
|
||||
* Whenever Ghost Tapping is enabled.
|
||||
*/
|
||||
|
||||
@@ -17,4 +17,16 @@ class FunkinGame extends FlxGame {
|
||||
_total = ticks = getTicks();
|
||||
super.onEnterFrame(t);
|
||||
}
|
||||
|
||||
public override function draw() {
|
||||
MemoryUtil.askDisable();
|
||||
super.draw();
|
||||
MemoryUtil.askEnable();
|
||||
}
|
||||
|
||||
public override function update() {
|
||||
MemoryUtil.askDisable();
|
||||
super.update();
|
||||
MemoryUtil.askEnable();
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,7 @@ package funkin.system.framerate;
|
||||
|
||||
import flixel.FlxG;
|
||||
import flixel.math.FlxMath;
|
||||
import funkin.utils.MemoryUtil;
|
||||
|
||||
class SystemInfo extends FramerateCategory {
|
||||
public function new() {
|
||||
@@ -14,6 +15,7 @@ class SystemInfo extends FramerateCategory {
|
||||
_text += '\nObjs in state: ${FlxG.state.members.length}';
|
||||
_text += '\nNb cameras: ${FlxG.cameras.list.length}';
|
||||
_text += '\nCurrent state: ${Type.getClassName(Type.getClass(FlxG.state))}';
|
||||
_text += '\nGarbage Collector: ${MemoryUtil.disableCount > 0 ? "OFF" : "ON"} (${MemoryUtil.disableCount})';
|
||||
|
||||
this.text.text = _text;
|
||||
super.__enterFrame(t);
|
||||
|
||||
Reference in New Issue
Block a user