mirror of
https://github.com/RandomityGuy/MBHaxe.git
synced 2025-10-30 08:11:25 +00:00
fixed pathedinterior timings and tweaked pause bug
This commit is contained in:
parent
ebc9c24390
commit
4241792a1e
3 changed files with 11 additions and 9 deletions
|
|
@ -147,7 +147,7 @@ class MarbleWorld extends Scheduler {
|
|||
public var totalGems:Int = 0;
|
||||
public var gemCount:Int = 0;
|
||||
public var blastAmount:Float = 0;
|
||||
public var skipStartBug:Bool = false;
|
||||
public var skipStartBugPauseTime:Float = 0.0;
|
||||
|
||||
var renderBlastAmount:Float = 0;
|
||||
|
||||
|
|
@ -467,7 +467,7 @@ class MarbleWorld extends Scheduler {
|
|||
this.renderBlastAmount = 0;
|
||||
this.outOfBoundsTime = null;
|
||||
this.finishTime = null;
|
||||
this.skipStartBug = false;
|
||||
this.skipStartBugPauseTime = 0.0;
|
||||
|
||||
this.currentCheckpoint = null;
|
||||
this.currentCheckpointTrigger = null;
|
||||
|
|
@ -593,7 +593,7 @@ class MarbleWorld extends Scheduler {
|
|||
if ((this.timeState.currentAttemptTime >= 0.5) && (this.timeState.currentAttemptTime < 3.5)) {
|
||||
this.marble.setMode(Start);
|
||||
}
|
||||
if ((this.timeState.currentAttemptTime >= 3.5 || skipStartBug) && this.finishTime == null) {
|
||||
if (this.timeState.currentAttemptTime + skipStartBugPauseTime >= 3.5 && this.finishTime == null) {
|
||||
this.marble.setMode(Play);
|
||||
}
|
||||
}
|
||||
|
|
@ -1152,7 +1152,7 @@ class MarbleWorld extends Scheduler {
|
|||
var timeMultiplier = this.gameMode.timeMultiplier();
|
||||
|
||||
if (!this.isWatching) {
|
||||
if (this.bonusTime != 0 && (this.timeState.currentAttemptTime >= 3.5 || skipStartBug)) {
|
||||
if (this.bonusTime != 0 && this.timeState.currentAttemptTime + skipStartBugPauseTime >= 3.5) {
|
||||
this.bonusTime -= dt;
|
||||
if (this.bonusTime < 0) {
|
||||
this.timeState.gameplayClock -= this.bonusTime * timeMultiplier;
|
||||
|
|
@ -1167,7 +1167,7 @@ class MarbleWorld extends Scheduler {
|
|||
timeTravelSound.stop();
|
||||
timeTravelSound = null;
|
||||
}
|
||||
if ((this.timeState.currentAttemptTime >= 3.5 || skipStartBug)) {
|
||||
if (this.timeState.currentAttemptTime + skipStartBugPauseTime >= 3.5) {
|
||||
this.timeState.gameplayClock += dt * timeMultiplier;
|
||||
} else if (this.timeState.currentAttemptTime + dt >= 3.5) {
|
||||
this.timeState.gameplayClock += ((this.timeState.currentAttemptTime + dt) - 3.5) * timeMultiplier;
|
||||
|
|
@ -1180,7 +1180,7 @@ class MarbleWorld extends Scheduler {
|
|||
this.timeState.currentAttemptTime = this.replay.currentPlaybackFrame.time;
|
||||
this.timeState.gameplayClock = this.replay.currentPlaybackFrame.clockTime;
|
||||
this.bonusTime = this.replay.currentPlaybackFrame.bonusTime;
|
||||
if (this.bonusTime != 0 && (this.timeState.currentAttemptTime >= 3.5 || skipStartBug)) {
|
||||
if (this.bonusTime != 0 && this.timeState.currentAttemptTime + skipStartBugPauseTime >= 3.5) {
|
||||
if (timeTravelSound == null) {
|
||||
var ttsnd = ResourceLoader.getResource("data/sound/timetravelactive.wav", ResourceLoader.getAudio, this.soundResources);
|
||||
timeTravelSound = AudioManager.playSound(ttsnd, null, true);
|
||||
|
|
|
|||
|
|
@ -233,7 +233,7 @@ class PathedInterior extends InteriorObject {
|
|||
|
||||
function computeDuration() {
|
||||
var total = 0.0;
|
||||
for (i in 0...(markerData.length - 1)) {
|
||||
for (i in 0...markerData.length) {
|
||||
var marker = markerData[i];
|
||||
total += marker.msToNext;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -116,7 +116,9 @@ class ExitGameDlg extends GuiImage {
|
|||
override function update(dt:Float, mouseState:MouseState) {
|
||||
super.update(dt, mouseState);
|
||||
timeMenu += dt;
|
||||
if (timeMenu > 3)
|
||||
MarbleGame.instance.world.skipStartBug = true; // Trigger this lol
|
||||
}
|
||||
|
||||
override function onRemove() {
|
||||
MarbleGame.instance.world.skipStartBugPauseTime += timeMenu;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue