Skip to content

Commit a648b03

Browse files
committed
fixed base modcharts having a stroke for no reason
also WORKING AP WORLD WOOOO
1 parent 30c5ae5 commit a648b03

File tree

4 files changed

+18
-23
lines changed

4 files changed

+18
-23
lines changed
21.6 KB
Binary file not shown.

source/backend/Paths.hx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,7 @@ class Paths
221221

222222
// The "If All Else Fails" option
223223
public static function nukeMemory(){
224+
clearStoredWithoutStickers();
224225
freeGraphicsFromMemory();
225226
clearUnusedMemory();
226227
clearStoredMemory();

source/states/PlayState.hx

Lines changed: 15 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1813,20 +1813,17 @@ class PlayState extends MusicBeatState
18131813
modManager.registerDefaultModifiers();
18141814

18151815
if (ClientPrefs.data.middleScroll) {
1816-
altNoteMove = true;
1817-
//strumOffsetspacebcauseitsstupid = 0;
1818-
//strumOffsetbcauseitsstupid = 0;
1819-
var off:Float = Math.min(FlxG.width, 1280) / 4;
1816+
var off:Float = Math.min(FlxG.width, 1280) / Note.ammo[mania];
18201817
var opp:Int = opponentmode ? 0 : 1;
18211818

18221819
var halfKeys:Int = Math.floor(Note.ammo[mania] / 2);
18231820
if (Note.ammo[mania] % 2 != 0) // middle receptor dissappears, if there is one
18241821
modManager.setValue('alpha${halfKeys + 1}', 1.0, opp);
18251822

18261823
for (i in 0...halfKeys)
1827-
modManager.setValue('transform${i}X-a', -off, opp);
1824+
modManager.setValue('transform${i}X', -off, opp);
18281825
for (i in Note.ammo[mania]-halfKeys...Note.ammo[mania])
1829-
modManager.setValue('transform${i}X-a', off, opp);
1826+
modManager.setValue('transform${i}X', off, opp);
18301827

18311828
modManager.setValue("alpha", 0.6, opp);
18321829
modManager.setValue("opponentSwap", 0.5);
@@ -1837,6 +1834,11 @@ class PlayState extends MusicBeatState
18371834
#end
18381835
callOnScripts('onModifierRegisterPost');
18391836

1837+
for (i in 0...Note.ammo[mania]) {
1838+
playerField.baseXPositions[i] = playerField.strumNotes[i].x;
1839+
dadField.baseXPositions[i] = dadField.strumNotes[i].x;
1840+
}
1841+
18401842
startedCountdown = true;
18411843
Conductor.songPosition = -Conductor.crochet * 5 + Conductor.offset;
18421844
setOnScripts('startedCountdown', true);
@@ -4396,19 +4398,9 @@ class PlayState extends MusicBeatState
43964398
modManager.update(elapsed, curDecBeat, curDecStep);
43974399

43984400
//Band-Aid patch but HEY IT WORKS SO I AM NOT COMPLAINING LMAO
4399-
if (!startingSong && enableBaseMovement)
4401+
if (!startingSong)
44004402
modchartSync(false);
44014403

4402-
// TODO: Figure this out
4403-
/*for (note in 0...playerStrums.members.length) {
4404-
modManager.setValue('psychTransform${note}X', playerStrums.members[note].x, 1);
4405-
modManager.setValue('psychTransform${note}Y', playerStrums.members[note].y, 1);
4406-
}
4407-
for (note in 0...opponentStrums.members.length) {
4408-
modManager.setValue('psychTransform${note}X', opponentStrums.members[note].x, 0);
4409-
modManager.setValue('psychTransform${note}Y', opponentStrums.members[note].y, 0);
4410-
}*/
4411-
44124404
setOnScripts('curDecStep', curDecStep);
44134405
setOnScripts('curDecBeat', curDecBeat);
44144406

@@ -8054,9 +8046,10 @@ class PlayState extends MusicBeatState
80548046
}
80558047
}
80568048

8057-
public var altNoteMove:Bool = false; //because there's more than one way to do it
8058-
public var strumOffsetbcauseitsstupid:Float = 695;
8059-
public var strumOffsetspacebcauseitsstupid:Float = 110;
8049+
// gonna keep these two just in case i still need em but i dont think i do anymore
8050+
public var strumOffsetbcauseitsstupid:Float = 0;
8051+
public var strumOffsetspacebcauseitsstupid:Float = 0;
8052+
80608053
public var ModchartScrollType:Int = 0; // 0 = none, 1 = Downscroll, 3 = Rotate.
80618054
public var curDownscroll:Bool = ClientPrefs.data.downScroll; // Used to check if the downscroll has changed.
80628055
public function modchartSync(directChange:Bool = false):Void {
@@ -8075,13 +8068,13 @@ class PlayState extends MusicBeatState
80758068
} else {
80768069
// Sync X position
80778070
var offsetX = strumNote.x - field.baseXPositions[i];
8078-
modManager.setValue('transform${i}X', (altNoteMove ? offsetX : strumNote.x) - (strumOffsetspacebcauseitsstupid * i) - strumOffsetbcauseitsstupid, field.playerId);
8071+
modManager.setValue('transform${i}X', offsetX - (strumOffsetspacebcauseitsstupid * i) - strumOffsetbcauseitsstupid, field.playerId);
80798072
//strumNote.x = strumNote.x;
80808073

80818074
// Sync Y position
80828075
var baseY = ClientPrefs.data.downScroll ? (FlxG.height - 150) : 50;
80838076
var offsetY = strumNote.y - baseY;
8084-
modManager.setValue('transform${i}Y', (altNoteMove ? offsetY : strumNote.y) - ((strumNote.downScroll || (strumNote.direction % 360) >= 180) ? 520 : 0), field.playerId);
8077+
modManager.setValue('transform${i}Y', offsetY - ((strumNote.downScroll || (strumNote.direction % 360) >= 180) ? 520 : 0), field.playerId);
80858078
//strumNote.y = strumNote.y;
80868079

80878080
// Sync angle

source/states/freeplay/FreeplayState.hx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -750,6 +750,7 @@ class FreeplayState extends MusicBeatState
750750
newSel = 0;
751751
curSelected = newSel;
752752
changeSelection();
753+
updateTexts();
753754
return;
754755
}
755756

@@ -782,7 +783,7 @@ class FreeplayState extends MusicBeatState
782783
newSel = 0;
783784
curSelected = newSel;
784785
changeSelection();
785-
lerpSelected = curSelected;
786+
updateTexts();
786787
return;
787788
}
788789

0 commit comments

Comments
 (0)