Makes the graphics menu in the stock UI mostly functional again
Adds sanity check to editing of gameasset script action in asset browser Updates module template file Updates visualizers Fixes checking of popup menu items Adds stub for TerrainMaterialAsset
|
|
@ -32,7 +32,7 @@ function GameConnection::onConnectionAccepted(%this)
|
|||
// datablocks and objects are ghosted over.
|
||||
physicsInitWorld( "client" );
|
||||
|
||||
callOnModules("onCreateClient", "Game");
|
||||
callOnModules("onCreateClientConnection", "Game");
|
||||
}
|
||||
|
||||
function GameConnection::initialControlSet(%this)
|
||||
|
|
@ -134,5 +134,5 @@ function disconnectedCleanup()
|
|||
// We can now delete the client physics simulation.
|
||||
physicsDestroyWorld( "client" );
|
||||
|
||||
callOnModules("onDestroyClient", "Game");
|
||||
callOnModules("onDestroyClientConnection", "Game");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -140,6 +140,9 @@ function parseMissionGroupForIds( %className, %childGroup )
|
|||
else
|
||||
%currentGroup = %childGroup;
|
||||
|
||||
if(!isObject(%currentGroup))
|
||||
return "";
|
||||
|
||||
for(%i = 0; %i < (%currentGroup).getCount(); %i++)
|
||||
{
|
||||
if( (%currentGroup).getObject(%i).getClassName() $= %className )
|
||||
|
|
|
|||
|
|
@ -242,6 +242,7 @@ function destroyServer()
|
|||
|
||||
//Get our modules so we can exec any specific server-side loading/handling
|
||||
callOnModules("onDestroyGameServer", "Game");
|
||||
callOnModules("onDestroyGameServer", "Core");
|
||||
|
||||
// Save any server settings
|
||||
%prefPath = getPrefpath();
|
||||
|
|
|
|||
|
|
@ -0,0 +1,143 @@
|
|||
datablock ReflectorDesc( DefaultCubeDesc )
|
||||
{
|
||||
texSize = 256;
|
||||
nearDist = 0.1;
|
||||
farDist = 1000.0;
|
||||
objectTypeMask = 0xFFFFFFFF;
|
||||
detailAdjust = 1.0;
|
||||
priority = 1.0;
|
||||
maxRateMs = 15;
|
||||
useOcclusionQuery = true;
|
||||
};
|
||||
|
||||
datablock ParticleEmitterNodeData(DefaultEmitterNodeData)
|
||||
{
|
||||
timeMultiple = 1;
|
||||
};
|
||||
|
||||
|
||||
datablock ParticleData(DefaultParticle)
|
||||
{
|
||||
textureName = "core/gameObjects/images/defaultParticle";
|
||||
dragCoefficient = 0.498534;
|
||||
gravityCoefficient = 0;
|
||||
inheritedVelFactor = 0.499022;
|
||||
constantAcceleration = 0.0;
|
||||
lifetimeMS = 1313;
|
||||
lifetimeVarianceMS = 500;
|
||||
useInvAlpha = true;
|
||||
spinRandomMin = -360;
|
||||
spinRandomMax = 360;
|
||||
spinSpeed = 1;
|
||||
|
||||
colors[0] = "0.992126 0.00787402 0.0314961 1";
|
||||
colors[1] = "1 0.834646 0 0.645669";
|
||||
colors[2] = "1 0.299213 0 0.330709";
|
||||
colors[3] = "0.732283 1 0 0";
|
||||
|
||||
sizes[0] = 0;
|
||||
sizes[1] = 0.497467;
|
||||
sizes[2] = 0.73857;
|
||||
sizes[3] = 0.997986;
|
||||
|
||||
times[0] = 0.0;
|
||||
times[1] = 0.247059;
|
||||
times[2] = 0.494118;
|
||||
times[3] = 1;
|
||||
|
||||
animTexName = "core/gameObjects/images/defaultParticle";
|
||||
};
|
||||
|
||||
datablock ParticleEmitterData(DefaultEmitter)
|
||||
{
|
||||
ejectionPeriodMS = "50";
|
||||
ejectionVelocity = "1";
|
||||
velocityVariance = "0";
|
||||
ejectionOffset = "0.2";
|
||||
thetaMax = "40";
|
||||
particles = "DefaultParticle";
|
||||
blendStyle = "ADDITIVE";
|
||||
softParticles = "0";
|
||||
softnessDistance = "1";
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// DefaultTrigger is used by the mission editor. This is also an example
|
||||
// of trigger methods and callbacks.
|
||||
|
||||
datablock TriggerData(DefaultTrigger)
|
||||
{
|
||||
// The period is value is used to control how often the console
|
||||
// onTriggerTick callback is called while there are any objects
|
||||
// in the trigger. The default value is 100 MS.
|
||||
tickPeriodMS = 100;
|
||||
};
|
||||
|
||||
datablock TriggerData(ClientTrigger : DefaultTrigger)
|
||||
{
|
||||
clientSide = true;
|
||||
};
|
||||
|
||||
datablock RibbonNodeData(DefaultRibbonNodeData)
|
||||
{
|
||||
timeMultiple = 1.0;
|
||||
};
|
||||
|
||||
//ribbon data////////////////////////////////////////
|
||||
|
||||
datablock RibbonData(BasicRibbon)
|
||||
{
|
||||
size[0] = 0.5;
|
||||
color[0] = "1.0 0.0 0.0 1.0";
|
||||
position[0] = 0.0;
|
||||
|
||||
size[1] = 0.0;
|
||||
color[1] = "1.0 0.0 0.0 0.0";
|
||||
position[1] = 1.0;
|
||||
|
||||
RibbonLength = 40;
|
||||
fadeAwayStep = 0.1;
|
||||
UseFadeOut = true;
|
||||
RibbonMaterial = BasicRibbonMat;
|
||||
|
||||
category = "FX";
|
||||
};
|
||||
|
||||
datablock RibbonData(TexturedRibbon)
|
||||
{
|
||||
RibbonMaterial = TexturedRibbonMat;
|
||||
size[0] = 0.5;
|
||||
color[0] = "1.0 1.0 1.0 1.0";
|
||||
position[0] = 0.0;
|
||||
|
||||
size[1] = 0.5;
|
||||
color[1] = "1.0 1.0 1.0 1.0";
|
||||
position[1] = 1.0;
|
||||
|
||||
RibbonLength = 40;
|
||||
fadeAwayStep = 0.1;
|
||||
UseFadeOut = true;
|
||||
tileScale = 1;
|
||||
fixedTexCoords = true;
|
||||
TexcoordsRelativeToDistance = true;
|
||||
|
||||
category = "FX";
|
||||
};
|
||||
|
||||
datablock MissionMarkerData(WayPointMarker)
|
||||
{
|
||||
category = "Misc";
|
||||
shapeFile = "core/gameObjects/shapes/octahedron.dts";
|
||||
};
|
||||
|
||||
datablock MissionMarkerData(SpawnSphereMarker)
|
||||
{
|
||||
category = "Misc";
|
||||
shapeFile = "core/gameObjects/shapes/octahedron.dts";
|
||||
};
|
||||
|
||||
datablock MissionMarkerData(CameraBookmarkMarker)
|
||||
{
|
||||
category = "Misc";
|
||||
shapeFile = "core/gameObjects/shapes/camera.dts";
|
||||
};
|
||||
BIN
Templates/BaseGame/game/core/gameObjects/images/camera.png
Normal file
|
After Width: | Height: | Size: 142 B |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 223 KiB |
|
After Width: | Height: | Size: 397 KiB |
BIN
Templates/BaseGame/game/core/gameObjects/images/defaultpath.png
Normal file
|
After Width: | Height: | Size: 617 KiB |
|
After Width: | Height: | Size: 404 KiB |
BIN
Templates/BaseGame/game/core/gameObjects/images/green.jpg
Normal file
|
After Width: | Height: | Size: 305 B |
BIN
Templates/BaseGame/game/core/gameObjects/images/ribTex.png
Normal file
|
After Width: | Height: | Size: 109 KiB |
|
|
@ -0,0 +1,78 @@
|
|||
new ShaderData( BasicRibbonShader )
|
||||
{
|
||||
DXVertexShaderFile = $Core::CommonShaderPath @ "/ribbons/basicRibbonShaderV.hlsl";
|
||||
DXPixelShaderFile = $Core::CommonShaderPath @ "/ribbons/basicRibbonShaderP.hlsl";
|
||||
|
||||
OGLVertexShaderFile = $Core::CommonShaderPath @ "/ribbons/gl/basicRibbonShaderV.glsl";
|
||||
OGLPixelShaderFile = $Core::CommonShaderPath @ "/ribbons/gl/basicRibbonShaderP.glsl";
|
||||
|
||||
samplerNames[0] = "$ribTex";
|
||||
|
||||
pixVersion = 2.0;
|
||||
};
|
||||
|
||||
singleton CustomMaterial( BasicRibbonMat )
|
||||
{
|
||||
shader = BasicRibbonShader;
|
||||
version = 2.0;
|
||||
|
||||
emissive[0] = true;
|
||||
|
||||
doubleSided = true;
|
||||
translucent = true;
|
||||
BlendOp = AddAlpha;
|
||||
translucentBlendOp = AddAlpha;
|
||||
|
||||
preload = true;
|
||||
};
|
||||
|
||||
new ShaderData( TexturedRibbonShader )
|
||||
{
|
||||
DXVertexShaderFile = $Core::CommonShaderPath @ "/ribbons/texRibbonShaderV.hlsl";
|
||||
DXPixelShaderFile = $Core::CommonShaderPath @ "/ribbons/texRibbonShaderP.hlsl";
|
||||
|
||||
OGLVertexShaderFile = $Core::CommonShaderPath @ "/ribbons/gl/texRibbonShaderV.glsl";
|
||||
OGLPixelShaderFile = $Core::CommonShaderPath @ "/ribbons/gl/texRibbonShaderP.glsl";
|
||||
|
||||
samplerNames[0] = "$ribTex";
|
||||
|
||||
pixVersion = 2.0;
|
||||
};
|
||||
|
||||
singleton CustomMaterial( TexturedRibbonMat )
|
||||
{
|
||||
shader = TexturedRibbonShader;
|
||||
version = 2.0;
|
||||
|
||||
emissive[0] = true;
|
||||
|
||||
doubleSided = true;
|
||||
translucent = true;
|
||||
BlendOp = AddAlpha;
|
||||
translucentBlendOp = AddAlpha;
|
||||
|
||||
sampler["ribTex"] = "core/gameObjects/images/ribTex.png";
|
||||
|
||||
preload = true;
|
||||
};
|
||||
|
||||
singleton Material(DefaultDecalRoadMaterial)
|
||||
{
|
||||
diffuseMap[0] = "core/gameObjects/images/defaultRoadTextureTop.png";
|
||||
mapTo = "unmapped_mat";
|
||||
materialTag0 = "RoadAndPath";
|
||||
};
|
||||
|
||||
singleton Material(DefaultRoadMaterialTop)
|
||||
{
|
||||
mapTo = "unmapped_mat";
|
||||
diffuseMap[0] = "core/gameObjects/images/defaultRoadTextureTop.png";
|
||||
materialTag0 = "RoadAndPath";
|
||||
};
|
||||
|
||||
singleton Material(DefaultRoadMaterialOther)
|
||||
{
|
||||
mapTo = "unmapped_mat";
|
||||
diffuseMap[0] = "core/gameObjects/images/defaultRoadTextureOther.png";
|
||||
materialTag0 = "RoadAndPath";
|
||||
};
|
||||
BIN
Templates/BaseGame/game/core/gameObjects/shapes/camera.dts
Normal file
112
Templates/BaseGame/game/core/gameObjects/shapes/materials.cs
Normal file
|
|
@ -0,0 +1,112 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Copyright (c) 2012 GarageGames, LLC
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to
|
||||
// deal in the Software without restriction, including without limitation the
|
||||
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
// sell copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
// IN THE SOFTWARE.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
singleton Material(OctahedronMat)
|
||||
{
|
||||
mapTo = "green";
|
||||
|
||||
diffuseMap[0] = "core/gameObjects/images/camera";
|
||||
|
||||
translucent = "1";
|
||||
translucentBlendOp = "LerpAlpha";
|
||||
emissive = "0";
|
||||
castShadows = "0";
|
||||
|
||||
colorMultiply[0] = "0 1 0 1";
|
||||
};
|
||||
|
||||
//--- camera.dts MATERIALS BEGIN ---
|
||||
singleton Material(CameraMat)
|
||||
{
|
||||
mapTo = "pasted__phongE1";
|
||||
|
||||
diffuseMap[0] = "core/gameObjects/images/camera";
|
||||
|
||||
diffuseColor[0] = "0 0.627451 1 1";
|
||||
specular[0] = "1 1 1 1";
|
||||
specularPower[0] = 211;
|
||||
pixelSpecular[0] = 1;
|
||||
emissive[0] = 1;
|
||||
|
||||
doubleSided = 1;
|
||||
translucent = true;
|
||||
translucentBlendOp = "LerpAlpha";
|
||||
castShadows = false;
|
||||
materialTag0 = "Miscellaneous";
|
||||
};
|
||||
|
||||
//--- camera.dts MATERIALS END ---
|
||||
//--- noshape.dts MATERIALS BEGIN ---
|
||||
singleton Material(noshape_NoShape)
|
||||
{
|
||||
mapTo = "NoShape";
|
||||
|
||||
diffuseMap[0] = "";
|
||||
|
||||
diffuseColor[0] = "0.8 0.003067 0 .8";
|
||||
emissive[0] = 0;
|
||||
|
||||
doubleSided = false;
|
||||
translucent = 1;
|
||||
translucentBlendOp = "LerpAlpha";
|
||||
castShadows = false;
|
||||
};
|
||||
|
||||
//--- noshape.dts MATERIALS END ---
|
||||
|
||||
//--- noshapetext.dae MATERIALS BEGIN ---
|
||||
singleton Material(noshapetext_lambert1)
|
||||
{
|
||||
mapTo = "lambert1";
|
||||
|
||||
diffuseMap[0] = "";
|
||||
|
||||
diffuseColor[0] = "0.4 0.4 0.4 1";
|
||||
specular[0] = "1 1 1 1";
|
||||
specularPower[0] = 8;
|
||||
pixelSpecular[0] = false;
|
||||
emissive[0] = true;
|
||||
|
||||
doubleSided = false;
|
||||
translucent = false;
|
||||
translucentBlendOp = "None";
|
||||
};
|
||||
|
||||
singleton Material(noshapetext_noshape_mat)
|
||||
{
|
||||
mapTo = "noshape_mat";
|
||||
|
||||
diffuseMap[0] = "";
|
||||
|
||||
diffuseColor[0] = "0.4 0.3504 0.363784 0.33058";
|
||||
specular[0] = "1 1 1 1";
|
||||
specularPower[0] = 8;
|
||||
pixelSpecular[0] = false;
|
||||
emissive[0] = true;
|
||||
|
||||
doubleSided = false;
|
||||
translucent = true;
|
||||
translucentBlendOp = "None";
|
||||
};
|
||||
|
||||
//--- noshapetext.dae MATERIALS END ---
|
||||
|
||||