Always use 74 vertical basis for all resolutions

Should make the game more consistant

Changes: You cannot win a level or save Easter Egg collection after opening the Level Editor
To rectify this, exit from the level and re-enter it, which resets the state.

...or you could be willing to disregard it by setting alwaysDisqualify to 0.
This commit is contained in:
yellows111 2024-03-18 14:55:13 +00:00
parent 58c98539c3
commit e7c419ef1a
5 changed files with 34 additions and 8 deletions

View File

@ -794,6 +794,8 @@ function EditorGui::onWake(%this)
MoveMap.push();
EditorMap.push();
%this.setEditor(%this.currentEditor);
// sorry nothing
$alwaysDisqualify = 1;
}
function EditorGui::onSleep(%this)

View File

@ -102,10 +102,10 @@ function playGameMusic()
}
$musicFound = true;
}
if($NumMusicFiles)
else
if($NumMusicFiles) {}
else {
playMusic("Shell.ogg");
}
}
function pauseMusic()

View File

@ -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 @ "<color:00ff00>" @ ((MissionInfo.goldTime && $Game::ScoreTime < MissionInfo.goldTime) ?
"You beat the <color:c1f6ba>Superb<color:00ff00> time!" : "You've qualified!");
}
else
%text = %text @ "<color:ff0000>You failed to qualify!";
else {
if($alwaysDisqualify) {
%text = %text @ "<color:ff0000>Level Editor was opened!";
}
else {
%text = %text @ "<color:ff0000>You failed to qualify!";
}
}
// Basic time info
%text = %text @

View File

@ -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);
}
}

View File

@ -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);