screw ghost tapping
This commit is contained in:
+1
-1
@@ -1 +1 @@
|
||||
2236
|
||||
2239
|
||||
@@ -131,6 +131,10 @@ class PlayState extends MusicBeatState
|
||||
* Whenever the player can die.
|
||||
*/
|
||||
public var canDie:Bool = !opponentMode && !coopMode;
|
||||
/**
|
||||
* Whenever Ghost Tapping is enabled.
|
||||
*/
|
||||
public var ghostTapping:Bool = Options.ghostTapping;
|
||||
/**
|
||||
* Whenever the opponent can die.
|
||||
*/
|
||||
@@ -277,7 +281,7 @@ class PlayState extends MusicBeatState
|
||||
/**
|
||||
* Whenever the misses should show "Combo Breaks" instead of "Misses"
|
||||
*/
|
||||
public var comboBreaks:Bool = false;
|
||||
public var comboBreaks:Bool = !Options.ghostTapping;
|
||||
/**
|
||||
* Health bar background.
|
||||
*/
|
||||
@@ -1458,6 +1462,10 @@ class PlayState extends MusicBeatState
|
||||
});
|
||||
}
|
||||
|
||||
if (!p.ghostTapping) for(k=>p in __justPressed) if (p && notePerStrum[k] == null) {
|
||||
// FUCK YOU
|
||||
noteMiss(null, k, id);
|
||||
}
|
||||
for(e in notePerStrum) if (e != null) goodNoteHit(e);
|
||||
|
||||
p.forEach(function(str:Strum) {
|
||||
@@ -1470,14 +1478,21 @@ class PlayState extends MusicBeatState
|
||||
/**
|
||||
* Misses a note
|
||||
* @param note Note to miss.
|
||||
* @param direction Specify a custom direction in case note is null.
|
||||
* @param player Specify a custom player in case note is null.
|
||||
*/
|
||||
public function noteMiss(note:Note):Void
|
||||
public function noteMiss(note:Note, ?direction:Int, ?player:Int):Void
|
||||
{
|
||||
var event:NoteHitEvent = scripts.event("onPlayerMiss", EventManager.get(NoteHitEvent).recycle(true, false, false, note, note.strumLine.characters, true, note.noteType, "", "", "", note.strumID, -10, 0, -0.04, "shit"));
|
||||
var playerID:Null<Int> = note == null ? player : note.strumLineID;
|
||||
var directionID:Null<Int> = note == null ? direction : note.strumID;
|
||||
if (playerID == null || directionID == null) return;
|
||||
|
||||
var event:NoteHitEvent = scripts.event("onPlayerMiss", EventManager.get(NoteHitEvent).recycle(true, false, false, note, players[player].characters, true, note != null ? note.noteType : null, "", "", "", directionID, -10, 0, -0.04, "shit"));
|
||||
|
||||
if (event.cancelled) return;
|
||||
|
||||
if (event.note.strumLine != null) event.note.strumLine.addHealth(event.healthGain);
|
||||
|
||||
if (event.note != null && event.note.strumLine != null) event.note.strumLine.addHealth(event.healthGain);
|
||||
if (gf != null && combo > 5 && gf.hasAnimation('sad'))
|
||||
gf.playAnim('sad', event.forceAnim, MISS);
|
||||
combo = 0;
|
||||
@@ -1500,7 +1515,7 @@ class PlayState extends MusicBeatState
|
||||
if (char == null) continue;
|
||||
|
||||
char.stunned = true;
|
||||
char.playSingAnim(note.strumID, "miss", MISS);
|
||||
char.playSingAnim(directionID, "miss", MISS);
|
||||
}
|
||||
// boyfriend.stunned = true;
|
||||
|
||||
@@ -1671,6 +1686,7 @@ class PlayState extends MusicBeatState
|
||||
* @param note Note to delete
|
||||
*/
|
||||
public function deleteNote(note:Note) {
|
||||
if (note == null) return;
|
||||
var event:SimpleNoteEvent = scripts.event("onNoteDelete", EventManager.get(SimpleNoteEvent).recycle(note));
|
||||
if (!event.cancelled) {
|
||||
scripts.call("onNoteDelete", [note]);
|
||||
|
||||
@@ -24,7 +24,20 @@ class StrumLine extends FlxTypedGroup<Strum> {
|
||||
* Controls assigned to this strumline.
|
||||
*/
|
||||
public var controls:Controls = null;
|
||||
/**
|
||||
* Whenever Ghost Tapping is enabled.
|
||||
*/
|
||||
@:isVar public var ghostTapping(get, set):Null<Bool> = false;
|
||||
|
||||
private function get_ghostTapping() {
|
||||
if (this.ghostTapping != null) return this.ghostTapping;
|
||||
if (PlayState.instance != null) return PlayState.instance.ghostTapping;
|
||||
return false;
|
||||
}
|
||||
|
||||
private inline function set_ghostTapping(b:Bool):Bool
|
||||
return this.ghostTapping = b;
|
||||
|
||||
private var strumOffset:Float = 0.25;
|
||||
|
||||
public function new(characters:Array<Character>, strumOffset:Float = 0.25, cpu:Bool = false, opponentSide:Bool = true, ?controls:Controls) {
|
||||
|
||||
@@ -17,6 +17,7 @@ class Options
|
||||
*/
|
||||
public static var naughtyness:Bool = true;
|
||||
public static var downscroll:Bool = false;
|
||||
public static var ghostTapping:Bool = false;
|
||||
public static var flashingMenu:Bool = true;
|
||||
public static var camZoomOnBeat:Bool = true;
|
||||
public static var fpsCounter:Bool = true;
|
||||
|
||||
@@ -262,7 +262,5 @@ class Main extends Sprite
|
||||
Paths.assetsTree.clearCache();
|
||||
|
||||
MemoryUtil.clearMajor();
|
||||
|
||||
// FlxG.bitmap.dumpCache();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user