Merge remote-tracking branch 'devhead/Preview4_0' into tsneo

# Conflicts:
#	Engine/source/console/test/ScriptTest.cpp
#	Engine/source/console/test/consoleTest.cpp
This commit is contained in:
Jeff Hutchinson 2021-05-06 21:08:53 -04:00
commit 69d7a2f4a1
12 changed files with 90 additions and 12 deletions

View file

@ -25,7 +25,7 @@
// List of master servers to query, each one is tried in order
// until one responds
$Pref::Server::RegionMask = 2;
$pref::Master[0] = "2:master.garagegames.com:28002";
$pref::Master[0] = "2:master.torque3d.org:5664";
// Information about the server
$Pref::Server::Name = "Torque 3D Server";

View file

@ -155,6 +155,10 @@ function GuiCanvas::prefsToModeStr(%this)
function GuiCanvas::checkCanvasRes(%this, %mode, %deviceId, %deviceMode, %startup)
{
// Toggle for selecting the borderless window allowed sizes. Set true to allow
// borderless windows to be less than the device res.
%allowSmallBorderless = true;
%resX = getWord(%mode, $WORD::RES_X);
%resY = getWord(%mode, $WORD::RES_Y);
@ -175,6 +179,9 @@ function GuiCanvas::checkCanvasRes(%this, %mode, %deviceId, %deviceMode, %startu
if ((%resX > %deviceRect.x) || (%resY > %deviceRect.y))
return false;
if (!%allowSmallBorderless && ((%resX != %deviceRect.x) || (%resY != %deviceRect.y)))
return false;
return true;
}
@ -202,7 +209,8 @@ function GuiCanvas::checkCanvasRes(%this, %mode, %deviceId, %deviceMode, %startu
return false;
}
// Find the best video mode setting for the device and display mode
// Find the best video mode setting for the device and display mode.
// "Best" is the largest resolution that will fit at highest refresh rate.
function GuiCanvas::getBestCanvasRes(%this, %deviceId, %deviceMode)
{
if (%deviceMode == $Video::ModeWindowed)
@ -210,19 +218,25 @@ function GuiCanvas::getBestCanvasRes(%this, %deviceId, %deviceMode)
else
%deviceRect = getWords(%this.getMonitorRect(%deviceId), 2);
%bestRes = "";
%resCount = %this.getModeCount();
for (%i = %resCount - 1; %i >= 0; %i--)
{
%testRes = %this.getMode(%i);
%resX = getWord(%testRes, $WORD::RES_X);
%resY = getWord(%testRes, $WORD::RES_Y);
%rate = getWord(%testRes, $WORD::REFRESH);
if ((%resX > %deviceRect.x) || (%resY > %deviceRect.y))
if ((%resX > %deviceRect.x) || (%resY > %deviceRect.y) ||
(%resX < $Video::minimumXResolution) || (%resY < $Video::minimumYResolution))
continue;
return %testRes;
if (((%bestRes $= "") || (%resX > getWord(%bestRes, $WORD::RES_X)) ||
(%resY > getWord(%bestRes, $WORD::RES_Y))) ||
((%resX == getWord(%bestRes, $WORD::RES_X)) && (%resY == getWord(%bestRes, $WORD::RES_Y)) &&
(%rate > getWord(%bestRes, $WORD::REFRESH))))
%bestRes = %testRes;
}
// Nothing found? return first mode
return %this.getMonitorMode(%deviceId, 0);
return %bestRes;
}

View file

@ -5,6 +5,8 @@ $pref::Player::zoomSpeed = 0;
$pref::Net::LagThreshold = 400;
$pref::Net::Port = 28000;
$pref::Master[0] = "2:master.torque3d.org:5664";
$pref::HudMessageLogSize = 40;
$pref::ChatHudLength = 1;

View file

@ -2552,7 +2552,7 @@ function MaterialEditorGui::saveCompositeMap(%this)
%saveAs = "";
%dlg = new SaveFileDialog()
{
Filters = "png";
Filters = "PNG File (*.png)|*.png";
DefaultPath = EditorSettings.value("data/");
ChangePath = false;
OverwritePrompt = true;
@ -2566,6 +2566,9 @@ function MaterialEditorGui::saveCompositeMap(%this)
%saveAs = %dlg.FileName;
}
if( fileExt( %saveAs ) !$= ".png" )
%saveAs = %saveAs @ ".png";
%material = %this.currentMaterial;
%layer = %this.currentLayer;

View file

@ -1072,6 +1072,20 @@ function ObjectBuilderGui::buildObserverDropPoint(%this)
%this.process();
}
function ObjectBuilderGui::buildGeneralDropPoint(%this)
{
%this.objectClassName = "SpawnSphere";
%this.addField("dataBlock", "TypeDataBlock", "dataBlock", "MissionMarkerData SpawnSphereMarker");
%this.addField("radius", "TypeFloat", "Radius", 1);
%this.addField("sphereWeight", "TypeFloat", "Sphere Weight", 1);
%this.addField("spawnClass", "TypeString", "Spawn Class", "");
%this.addField("spawnDatablock", "TypeString", "Spawn Data", "");
%this.addField("spawnTransform", "TypeBool", "Spawn Here", "true");
%this.addField("canSaveDynamicFields", "TypeBool", "Save metadata", "false");
%this.process();
}
function ObjectBuilderGui::buildNotesObject(%this)
{
%this.objectClassName = "NotesObject";

View file

@ -87,6 +87,7 @@ function EWCreatorWindow::init( %this )
%this.registerMissionObject( "Portal", "Zone Portal" );
%this.registerMissionObject( "SpawnSphere", "Player Spawn Sphere", "PlayerDropPoint" );
%this.registerMissionObject( "SpawnSphere", "Observer Spawn Sphere", "ObserverDropPoint" );
%this.registerMissionObject( "SpawnSphere", "General Spawn Sphere", "GeneralDropPoint" );
%this.registerMissionObject( "SFXSpace", "Sound Space" );
%this.registerMissionObject( "OcclusionVolume", "Occlusion Volume" );
%this.registerMissionObject( "AccumulationVolume", "Accumulation Volume" );