Skip to content

Commit 8eb0ac0

Browse files
committed
fix some reported bugs
1 parent a281b9f commit 8eb0ac0

File tree

13 files changed

+74
-36
lines changed

13 files changed

+74
-36
lines changed

.github/workflows/main.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
- name: Create Version Tag
5353
run: echo "${{github.run_id}}" > VERSION
5454
- name: Compile
55-
run: haxelib run lime build Project.xml linux"
55+
run: haxelib run lime build Project.xml linux
5656
- name: Publish Artifact
5757
uses: actions/upload-artifact@v4
5858
with:
@@ -89,7 +89,7 @@ jobs:
8989
- name: Create Version Tag
9090
run: echo "${{github.run_id}}" > VERSION
9191
- name: Compile
92-
run: haxelib run lime build windows"
92+
run: haxelib run lime build windows
9393
- name: Publish Artifact
9494
uses: actions/upload-artifact@v4
9595
with:
@@ -125,7 +125,7 @@ jobs:
125125
- name: Create Version Tag
126126
run: echo "${{github.run_id}}" > VERSION
127127
- name: Compile
128-
run: arch -x86_64 haxelib run lime build mac"
128+
run: arch -x86_64 haxelib run lime build mac
129129
- name: Publish Artifact
130130
uses: actions/upload-artifact@v4
131131
with:

Project.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<project>
33
<!-- _________________________ Application Settings _________________________ -->
44

5-
<app title="Friday Night Funkin': Psych Online" file="PsychOnline" main="Main" packageName="boo.sniro.psychonline" package="boo.sniro.psychonline" company="Snirozu" version="0.14.2" />
5+
<app title="Friday Night Funkin': Psych Online" file="PsychOnline" main="Main" packageName="boo.sniro.psychonline" package="boo.sniro.psychonline" company="Snirozu" version="0.14.3" />
66
<app if="mobile" title='Psych Online' />
77

88
<!--Switch Export with Unique ApplicationID and Icon-->

assets/preload/characters/pico-holding-nene-dead.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
],
5050
"camera_position": [
5151
0,
52-
0
52+
100
5353
],
5454
"sing_duration": 4,
5555
"scale": 1

assets/preload/characters/pico-retry-button.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
"no_antialiasing": false,
2727
"image": "characters/Pico_Death_Retry",
2828
"position": [
29-
0,
30-
300
29+
450,
30+
240
3131
],
3232
"healthicon": "pico",
3333
"flip_x": true,

source/backend/Paths.hx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,12 @@ class Paths
8686
if (obj != null && !currentTrackedAssets.exists(key) && !dumpExclusions.contains(key)) {
8787
openfl.Assets.cache.removeBitmapData(key);
8888
FlxG.bitmap._cache.remove(key);
89-
obj.destroy();
89+
// pointer not found?
90+
try {
91+
obj.destroy();
92+
} catch (exc) {
93+
trace(exc);
94+
}
9095
}
9196
}
9297

source/objects/Character.hx

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ class Character extends FlxSprite {
140140
}
141141
public static var DEFAULT_CHARACTER:String = 'bf'; // In case a character is missing, it will use BF on its place
142142

143-
public static function getCharacterFile(character:String, ?instance:Character):CharacterFile {
143+
public static function getCharacterFile(character:String, ?instance:Character, ?nullOnFail:Bool = false):CharacterFile {
144144
var characterPath:String = 'characters/' + character + '.json';
145145

146146
#if MODS_ALLOWED
@@ -157,6 +157,8 @@ class Character extends FlxSprite {
157157
{
158158
if (instance != null)
159159
instance.loadFailed = true;
160+
if (nullOnFail)
161+
return null;
160162
path = Paths.getPreloadPath('characters/' + DEFAULT_CHARACTER + '.json'); // If a character couldn't be found, change him to BF just to prevent a crash
161163
}
162164

@@ -316,8 +318,10 @@ class Character extends FlxSprite {
316318
// no flipX in flxanimate bcs not supported bye
317319
if(animIndices != null && animIndices.length > 0)
318320
atlas.anim.addBySymbolIndices(animAnim, animName, animIndices, animFps, animLoop);
319-
else
321+
else if (atlas.anim.symbolDictionary.exists(animName))
320322
atlas.anim.addBySymbol(animAnim, animName, animFps, animLoop);
323+
else
324+
atlas.anim.addByFrameLabel(animAnim, animName, animFps, animLoop);
321325
}
322326
#end
323327

@@ -733,8 +737,10 @@ class Character extends FlxSprite {
733737
if(!isAnimateAtlas)
734738
animation.addByPrefix(name, anim, 24, false);
735739
#if flxanimate
736-
else
740+
else if (atlas.anim.symbolDictionary.exists(anim))
737741
atlas.anim.addBySymbol(name, anim, 24, false);
742+
else
743+
atlas.anim.addByFrameLabel(name, anim, 24, false);
738744
#end
739745
}
740746

source/online/gui/sidebar/tabs/HostServerTab.hx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ class HostServerTab extends TabSprite {
2929
addChild(startAndStop);
3030

3131
updateServer = new TabButton('update', () -> {
32-
FileUtils.removeFiles('_server/');
32+
if (FileSystem.exists('_server/'))
33+
FileUtils.removeFiles('_server/');
3334
prepareServer();
3435
});
3536
updateServer.x = startAndStop.x;

source/online/states/SkinsState.hx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ import objects.Character;
1616
#end
1717
class SkinsState extends MusicBeatState {
1818
static var BLACKLISTED_CHARACTERS = ['default'];
19-
static var LEFT_SUFFIX = ['-opponent', '-left'];
20-
static var RIGHT_SUFFIX = ['-player', '-playable', '-right'];
19+
public static var LEFT_SUFFIX = ['-opponent', '-left'];
20+
public static var RIGHT_SUFFIX = ['-player', '-playable', '-right'];
2121
static var SKIP_SUFFICES = ['-pixel', '-christmas', '-blazin'];
2222

2323
var charactersWithWeeks:Array<Int> = [];

source/options/VisualsUISubState.hx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,7 @@ class VisualsUISubState extends BaseOptionsMenu
300300
for (i in 0...Note.colArray.length)
301301
{
302302
var note:StrumNote = notes.members[i];
303+
if (note == null) continue;
303304
if(notesTween[i] != null) notesTween[i].cancel();
304305
if(curSelected == noteOptionID)
305306
notesTween[i] = FlxTween.tween(note, {y: noteY}, Math.abs(note.y / (200 + noteY)) / 3, {ease: FlxEase.quadInOut});

source/states/MainMenuState.hx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,9 @@ class MainMenuState extends MusicBeatState
441441
}
442442
spr.centerOffsets();
443443

444+
if (spr.animation.curAnim == null)
445+
return;
446+
444447
final animationOffset = animationOffsets.get(optionShit[curSelected] + ':' + spr.animation.curAnim.name);
445448
if (animationOffset != null) {
446449
spr.offset.x += animationOffset[0];

0 commit comments

Comments
 (0)