1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2024-10-02 07:28:53 +00:00

maybe acurate?

This commit is contained in:
Cameron Taylor 2024-01-31 03:24:00 -05:00
parent cdb73f94ca
commit 3621f17bd0
5 changed files with 9 additions and 5 deletions

2
assets

@ -1 +1 @@
Subproject commit b2f8b6a780316959d0a79adc6dbf61f9e4ca675f
Subproject commit 30ad76c15d88bdff2b41ec017e3f3089ede52411

View file

@ -54,7 +54,7 @@
"name": "haxeui-core",
"type": "git",
"dir": null,
"ref": "5b2d5b8e7e470cf637953e1369c80a1f42016a75",
"ref": "a551159",
"url": "https://github.com/haxeui/haxeui-core"
},
{

View file

@ -293,8 +293,9 @@ class PreciseInputManager extends FlxKeyManager<FlxKey, PreciseInputList>
// TODO: Remove this line with SDL3 when timestamps change meaning.
// This is because SDL3's timestamps are measured in nanoseconds, not milliseconds.
timestamp *= Constants.NS_PER_MS;
timestamp *= Constants.NS_PER_MS; // 18126000000 38367000000
timestamp -= Conductor.instance.inputOffset * Constants.NS_PER_MS;
// trace(timestamp);
updateKeyStates(key, true);
if (getInputByKey(key)?.justPressed ?? false)

View file

@ -246,10 +246,11 @@ class LatencyState extends MusicBeatSubState
trace("input latency: " + inputLatencyMs + "ms");
trace("cur timestamp: " + PreciseInputManager.getCurrentTimestamp() + "ns");
trace("event timestamp: " + event.timestamp + "ns");
trace("songtime: " + Conductor.instance.getTimeWithDiff() + "ms");
var closestBeat:Int = Math.round(Conductor.instance.getTimeWithDiff() / (Conductor.instance.stepLengthMs * 2)) % diffGrp.members.length;
var getDiff:Float = Conductor.instance.getTimeWithDiff() - (closestBeat * (Conductor.instance.stepLengthMs * 2));
getDiff -= Conductor.instance.inputOffset;
// getDiff -= Conductor.instance.inputOffset;
getDiff -= inputLatencyMs;
// lil fix for end of song

View file

@ -224,6 +224,8 @@ class Constants
/**
* Constant for the number of seconds in a minute.
*
* sex per min
*/
public static final SECS_PER_MIN:Int = 60;