diff --git a/common/editor/editorgui.cs b/common/editor/editorgui.cs index d1200e0..a87c8c1 100644 --- a/common/editor/editorgui.cs +++ b/common/editor/editorgui.cs @@ -794,6 +794,8 @@ function EditorGui::onWake(%this) MoveMap.push(); EditorMap.push(); %this.setEditor(%this.currentEditor); + // sorry nothing + $alwaysDisqualify = 1; } function EditorGui::onSleep(%this) diff --git a/marble/client/scripts/audioprofiles.cs b/marble/client/scripts/audioprofiles.cs index c61bbce..91e4af3 100644 --- a/marble/client/scripts/audioprofiles.cs +++ b/marble/client/scripts/audioprofiles.cs @@ -102,10 +102,10 @@ function playGameMusic() } $musicFound = true; } - if($NumMusicFiles) - - else + if($NumMusicFiles) {} + else { playMusic("Shell.ogg"); + } } function pauseMusic() diff --git a/marble/client/scripts/game.cs b/marble/client/scripts/game.cs index 2969e1e..f1286e6 100644 --- a/marble/client/scripts/game.cs +++ b/marble/client/scripts/game.cs @@ -32,9 +32,12 @@ function clientCmdGameEnd() if($playingDemo) return; - getBestTimes($Server::MissionFile); - if($Server::MissionFile $= "marble/data/missions/expert/timmysfork.mis") { - // if we've beaten The Final Challenge show the epic finale + if($alwaysDisqualify) { + $Game::Qualified = false; + } + + if($Server::MissionFile $= "marble/data/missions/expert/timmysfork.mis" && !$alwaysDisqualify) { + // if we've beaten The Final Challenge show the epic finale except if editor was opened gameIsCompleteSignalForEndGameGui(1); Canvas.pushDialog(congratsGui); } @@ -54,6 +57,9 @@ function clientCmdGameEnd() } reformatGameEndText(); Canvas.pushDialog(EndGameGui); + if($alwaysDisqualify) { + return; + } if($highScoreIndex !$= "") { if($highScoreIndex == 0) @@ -95,8 +101,14 @@ function reformatGameEndText() %text = %text @ "" @ ((MissionInfo.goldTime && $Game::ScoreTime < MissionInfo.goldTime) ? "You beat the Superb time!" : "You've qualified!"); } - else - %text = %text @ "You failed to qualify!"; + else { + if($alwaysDisqualify) { + %text = %text @ "Level Editor was opened!"; + } + else { + %text = %text @ "You failed to qualify!"; + } + } // Basic time info %text = %text @ diff --git a/marble/client/scripts/serverconnection.cs b/marble/client/scripts/serverconnection.cs index c8bb51c..f403c9a 100644 --- a/marble/client/scripts/serverconnection.cs +++ b/marble/client/scripts/serverconnection.cs @@ -30,6 +30,12 @@ function handleConnectionErrorMessage(%msgType, %msgString, %msgError) function GameConnection::initialControlSet(%this) { + // this is BEYOND stupid but this engine doesn't set a good FOV without it: + %resolution = getResolution(); + %horiz = getWord(%resolution, 0); + %verti = getWord(%resolution, 1); + // 74 = baseline vFOV + setFov(mFloor(2*mAtan(mTan((74 * 3.141592653 / 180) / 2) * (%horiz/%verti), 1) / 3.141592653 * 180)); echo ("*** Initial Control Object"); // The first control object has been set by the server @@ -39,6 +45,8 @@ function GameConnection::initialControlSet(%this) if (!Editor::checkActiveLoadDone()) { if (Canvas.getContent() != PlayGui.getId()) + // reset the aDQ state, since we're setting interface content (which destroys all interfaces, including editors); + $alwaysDisqualify = 0; Canvas.setContent(PlayGui); } } diff --git a/marble/server/scripts/game.cs b/marble/server/scripts/game.cs index c44a28d..57c14dd 100644 --- a/marble/server/scripts/game.cs +++ b/marble/server/scripts/game.cs @@ -508,6 +508,10 @@ function GameConnection::onFoundGem(%this,%amount) function GameConnection::onFoundEasterEgg(%this, %amount) { + if($alwaysDisqualify) { + messageClient(%this, 'MsgItemPickup', '\c2Easter Eggs are disabled when you use the editor...'); + return; + } if($pref::easterEggCollected[$Server::MissionFile] == 1) { messageClient(%this, 'MsgItemPickup', '\c0You already have this Easter Egg.'); %this.play2d(GotThatEggAlready);