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:
parent
58c98539c3
commit
e7c419ef1a
|
@ -794,6 +794,8 @@ function EditorGui::onWake(%this)
|
||||||
MoveMap.push();
|
MoveMap.push();
|
||||||
EditorMap.push();
|
EditorMap.push();
|
||||||
%this.setEditor(%this.currentEditor);
|
%this.setEditor(%this.currentEditor);
|
||||||
|
// sorry nothing
|
||||||
|
$alwaysDisqualify = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
function EditorGui::onSleep(%this)
|
function EditorGui::onSleep(%this)
|
||||||
|
|
|
@ -102,11 +102,11 @@ function playGameMusic()
|
||||||
}
|
}
|
||||||
$musicFound = true;
|
$musicFound = true;
|
||||||
}
|
}
|
||||||
if($NumMusicFiles)
|
if($NumMusicFiles) {}
|
||||||
|
else {
|
||||||
else
|
|
||||||
playMusic("Shell.ogg");
|
playMusic("Shell.ogg");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function pauseMusic()
|
function pauseMusic()
|
||||||
{
|
{
|
||||||
|
|
|
@ -32,9 +32,12 @@ function clientCmdGameEnd()
|
||||||
if($playingDemo)
|
if($playingDemo)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
getBestTimes($Server::MissionFile);
|
if($alwaysDisqualify) {
|
||||||
if($Server::MissionFile $= "marble/data/missions/expert/timmysfork.mis") {
|
$Game::Qualified = false;
|
||||||
// if we've beaten The Final Challenge show the epic finale
|
}
|
||||||
|
|
||||||
|
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);
|
gameIsCompleteSignalForEndGameGui(1);
|
||||||
Canvas.pushDialog(congratsGui);
|
Canvas.pushDialog(congratsGui);
|
||||||
}
|
}
|
||||||
|
@ -54,6 +57,9 @@ function clientCmdGameEnd()
|
||||||
}
|
}
|
||||||
reformatGameEndText();
|
reformatGameEndText();
|
||||||
Canvas.pushDialog(EndGameGui);
|
Canvas.pushDialog(EndGameGui);
|
||||||
|
if($alwaysDisqualify) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if($highScoreIndex !$= "")
|
if($highScoreIndex !$= "")
|
||||||
{
|
{
|
||||||
if($highScoreIndex == 0)
|
if($highScoreIndex == 0)
|
||||||
|
@ -95,8 +101,14 @@ function reformatGameEndText()
|
||||||
%text = %text @ "<color:00ff00>" @ ((MissionInfo.goldTime && $Game::ScoreTime < MissionInfo.goldTime) ?
|
%text = %text @ "<color:00ff00>" @ ((MissionInfo.goldTime && $Game::ScoreTime < MissionInfo.goldTime) ?
|
||||||
"You beat the <color:c1f6ba>Superb<color:00ff00> time!" : "You've qualified!");
|
"You beat the <color:c1f6ba>Superb<color:00ff00> time!" : "You've qualified!");
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
|
if($alwaysDisqualify) {
|
||||||
|
%text = %text @ "<color:ff0000>Level Editor was opened!";
|
||||||
|
}
|
||||||
|
else {
|
||||||
%text = %text @ "<color:ff0000>You failed to qualify!";
|
%text = %text @ "<color:ff0000>You failed to qualify!";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Basic time info
|
// Basic time info
|
||||||
%text = %text @
|
%text = %text @
|
||||||
|
|
|
@ -30,6 +30,12 @@ function handleConnectionErrorMessage(%msgType, %msgString, %msgError)
|
||||||
|
|
||||||
function GameConnection::initialControlSet(%this)
|
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");
|
echo ("*** Initial Control Object");
|
||||||
|
|
||||||
// The first control object has been set by the server
|
// The first control object has been set by the server
|
||||||
|
@ -39,6 +45,8 @@ function GameConnection::initialControlSet(%this)
|
||||||
if (!Editor::checkActiveLoadDone())
|
if (!Editor::checkActiveLoadDone())
|
||||||
{
|
{
|
||||||
if (Canvas.getContent() != PlayGui.getId())
|
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);
|
Canvas.setContent(PlayGui);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -508,6 +508,10 @@ function GameConnection::onFoundGem(%this,%amount)
|
||||||
|
|
||||||
function GameConnection::onFoundEasterEgg(%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) {
|
if($pref::easterEggCollected[$Server::MissionFile] == 1) {
|
||||||
messageClient(%this, 'MsgItemPickup', '\c0You already have this Easter Egg.');
|
messageClient(%this, 'MsgItemPickup', '\c0You already have this Easter Egg.');
|
||||||
%this.play2d(GotThatEggAlready);
|
%this.play2d(GotThatEggAlready);
|
||||||
|
|
Loading…
Reference in New Issue