diff --git a/src/Marble.hx b/src/Marble.hx index 568e7a1d..7c03b542 100644 --- a/src/Marble.hx +++ b/src/Marble.hx @@ -1817,9 +1817,9 @@ class Marble extends GameObject { var renderPos = Util.lerpThreeVectors(this.oldPos, this.newPos, deltaT); this.setPosition(renderPos.x, renderPos.y, renderPos.z); - var rot = this.prevRot; + var rot = this.getRotationQuat(); var quat = new Quat(); - quat.initRotation(omega.x * physicsAccumulator, omega.y * physicsAccumulator, omega.z * physicsAccumulator); + quat.initRotation(omega.x * timeState.dt, omega.y * timeState.dt, omega.z * timeState.dt); quat.multiply(quat, rot); this.setRotationQuat(quat); @@ -1953,9 +1953,9 @@ class Marble extends GameObject { var renderPos = Util.lerpThreeVectors(this.oldPos, this.newPos, deltaT); this.setPosition(renderPos.x, renderPos.y, renderPos.z); - var rot = this.prevRot; + var rot = this.getRotationQuat(); var quat = new Quat(); - quat.initRotation(omega.x * physicsAccumulator, omega.y * physicsAccumulator, omega.z * physicsAccumulator); + quat.initRotation(omega.x * timeState.dt, omega.y * timeState.dt, omega.z * timeState.dt); quat.multiply(quat, rot); this.setRotationQuat(quat); diff --git a/src/modes/HuntMode.hx b/src/modes/HuntMode.hx index 248d01d4..de0d9e20 100644 --- a/src/modes/HuntMode.hx +++ b/src/modes/HuntMode.hx @@ -584,7 +584,7 @@ class HuntMode extends NullMode { override function onTimeExpire() { if (level.finishTime != null) return; - if (!this.level.isMultiplayer || Net.isHost) { + if (this.level.isMultiplayer) { AudioManager.playSound(ResourceLoader.getResource('data/sound/finish.wav', ResourceLoader.getAudio, @:privateAccess level.soundResources)); level.finishTime = level.timeState.clone(); level.marble.setMode(Start); @@ -598,21 +598,7 @@ class HuntMode extends NullMode { NetCommands.timerRanOut(); } if (!level.isWatching) { - var myScore = { - name: "Player", - time: getFinishScore() - }; - Settings.saveScore(level.mission.path, myScore, getScoreType()); - var notifies = AchievementsGui.check(); - var delay = 5.0; - var achDelay = 0.0; - for (i in 0...9) { - if (notifies & (1 << i) > 0) - achDelay += 3; - } - if (notifies > 0) - achDelay += 0.5; - @:privateAccess level.schedule(level.timeState.currentAttemptTime + Math.max(delay, achDelay), () -> cast level.showFinishScreen()); + @:privateAccess level.schedule(level.timeState.currentAttemptTime, () -> cast level.showFinishScreen()); } // Stop the ongoing sounds if (@:privateAccess level.timeTravelSound != null) {