Skip to content

Commit e1a7c60

Browse files
committed
Merge branch 'Archipelago' of https://github.com/Z11Coding/Mixtape-Engine-Rework into Archipelago
2 parents b8f2c2d + 9cb337c commit e1a7c60

File tree

3 files changed

+21
-127
lines changed

3 files changed

+21
-127
lines changed

source/backend/modchart/ModManager.hx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,7 @@ class ModManager {
9999
SnapModifier,
100100
SpiralModifier,
101101
SchmovinDrunkModifier,
102-
FlaccidModifier,
103-
ReverseDirectionModifier
102+
FlaccidModifier
104103
];
105104
for (mod in quickRegs)
106105
quickRegister(Type.createInstance(mod, [this]));
@@ -585,7 +584,7 @@ class ModManager {
585584
diff += getValue("centeredPath", player) * Note.swagWidth; // Each 100% moves the path by receptor size
586585

587586
pos.setTo(
588-
Note.halfWidth + getBaseX(data, field.field.playerId, field.field.keyCount),
587+
Note.halfWidth + getBaseX(data, player, field.field.keyCount),
589588
Note.halfWidth + 50 + diff,
590589
0
591590
);

source/backend/modchart/modifiers/ReverseDirectionModifier.hx

Lines changed: 0 additions & 96 deletions
This file was deleted.

source/states/PlayState.hx

Lines changed: 19 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -3646,8 +3646,11 @@ class PlayState extends MusicBeatState
36463646

36473647
playerField.strumNotes = [];
36483648
dadField.strumNotes = [];
3649-
setOnScripts('mania', mania);
3649+
3650+
callOnScripts('onChangeMania', [mania, daOldMania]);
3651+
36503652

3653+
setOnScripts('mania', mania);
36513654
notes.forEachAlive(function(note:Note)
36523655
{
36533656
updateNote(note);
@@ -3659,8 +3662,6 @@ class PlayState extends MusicBeatState
36593662
updateNote(note);
36603663
}
36613664

3662-
setOnScripts('onChangeMania', [mania, daOldMania]);
3663-
36643665
callOnScripts('preReceptorGeneration'); // backwards compat, deprecated
36653666
callOnScripts('onReceptorGeneration');
36663667

@@ -4202,6 +4203,7 @@ class PlayState extends MusicBeatState
42024203

42034204
public var initY:Float;
42044205
var lastHealth:Float = -1;
4206+
public var manualDisable:Bool = false; // for modcharts that need the variables otherwise lol
42054207
override public function update(elapsed:Float)
42064208
{
42074209
if(!inCutscene && !paused && !freezeCamera) {
@@ -4252,18 +4254,8 @@ class PlayState extends MusicBeatState
42524254
modManager.update(elapsed, curDecBeat, curDecStep);
42534255

42544256
//Band-Aid patch but HEY IT WORKS SO I AM NOT COMPLAINING LMAO
4255-
if (!startingSong)
4257+
if (!startingSong && !manualDisable)
42564258
modchartSync(false);
4257-
else {
4258-
for (field in playfields.members) {
4259-
for (strum in field.strumNotes) {
4260-
if (altNoteMove) {
4261-
strum.x = 0;
4262-
strum.y = 25;
4263-
}
4264-
}
4265-
}
4266-
}
42674259

42684260
// TODO: Figure this out
42694261
/*for (note in 0...playerStrums.members.length) {
@@ -6992,12 +6984,14 @@ class PlayState extends MusicBeatState
69926984
// play character anims
69936985
var char:Character = boyfriend;
69946986
if((note != null && note.gfNote) || (SONG.notes[curSection] != null && SONG.notes[curSection].gfSection)) char = gf;
6995-
if (opponentmode || note.field == dadField)
6996-
char = dad;
6997-
if (note.exNote && note.field == playerField)
6998-
char = bf2;
6999-
if (note.exNote && note.field == dadField)
7000-
char = dad2;
6987+
if (note != null) {
6988+
if (opponentmode || note.field == dadField)
6989+
char = dad;
6990+
if (note.exNote && note.field == playerField)
6991+
char = bf2;
6992+
if (note.exNote && note.field == dadField)
6993+
char = dad2;
6994+
}
70016995

70026996
if(char != null && (note == null || !note.noMissAnimation) && char.hasMissAnimations)
70036997
{
@@ -7745,8 +7739,8 @@ class PlayState extends MusicBeatState
77457739
}
77467740

77477741
public var altNoteMove:Bool = false; //because there's more than one way to do it
7748-
public var strumOffsetbcauseitsstupid:Float = 0;
7749-
public var strumOffsetspacebcauseitsstupid:Float = 0;
7742+
public var strumOffsetbcauseitsstupid:Float = 695;
7743+
public var strumOffsetspacebcauseitsstupid:Float = 110;
77507744
public var ModchartScrollType:Int = 0; // 0 = none, 1 = Downscroll, 3 = Rotate.
77517745
public var curDownscroll:Bool = ClientPrefs.data.downScroll; // Used to check if the downscroll has changed.
77527746
public function modchartSync(directChange:Bool = false):Void {
@@ -7771,26 +7765,23 @@ class PlayState extends MusicBeatState
77717765
// Sync Y position
77727766
var baseY = ClientPrefs.data.downScroll ? (FlxG.height - 150) : 50;
77737767
var offsetY = strumNote.y - baseY;
7774-
modManager.setValue('transform${i}Y', altNoteMove ? offsetY : strumNote.y, field.playerId);
7768+
modManager.setValue('transform${i}Y', (altNoteMove ? offsetY : strumNote.y) - ((strumNote.downScroll || (strumNote.direction % 360) >= 180) ? 520 : 0), field.playerId);
77757769
//strumNote.y = strumNote.y;
77767770

77777771
// Sync angle
7778-
modManager.setValue('note${i}Angle', strumNote.angle, field.playerId);
7772+
//modManager.setValue('note${i}Angle', strumNote.angle, field.playerId);
77797773
//strumNote.angle = strumNote.angle;
77807774

77817775
// Downscroll.
77827776
if (ModchartScrollType == 1) {
77837777
modManager.setValue('reverse${i}', strumNote.downScroll ? 1 : 0, field.playerId);
77847778
} else if (ModchartScrollType == 2 && curDownscroll != ClientPrefs.data.downScroll) {
77857779
// Invert the direction of strumNote by adding 180 degrees to its current direction
7786-
modManager.setValue('localrotate${i}Z', (strumNote.direction + 180) % 360, field.playerId);
7780+
modManager.setValue('local${i}rotateX', (strumNote.direction + 180) % 360, field.playerId);
77877781
curDownscroll = ClientPrefs.data.downScroll;
77887782
} else {
77897783
// Nothing.
77907784
}
7791-
7792-
// Direction.
7793-
modManager.setValue('localrotate${i}Z', strumNote.direction , field.playerId);
77947785

77957786
// // Sync alpha
77967787
// modManager.setValue('alpha${i}', strumNote.alpha, field.playerId);

0 commit comments

Comments
 (0)