Include materialball shape asset info
Includes spectatorGameplay by default for streamline testing for now Adds in reparentItem for GuiTreeViewCtrl Added gitignore to shaderCache/.gitignore Fixed material asset import logic to properly parent included images to the material Includes D3D_Compiler47.dll for dependency compliance, and modified cmake file to not install said dll if not using D3D11 API
|
|
@ -16,4 +16,9 @@ singleton Material(Grid_512_Orange)
|
|||
specularPower0 = "0.25";
|
||||
emissive[0] = "1";
|
||||
translucent = "1";
|
||||
normalMap[0] = "data/pbr/images/FloorEbony_normal.png";
|
||||
invertSmoothness[0] = "1";
|
||||
roughMap[0] = "data/pbr/images/FloorEbony_rough.png";
|
||||
aoMap[0] = "data/pbr/images/FloorEbony_ao.png";
|
||||
metalMap[0] = "data/pbr/images/FloorEbony_metal.png";
|
||||
};
|
||||
|
|
|
|||
|
|
@ -0,0 +1,9 @@
|
|||
<ImageAsset
|
||||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="base_material_ball_ALBEDO"
|
||||
imageFile="@assetFile=base_material_ball"
|
||||
useMips="true"
|
||||
isHDRImage="false"
|
||||
originalFilePath="/base_material_ball"
|
||||
VersionId="1" />
|
||||
|
|
@ -86,7 +86,7 @@ new Scene(PbrMatTestLevel) {
|
|||
surfaceTexture = "Floor_Material";
|
||||
surface = "0 0 0 1 0 0 0.5 1 0 0 1 1 0 1 1";
|
||||
surface = "0 1 0 0 0 0 -0.5 1 0 0 1 1 0 1 1";
|
||||
surface = "0.707107 0 0 0.707107 0 4 0 1 0 0 1 1 0 1 1";
|
||||
surface = "0.707107 0 0 0.707106 0 4 0 1 0 0 1 1 0 1 1";
|
||||
surface = "0 0.707107 -0.707107 0 0 -4 -2.27374e-13 1 0 0 1 1 0 1 1";
|
||||
surface = "0.5 0.5 -0.5 0.5 -4 0 -1.49012e-08 1 0 0 1 1 0 1 1";
|
||||
surface = "0.5 -0.5 0.5 0.5 4 0 -1.49012e-08 1 0 0 1 1 0 1 1";
|
||||
|
|
@ -256,5 +256,20 @@ new Scene(PbrMatTestLevel) {
|
|||
canSave = "1";
|
||||
canSaveDynamicFields = "1";
|
||||
};
|
||||
/*new ConvexShape() {
|
||||
Material = "Grid_512_Orange";
|
||||
position = "1.69488 -1.65352 0.772905";
|
||||
rotation = "1 0 0 0";
|
||||
scale = "1 1 1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "1";
|
||||
|
||||
surface = "0 0 0 1 0 0 0.272904 0 0 0 1 1 0 0 0";
|
||||
surface = "0 1 0 0 0 0 -0.272904 0 0 0 1 1 0 0 0";
|
||||
surface = "0.707107 0 0 0.707107 0 0.05 0 0 0 0 1 1 0 0 0";
|
||||
surface = "0 0.707107 -0.707107 0 0 -0.05 0 0 0 0 1 1 0 0 0";
|
||||
surface = "0.5 0.5 -0.5 0.5 -0.370958 0 0 0 0 0 1 1 0 0 0";
|
||||
surface = "0.5 -0.5 0.5 0.5 0.370958 0 0 0 0 0 1 1 0 0 0";
|
||||
};*/
|
||||
};
|
||||
//--- OBJECT WRITE END ---
|
||||
|
|
|
|||
|
|
@ -0,0 +1,10 @@
|
|||
<MaterialAsset
|
||||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="base_material_ball"
|
||||
scriptFile="@assetFile=data/pbr/materials/base_material_ball.cs"
|
||||
materialDefinitionName="base_material_ball"
|
||||
imageMap0="@Asset=pbr:base_material_ball_ALBEDO"
|
||||
originalFilePath="/base_material_ball"
|
||||
shaderGraph="data/pbr/materials/base_material_ball.sgf"
|
||||
VersionId="1" />
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
//--- OBJECT WRITE BEGIN ---
|
||||
singleton Material(base_material_ball) {
|
||||
mapTo = "base_material_ball";
|
||||
DiffuseMap[0] = "data/pbr/Images/base_material_ball";
|
||||
DiffuseMapAsset[0] = "pbr:base_material_ball_ALBEDO";
|
||||
};
|
||||
//--- OBJECT WRITE END ---
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
<ShapeAsset
|
||||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="material_ball"
|
||||
fileName="@assetFile=material_ball.dae"
|
||||
isNewShape="1"
|
||||
materialSlot0="@Asset=pbr:base_material_ball"
|
||||
originalFilePath="E:/Gamedev/T3DMIT/Preview40Update/Torque3D/My Projects/Preview4_0/game/data/pbr/shapes/material_ball.dae"
|
||||
VersionId="1" />
|
||||
5
Templates/BaseGame/game/data/pbr/shapes/material_ball.cs
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
|
||||
singleton TSShapeConstructor(Material_ballDae)
|
||||
{
|
||||
baseShape = "./material_ball.dae";
|
||||
};
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
*.hlsl
|
||||
*.glsl
|
||||
*.h
|
||||
|
|
@ -0,0 +1,69 @@
|
|||
|
||||
// The general flow of a gane - server's creation, loading and hosting clients, and then destruction is as follows:
|
||||
|
||||
// First, a client will always create a server in the event that they want to host a single player
|
||||
// game. Torque3D treats even single player connections as a soft multiplayer game, with some stuff
|
||||
// in the networking short-circuited to sidestep around lag and packet transmission times.
|
||||
|
||||
// initServer() is called, loading the default server scripts.
|
||||
// After that, if this is a dedicated server session, initDedicated() is called, otherwise initClient is called
|
||||
// to prep a playable client session.
|
||||
|
||||
// When a local game is started - a listen server - via calling StartGame() a server is created and then the client is
|
||||
// connected to it via createAndConnectToLocalServer().
|
||||
|
||||
function SpectatorGameplay::create( %this )
|
||||
{
|
||||
//server scripts
|
||||
exec("./scripts/server/camera.cs");
|
||||
exec("./scripts/server/DefaultGame.cs");
|
||||
exec("./scripts/server/VolumetricFog.cs");
|
||||
|
||||
//add DBs
|
||||
if(isObject(DatablockFilesList))
|
||||
{
|
||||
DatablockFilesList.add( "data/spectatorGameplay/scripts/datablocks/camera.cs" );
|
||||
DatablockFilesList.add( "data/spectatorGameplay/scripts/datablocks/defaultParticle.cs" );
|
||||
DatablockFilesList.add( "data/spectatorGameplay/scripts/datablocks/lights.cs" );
|
||||
DatablockFilesList.add( "data/spectatorGameplay/scripts/datablocks/managedDatablocks.cs" );
|
||||
DatablockFilesList.add( "data/spectatorGameplay/scripts/datablocks/managedDecalData.cs" );
|
||||
DatablockFilesList.add( "data/spectatorGameplay/scripts/datablocks/managedForestItemData.cs" );
|
||||
DatablockFilesList.add( "data/spectatorGameplay/scripts/datablocks/managedParticleData.cs" );
|
||||
DatablockFilesList.add( "data/spectatorGameplay/scripts/datablocks/managedParticleEmitterData.cs" );
|
||||
DatablockFilesList.add( "data/spectatorGameplay/scripts/datablocks/markers.cs" );
|
||||
DatablockFilesList.add( "data/spectatorGameplay/scripts/datablocks/ribbons.cs" );
|
||||
DatablockFilesList.add( "data/spectatorGameplay/scripts/datablocks/sounds.cs" );
|
||||
}
|
||||
|
||||
if(isObject(LevelFilesList))
|
||||
{
|
||||
for( %file = findFirstFile( "data/spectatorGameplay/levels/*.mis" );
|
||||
%file !$= "";
|
||||
%file = findNextFile( "data/spectatorGameplay/levels/*.mis" ))
|
||||
{
|
||||
LevelFilesList.add(%file);
|
||||
}
|
||||
}
|
||||
|
||||
if (!$Server::Dedicated)
|
||||
{
|
||||
//client scripts
|
||||
$KeybindPath = "data/spectatorGameplay/scripts/client/default.keybinds.cs";
|
||||
exec($KeybindPath);
|
||||
|
||||
%prefPath = getPrefpath();
|
||||
if(isFile(%prefPath @ "/keybinds.cs"))
|
||||
exec(%prefPath @ "/keybinds.cs");
|
||||
|
||||
exec("data/spectatorGameplay/scripts/client/inputCommands.cs");
|
||||
|
||||
//guis
|
||||
exec("./scripts/gui/playGui.gui");
|
||||
exec("./scripts/gui/playGui.cs");
|
||||
}
|
||||
}
|
||||
|
||||
function SpectatorGameplay::destroy( %this )
|
||||
{
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
<ModuleDefinition
|
||||
ModuleId="SpectatorGameplay"
|
||||
VersionId="1"
|
||||
Description="Default module for the game."
|
||||
ScriptFile="SpectatorGameplay.cs"
|
||||
CreateFunction="create"
|
||||
DestroyFunction="destroy"
|
||||
Group="Game"
|
||||
Dependencies="UI=1">
|
||||
<DeclaredAssets
|
||||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
Extension="asset.taml"
|
||||
Recurse="true" />
|
||||
</ModuleDefinition>
|
||||
|
|
@ -0,0 +1,177 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<COLLADA xmlns="http://www.collada.org/2005/11/COLLADASchema" version="1.4.1">
|
||||
<asset>
|
||||
<contributor>
|
||||
<author>Richard</author>
|
||||
<authoring_tool>OpenCOLLADA for 3ds Max; Version: 1.4.1; Revision: exported; Platform: x64; Configuration: Release_Max2011_static</authoring_tool>
|
||||
<source_data>file:///G:/Documents%20and%20Settings/Richard/Mijn%20documenten/3dsmax/scenes/FogVolumes.max</source_data>
|
||||
</contributor>
|
||||
<created>2014-08-16T10:10:23</created>
|
||||
<modified>2014-08-16T10:10:23</modified>
|
||||
<unit name="meter" meter="1"/>
|
||||
<up_axis>Z_UP</up_axis>
|
||||
</asset>
|
||||
<library_effects>
|
||||
<effect id="NoMat">
|
||||
<profile_COMMON>
|
||||
<technique sid="common">
|
||||
<blinn>
|
||||
<emission>
|
||||
<color>0 0 0 1</color>
|
||||
</emission>
|
||||
<ambient>
|
||||
<color>0.588 0.588 0.588 1</color>
|
||||
</ambient>
|
||||
<diffuse>
|
||||
<color>0.588 0.588 0.588 1</color>
|
||||
</diffuse>
|
||||
<specular>
|
||||
<color>0.9 0.9 0.9 1</color>
|
||||
</specular>
|
||||
<shininess>
|
||||
<float>0</float>
|
||||
</shininess>
|
||||
<reflective>
|
||||
<color>0 0 0 1</color>
|
||||
</reflective>
|
||||
<transparent opaque="A_ONE">
|
||||
<color>1 1 1 1</color>
|
||||
</transparent>
|
||||
<transparency>
|
||||
<float>1</float>
|
||||
</transparency>
|
||||
</blinn>
|
||||
</technique>
|
||||
</profile_COMMON>
|
||||
<extra>
|
||||
<technique profile="OpenCOLLADA3dsMax">
|
||||
<extended_shader>
|
||||
<apply_reflection_dimming>0</apply_reflection_dimming>
|
||||
<dim_level>0</dim_level>
|
||||
<falloff_type>0</falloff_type>
|
||||
<index_of_refraction>1.5</index_of_refraction>
|
||||
<opacity_type>0</opacity_type>
|
||||
<reflection_level>3</reflection_level>
|
||||
<wire_size>1</wire_size>
|
||||
<wire_units>0</wire_units>
|
||||
</extended_shader>
|
||||
<shader>
|
||||
<ambient_diffuse_lock>1</ambient_diffuse_lock>
|
||||
<ambient_diffuse_texture_lock>1</ambient_diffuse_texture_lock>
|
||||
<diffuse_specular_lock>0</diffuse_specular_lock>
|
||||
<soften>0.1</soften>
|
||||
<use_self_illum_color>0</use_self_illum_color>
|
||||
</shader>
|
||||
</technique>
|
||||
</extra>
|
||||
</effect>
|
||||
</library_effects>
|
||||
<library_materials>
|
||||
<material id="NoMat-material" name="NoMat">
|
||||
<instance_effect url="#NoMat"/>
|
||||
</material>
|
||||
</library_materials>
|
||||
<library_geometries>
|
||||
<geometry id="geom-FogCube1" name="FogCube1">
|
||||
<mesh>
|
||||
<source id="geom-FogCube1-positions">
|
||||
<float_array id="geom-FogCube1-positions-array" count="72">-0.85 -1 -0.85 0.85 -0.85 -1 -1 0.85 -0.85 0.85 0.85 -1 -0.85 -1 0.85 1 -0.85 0.85 -1 0.85 0.85 0.85 1 0.85 -1 -0.85 -0.85 -0.85 -0.85 -1 1 -0.85 -0.85 0.85 -1 -0.85 -0.85 1 -0.85 -0.85 0.85 -1 0.85 1 -0.85 1 0.85 -0.85 -0.85 -0.85 1 -1 -0.85 0.85 0.85 -0.85 1 0.85 -1 0.85 -0.85 0.85 1 -0.85 1 0.85 0.85 0.85 1 1 0.85 0.85</float_array>
|
||||
<technique_common>
|
||||
<accessor source="#geom-FogCube1-positions-array" count="24" stride="3">
|
||||
<param name="X" type="float"/>
|
||||
<param name="Y" type="float"/>
|
||||
<param name="Z" type="float"/>
|
||||
</accessor>
|
||||
</technique_common>
|
||||
</source>
|
||||
<source id="geom-FogCube1-normals">
|
||||
<float_array id="geom-FogCube1-normals-array" count="72">-0.341586 -0.341586 -0.8755786 -0.341586 0.341586 -0.8755788 0.341586 0.341586 -0.8755788 0.341586 -0.341586 -0.8755788 -0.341586 -0.341586 0.8755786 0.341586 -0.341586 0.8755788 0.341586 0.341586 0.8755788 -0.341586 0.341586 0.8755788 -0.341586 -0.8755786 -0.341586 0.341586 -0.8755788 -0.341586 0.341586 -0.8755786 0.341586 -0.341586 -0.8755788 0.341586 0.8755786 -0.341586 -0.341586 0.8755788 0.341586 -0.341586 0.8755786 0.341586 0.341586 0.8755788 -0.341586 0.341586 0.341586 0.8755786 -0.341586 -0.341586 0.8755788 -0.341586 -0.341586 0.8755786 0.341586 0.341586 0.8755788 0.341586 -0.8755786 0.341586 -0.341586 -0.8755788 -0.341586 -0.341586 -0.8755786 -0.341586 0.341586 -0.8755788 0.341586 0.341586</float_array>
|
||||
<technique_common>
|
||||
<accessor source="#geom-FogCube1-normals-array" count="24" stride="3">
|
||||
<param name="X" type="float"/>
|
||||
<param name="Y" type="float"/>
|
||||
<param name="Z" type="float"/>
|
||||
</accessor>
|
||||
</technique_common>
|
||||
</source>
|
||||
<source id="geom-FogCube1-map1">
|
||||
<float_array id="geom-FogCube1-map1-array" count="228">0 0 0 1 0 0 0 1 0 1 1 0 0 0 0 1 0 0 0 1 0 1 1 0 0 0 0 1 0 0 0 1 0 1 1 0 0.07542458 0.07542461 4.99755e-4 0.07542479 0.07542461 4.99547e-4 0.07542455 0.07542461 4.99755e-4 0.07542461 0.9245752 4.99547e-4 0.07542458 0.9245754 4.99755e-4 0.07542458 0.9245754 0.9995003 0.07542455 0.9245754 4.99755e-4 0.07542455 0.9245754 0.9995003 0.9245752 0.07542461 4.99576e-4 0.9245754 0.07542479 4.99547e-4 0.07542458 0.07542461 0.9995003 0.9245752 0.07542461 4.99576e-4 0.9245752 0.07542461 0.9995004 0.9245752 0.9245754 4.99547e-4 0.07542455 0.07542461 0.9995003 0.9245752 0.07542461 0.9995004 0.07542461 0.07542479 0.9995005 0.9245752 0.9245754 4.99576e-4 0.9245752 0.07542461 0.9995005 0.9245752 0.9245754 4.99576e-4 0.07542479 0.9245754 0.9995005 0.9245752 0.9245754 0.9995004 0.9245754 0.9245752 0.9995005 0.9245752 0.9245754 0.9995004 0.9995003 0.07542461 0.07542458 0.9245752 4.99547e-4 0.07542461 0.9245752 4.99547e-4 0.07542461 0.9995003 0.07542461 0.07542458 0.9995003 0.07542461 0.9245754 0.9245752 4.99547e-4 0.9245754 0.9245752 4.99547e-4 0.9245754 0.9995003 0.07542461 0.9245754 0.9995003 0.9245754 0.07542458 0.9245752 0.9995005 0.07542461 0.9995003 0.9245754 0.07542458 0.9245752 0.9995005 0.07542461 0.9995003 0.9245754 0.9245754 0.9245752 0.9995005 0.9245754 0.9995003 0.9245754 0.9245754 0.9245752 0.9995005 0.9245754 0.9995004 0.07542482 0.07542461 0.9995003 0.9245754 0.07542461 0.9245752 0.9995004 0.07542461 0.07542455 0.9995003 0.07542461 4.99606e-4 0.9245752 0.07542461 4.99725e-4 0.07542458 0.07542461 0.07542479 4.99576e-4 0.07542461 0.9245754 4.99755e-4 0.07542461 0.07542458 4.99755e-4 0.9245754 0.9245752 4.99576e-4 0.9245754 0.9995003 0.07542458 0.9245754 0.9995004 0.9245752 0.9245754 0.9245754 0.9995003 0.9245754 0.07542482 0.9995004 0.9245754 4.99755e-4 0.9245754 0.9245754 4.99576e-4 0.07542482 0.9245754 0.9995003 0.07542461 0.07542458 0.9995003 0.9245754 0.07542458 0.9995003 0.9245754 0.07542458 0.9995003 0.07542461 0.07542458 0.9995003 0.07542461 0.9245754 0.9995003 0.9245754 0.9245754 0.9995003 0.07542461 0.9245754 0.9995003 0.9245754 0.9245754</float_array>
|
||||
<technique_common>
|
||||
<accessor source="#geom-FogCube1-map1-array" count="76" stride="3">
|
||||
<param name="S" type="float"/>
|
||||
<param name="T" type="float"/>
|
||||
<param name="P" type="float"/>
|
||||
</accessor>
|
||||
</technique_common>
|
||||
</source>
|
||||
<source id="geom-FogCube1-map1-textangents">
|
||||
<float_array id="geom-FogCube1-map1-textangents-array" count="192">-0.8644259 0.01841655 0.3300502 -0.8715108 -0.05526615 0.3184382 -0.8644259 0.01841664 -0.3300501 -0.8715108 -0.05526611 -0.3184382 0.8738725 -0.06754867 0.3145678 0.8597026 -0.006149054 -0.3377912 0.8738725 -0.06754874 -0.3145678 0.8597026 -0.006148929 0.3377911 0.883319 -0.2990854 -0.116681 0.8478944 0.3571441 -0.06756432 0.8597026 0.3377913 0.00614921 0.883319 -0.2990854 0.116681 0.2990854 0.883319 -0.116681 -0.3571441 0.8478944 -0.06756432 -0.3377913 0.8597026 0.00614921 0.2990854 0.883319 0.116681 -0.883319 0.2990854 -0.116681 -0.8478944 -0.3571441 -0.06756432 -0.8597026 -0.3377913 0.00614921 -0.883319 0.2990854 0.116681 -0.2990854 -0.883319 -0.116681 0.3571441 -0.8478944 -0.06756432 0.3377913 -0.8597026 0.00614921 -0.2990854 -0.883319 0.116681 0.8360862 -0.3764972 0.1289794 0.7071068 -0.7071068 0 0.7071068 0.7071068 0 0.3764972 0.8360862 0.1289794 -0.3764972 -0.8360862 0.1289794 -0.7071068 -0.7071068 0 -0.7071068 0.7071068 0 -0.8360862 0.3764972 0.1289794 0.8360862 -0.3764971 -0.1289794 0.7071068 -0.7071068 0 0.3764971 0.8360862 -0.1289794 0.7071068 0.7071068 0 -0.3764971 -0.8360862 -0.1289794 -0.7071068 -0.7071068 0 -0.8360862 0.3764971 -0.1289794 -0.7071068 0.7071068 0 -0.376497 0.1289792 0.8360862 -0.3764973 -0.1289798 0.8360861 -0.8833191 -0.2990855 0.1166808 -0.883319 0.2990853 -0.1166812 -0.3764971 0.1289794 -0.8360862 -0.3764972 -0.1289795 -0.8360862 -0.8833191 -0.2990855 -0.1166807 -0.883319 0.2990853 0.1166812 0.883319 -0.2990853 0.1166812 0.8833191 0.2990855 -0.1166807 0.3764971 0.1289797 -0.8360862 0.3764971 -0.1289793 -0.8360862 0.883319 -0.2990853 -0.1166811 0.8833191 0.2990855 0.1166808 0.3764972 0.1289799 0.8360861 0.3764971 -0.128979 0.8360862 0.3764972 0.8360862 0.1289794 0.3764971 0.8360862 -0.1289794 0.8360862 -0.3764971 -0.1289794 0.8360862 -0.3764972 0.1289794 -0.8360862 0.3764972 0.1289794 -0.8360862 0.3764971 -0.1289794 -0.3764972 -0.8360862 0.1289794 -0.3764971 -0.8360862 -0.1289794</float_array>
|
||||
<technique_common>
|
||||
<accessor source="#geom-FogCube1-map1-textangents-array" count="64" stride="3">
|
||||
<param name="X" type="float"/>
|
||||
<param name="Y" type="float"/>
|
||||
<param name="Z" type="float"/>
|
||||
</accessor>
|
||||
</technique_common>
|
||||
</source>
|
||||
<source id="geom-FogCube1-map1-texbinormals">
|
||||
<float_array id="geom-FogCube1-map1-texbinormals-array" count="192">0.1043954 -0.9396398 0.3258505 -0.06496345 -0.9379679 -0.3405817 0.1043953 -0.9396398 -0.3258505 -0.06496349 -0.937968 0.3405817 0.05187585 -0.9370471 -0.3453283 -0.1307439 -0.939827 -0.3156443 0.05187577 -0.9370471 0.3453283 -0.1307438 -0.939827 0.3156443 0 0.3634471 -0.9316148 -0.196368 0.2889368 -0.9369926 0.1307441 -0.3156442 -0.939827 0 -0.3634471 -0.9316148 -0.3634471 0 -0.9316148 -0.2889368 -0.196368 -0.9369926 0.3156442 0.1307441 -0.939827 0.3634471 0 -0.9316148 0 -0.3634471 -0.9316148 0.196368 -0.2889368 -0.9369926 -0.1307441 0.3156442 -0.939827 0 0.3634471 -0.9316148 0.3634471 0 -0.9316148 0.2889368 0.196368 -0.9369926 -0.3156442 -0.1307441 -0.939827 -0.3634471 0 -0.9316148 0.2608475 0.2608475 -0.9294714 0.6191276 0.6191276 -0.4830755 -0.6191276 0.6191276 -0.4830755 -0.2608475 0.2608475 -0.9294714 0.2608475 -0.2608475 -0.9294714 0.6191276 -0.6191276 -0.4830755 -0.6191276 -0.6191276 -0.4830755 -0.2608475 -0.2608475 -0.9294714 -0.2608475 -0.2608475 -0.9294714 -0.6191276 -0.6191276 -0.4830755 0.2608475 -0.2608475 -0.9294714 0.6191276 -0.6191276 -0.4830755 -0.2608475 0.2608475 -0.9294714 -0.6191276 0.6191276 -0.4830755 0.2608475 0.2608475 -0.9294714 0.6191276 0.6191276 -0.4830755 0.2608476 -0.9294715 0.2608473 -0.2608474 -0.9294714 -0.2608479 1.81809e-7 -0.363447 -0.9316149 2.27262e-7 -0.3634472 -0.9316148 0.2608475 -0.9294714 -0.2608475 -0.2608475 -0.9294714 0.2608477 2.72714e-7 -0.363447 0.9316149 2.72714e-7 -0.3634472 0.9316148 2.72714e-7 -0.3634472 -0.9316148 2.72714e-7 -0.363447 -0.9316149 -0.2608474 -0.9294714 -0.2608478 0.2608476 -0.9294714 0.2608474 1.81809e-7 -0.3634472 0.9316148 2.27262e-7 -0.3634471 0.9316149 -0.2608473 -0.9294714 0.260848 0.2608477 -0.9294715 -0.2608472 -0.2608475 0.2608475 -0.9294714 0.2608475 -0.2608475 -0.9294714 -0.2608475 -0.2608475 -0.9294714 0.2608475 0.2608475 -0.9294714 -0.2608475 -0.2608475 -0.9294714 0.2608475 0.2608475 -0.9294714 0.2608475 -0.2608475 -0.9294714 -0.2608475 0.2608475 -0.9294714</float_array>
|
||||
<technique_common>
|
||||
<accessor source="#geom-FogCube1-map1-texbinormals-array" count="64" stride="3">
|
||||
<param name="X" type="float"/>
|
||||
<param name="Y" type="float"/>
|
||||
<param name="Z" type="float"/>
|
||||
</accessor>
|
||||
</technique_common>
|
||||
</source>
|
||||
<vertices id="geom-FogCube1-vertices">
|
||||
<input semantic="POSITION" source="#geom-FogCube1-positions"/>
|
||||
</vertices>
|
||||
<triangles material="NoMat" count="44">
|
||||
<input semantic="VERTEX" source="#geom-FogCube1-vertices" offset="0"/>
|
||||
<input semantic="NORMAL" source="#geom-FogCube1-normals" offset="1"/>
|
||||
<input semantic="TEXCOORD" source="#geom-FogCube1-map1" offset="2" set="0"/>
|
||||
<input semantic="TEXTANGENT" source="#geom-FogCube1-map1-textangents" offset="3" set="1"/>
|
||||
<input semantic="TEXBINORMAL" source="#geom-FogCube1-map1-texbinormals" offset="3" set="1"/>
|
||||
<p>9 0 21 0 13 1 25 1 3 2 15 2 3 2 15 2 1 3 13 3 9 0 21 0 16 4 28 4 18 5 30 5 22 6 34 6 22 6 34 6 20 7 32 7 16 4 28 4 0 8 12 8 11 9 23 9 19 10 31 10 19 10 31 10 4 11 16 11 0 8 12 8 10 12 22 12 15 13 27 13 23 14 35 14 23 14 35 14 5 15 17 15 10 12 22 12 14 16 26 16 12 17 24 17 21 18 33 18 21 18 33 18 7 19 19 19 14 16 26 16 2 20 14 20 8 21 20 21 17 22 29 22 17 22 29 22 6 23 18 23 2 20 14 20 0 8 36 24 8 21 20 21 9 0 37 25 1 3 38 26 10 12 39 27 11 9 23 9 2 20 40 28 12 17 24 17 13 1 41 29 3 2 42 30 14 16 43 31 15 13 27 13 4 11 44 32 16 4 45 33 17 22 29 22 5 15 46 34 18 5 47 35 19 10 31 10 6 23 48 36 20 7 49 37 21 18 33 18 7 19 50 38 22 6 51 39 23 14 35 14 9 0 21 0 8 21 52 40 2 20 53 41 2 20 53 41 13 1 25 1 9 0 21 0 13 1 25 1 12 17 54 42 14 16 55 43 14 16 55 43 3 2 15 2 13 1 25 1 3 2 15 2 15 13 56 44 10 12 57 45 10 12 57 45 1 3 13 3 3 2 15 2 1 3 13 3 11 9 58 46 0 8 59 47 0 8 59 47 9 0 21 0 1 3 13 3 16 4 28 4 4 11 60 48 19 10 61 49 19 10 61 49 18 5 30 5 16 4 28 4 18 5 30 5 5 15 62 50 23 14 63 51 23 14 63 51 22 6 34 6 18 5 30 5 22 6 34 6 7 19 64 52 21 18 65 53 21 18 65 53 20 7 32 7 22 6 34 6 20 7 32 7 6 23 66 54 17 22 67 55 17 22 67 55 16 4 28 4 20 7 32 7 11 9 23 9 10 12 68 56 5 15 69 57 5 15 69 57 19 10 31 10 11 9 23 9 4 11 70 58 17 22 29 22 8 21 20 21 8 21 20 21 0 8 71 59 4 11 70 58 15 13 27 13 14 16 72 60 7 19 73 61 7 19 73 61 23 14 35 14 15 13 27 13 12 17 24 17 2 20 74 62 6 23 75 63 6 23 75 63 21 18 33 18 12 17 24 17</p>
|
||||
</triangles>
|
||||
</mesh>
|
||||
</geometry>
|
||||
</library_geometries>
|
||||
<library_lights>
|
||||
<light id="EnvironmentAmbientLight" name="EnvironmentAmbientLight">
|
||||
<technique_common>
|
||||
<ambient>
|
||||
<color>0 0 0</color>
|
||||
</ambient>
|
||||
</technique_common>
|
||||
</light>
|
||||
</library_lights>
|
||||
<library_visual_scenes>
|
||||
<visual_scene id="MaxScene">
|
||||
<node name="EnvironmentAmbientLight">
|
||||
<instance_light url="#EnvironmentAmbientLight"/>
|
||||
</node>
|
||||
<node id="node-FogCube1" name="FogCube1">
|
||||
<instance_geometry url="#geom-FogCube1">
|
||||
<bind_material>
|
||||
<technique_common>
|
||||
<instance_material symbol="NoMat" target="#NoMat-material"/>
|
||||
</technique_common>
|
||||
</bind_material>
|
||||
</instance_geometry>
|
||||
<extra>
|
||||
<technique profile="OpenCOLLADA">
|
||||
<cast_shadows>1</cast_shadows>
|
||||
<primary_visibility>1</primary_visibility>
|
||||
<receive_shadows>1</receive_shadows>
|
||||
<secondary_visibility>1</secondary_visibility>
|
||||
</technique>
|
||||
</extra>
|
||||
</node>
|
||||
</visual_scene>
|
||||
</library_visual_scenes>
|
||||
<scene>
|
||||
<instance_visual_scene url="#MaxScene"/>
|
||||
</scene>
|
||||
</COLLADA>
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
|
||||
singleton TSShapeConstructor(Fog_CubeDAE)
|
||||
{
|
||||
baseShape = "./Fog_Cube.DAE";
|
||||
lodType = "TrailingNumber";
|
||||
neverImport = "env*";
|
||||
loadLights = "0";
|
||||
};
|
||||
|
After Width: | Height: | Size: 4.9 KiB |
|
After Width: | Height: | Size: 303 KiB |
|
After Width: | Height: | Size: 246 KiB |
|
After Width: | Height: | Size: 103 KiB |
|
|
@ -0,0 +1,30 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// 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( Corona_Mat )
|
||||
{
|
||||
emissive = true;
|
||||
translucent = true;
|
||||
mapTo = "corona.png";
|
||||
diffuseMap[0] = "./corona.png";
|
||||
materialTag0 = "FX";
|
||||
};
|
||||
|
After Width: | Height: | Size: 6.2 KiB |
|
After Width: | Height: | Size: 6.4 KiB |
|
After Width: | Height: | Size: 4.5 KiB |
|
After Width: | Height: | Size: 6.1 KiB |
|
After Width: | Height: | Size: 6.5 KiB |
|
After Width: | Height: | Size: 4 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 6.1 KiB |
|
After Width: | Height: | Size: 86 KiB |
|
After Width: | Height: | Size: 6.5 KiB |
|
After Width: | Height: | Size: 118 B |
BIN
Templates/BaseGame/game/data/spectatorGameplay/art/misc/gray.png
Normal file
|
After Width: | Height: | Size: 126 B |
|
|
@ -0,0 +1,17 @@
|
|||
singleton Material(White)
|
||||
{
|
||||
mapTo = "unmapped_mat";
|
||||
diffuseMap[0] = "data/spectatorGameplay/art/misc/white.png";
|
||||
};
|
||||
|
||||
singleton Material(Grid_512_Gray)
|
||||
{
|
||||
mapTo = "unmapped_mat";
|
||||
diffuseMap[0] = "data/spectatorGameplay/art/misc/512_grey.png";
|
||||
};
|
||||
|
||||
singleton Material(Orange512_lines)
|
||||
{
|
||||
mapTo = "unmapped_mat";
|
||||
diffuseMap[0] = "data/spectatorGameplay/art/misc/512_orange_lines.png";
|
||||
};
|
||||
|
After Width: | Height: | Size: 331 KiB |
|
After Width: | Height: | Size: 121 B |
|
After Width: | Height: | Size: 19 KiB |
|
|
@ -0,0 +1,87 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// 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.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
// This material should work fine for uniformly colored ribbons.
|
||||
|
||||
//Basic ribbon shader/////////////////////////////////////////////
|
||||
|
||||
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;
|
||||
};
|
||||
|
||||
// This material can render a texture on top of a ribbon.
|
||||
|
||||
//Texture ribbon shader/////////////////////////////////////////////
|
||||
|
||||
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"] = "data/spectatorGameplay/art/ribbons/ribTex.png";
|
||||
|
||||
preload = true;
|
||||
};
|
||||
|
After Width: | Height: | Size: 223 KiB |
|
After Width: | Height: | Size: 397 KiB |
|
After Width: | Height: | Size: 617 KiB |
|
After Width: | Height: | Size: 404 KiB |
|
|
@ -0,0 +1,42 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// 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(DefaultDecalRoadMaterial)
|
||||
{
|
||||
diffuseMap[0] = "data/spectatorGameplay/art/roads/defaultRoadTextureTop.png";
|
||||
mapTo = "unmapped_mat";
|
||||
materialTag0 = "RoadAndPath";
|
||||
};
|
||||
|
||||
singleton Material(DefaultRoadMaterialTop)
|
||||
{
|
||||
mapTo = "unmapped_mat";
|
||||
diffuseMap[0] = "data/spectatorGameplay/art/roads/defaultRoadTextureTop.png";
|
||||
materialTag0 = "RoadAndPath";
|
||||
};
|
||||
|
||||
singleton Material(DefaultRoadMaterialOther)
|
||||
{
|
||||
mapTo = "unmapped_mat";
|
||||
diffuseMap[0] = "data/spectatorGameplay/art/roads/defaultRoadTextureOther.png";
|
||||
materialTag0 = "RoadAndPath";
|
||||
};
|
||||
1
Templates/BaseGame/game/data/spectatorGameplay/art/shapes/.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
# Keep directory in git repo
|
||||
|
After Width: | Height: | Size: 4.7 KiB |
|
After Width: | Height: | Size: 142 B |
|
After Width: | Height: | Size: 305 B |
|
|
@ -0,0 +1,67 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// 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] = "camera";
|
||||
|
||||
translucent = "1";
|
||||
translucentBlendOp = "LerpAlpha";
|
||||
emissive = "0";
|
||||
castShadows = "0";
|
||||
|
||||
colorMultiply[0] = "0 1 0 1";
|
||||
};
|
||||
|
||||
singleton Material(SimpleConeMat)
|
||||
{
|
||||
mapTo = "blue";
|
||||
|
||||
diffuseMap[0] = "blue";
|
||||
translucent = "0";
|
||||
emissive = "1";
|
||||
castShadows = "0";
|
||||
};
|
||||
|
||||
//--- camera.dts MATERIALS BEGIN ---
|
||||
singleton Material(CameraMat)
|
||||
{
|
||||
mapTo = "pasted__phongE1";
|
||||
|
||||
diffuseMap[0] = "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 ---
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
newmtl simplecone
|
||||
Ka 0 0 0
|
||||
Kd 0 0.501961 0.752941
|
||||
Ks 0 0 0
|
||||
Ni 1
|
||||
Ns 400
|
||||
Tf 1 1 1
|
||||
d 1
|
||||
map_Kd blue.jpg
|
||||
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Torque
|
||||
// Copyright GarageGames, LLC 2011
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
singleton CubemapData( BlankSkyCubemap )
|
||||
{
|
||||
cubeFace[0] = "./skybox_1";
|
||||
cubeFace[1] = "./skybox_2";
|
||||
cubeFace[2] = "./skybox_3";
|
||||
cubeFace[3] = "./skybox_4";
|
||||
cubeFace[4] = "./skybox_5";
|
||||
cubeFace[5] = "./skybox_6";
|
||||
};
|
||||
|
||||
singleton Material( BlankSkyMat )
|
||||
{
|
||||
cubemap = BlankSkyCubemap;
|
||||
};
|
||||
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 72 KiB |
|
After Width: | Height: | Size: 248 KiB |
|
After Width: | Height: | Size: 56 KiB |
|
After Width: | Height: | Size: 2.4 MiB |
|
|
@ -0,0 +1,53 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// 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 CubemapData( NightCubemap )
|
||||
{
|
||||
cubeFace[0] = "./skybox_1";
|
||||
cubeFace[1] = "./skybox_2";
|
||||
cubeFace[2] = "./skybox_3";
|
||||
cubeFace[3] = "./skybox_4";
|
||||
cubeFace[4] = "./skybox_5";
|
||||
cubeFace[5] = "./skybox_6";
|
||||
};
|
||||
|
||||
singleton Material( NightSkyMat )
|
||||
{
|
||||
cubemap = NightCubemap;
|
||||
materialTag0 = "Skies";
|
||||
};
|
||||
|
||||
singleton Material( Moon_Glow_Mat )
|
||||
{
|
||||
baseTex = "./moon_wglow.png";
|
||||
emissive = true;
|
||||
translucent = true;
|
||||
vertColor[ 0 ] = true;
|
||||
};
|
||||
|
||||
singleton Material( Moon_Mat )
|
||||
{
|
||||
baseTex = "./moon_noglow.png";
|
||||
emissive = true;
|
||||
translucent = true;
|
||||
vertColor[ 0 ] = true;
|
||||
};
|
||||
|
After Width: | Height: | Size: 170 KiB |
|
After Width: | Height: | Size: 864 KiB |
|
After Width: | Height: | Size: 251 KiB |
|
After Width: | Height: | Size: 528 KiB |
|
After Width: | Height: | Size: 530 KiB |
|
After Width: | Height: | Size: 500 KiB |
|
After Width: | Height: | Size: 502 KiB |
|
After Width: | Height: | Size: 602 KiB |
|
After Width: | Height: | Size: 390 KiB |
|
After Width: | Height: | Size: 268 B |
|
|
@ -0,0 +1,7 @@
|
|||
<LevelAsset
|
||||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="Empty_Room"
|
||||
LevelFile="data/spectatorGameplay/levels/Empty_Room.mis"
|
||||
LevelDescription="An empty room"
|
||||
VersionId="1" />
|
||||
|
|
@ -0,0 +1,109 @@
|
|||
//--- OBJECT WRITE BEGIN ---
|
||||
new Scene(Empty_RoomLevel) {
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "1";
|
||||
Enabled = "1";
|
||||
|
||||
new LevelInfo(TheLevelInfo) {
|
||||
nearClip = "0.1";
|
||||
visibleDistance = "1000";
|
||||
visibleGhostDistance = "0";
|
||||
decalBias = "0.0015";
|
||||
fogColor = "0.6 0.6 0.7 1";
|
||||
fogDensity = "0";
|
||||
fogDensityOffset = "700";
|
||||
fogAtmosphereHeight = "0";
|
||||
canvasClearColor = "0 0 0 255";
|
||||
ambientLightBlendPhase = "1";
|
||||
ambientLightBlendCurve = "0 0 -1 -1";
|
||||
advancedLightmapSupport = "0";
|
||||
soundDistanceModel = "Linear";
|
||||
class = "DefaultGame";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "1";
|
||||
desc0 = "An empty room ready to be populated with Torque objects.";
|
||||
Enabled = "1";
|
||||
levelName = "Empty Room";
|
||||
};
|
||||
new SkyBox(theSky) {
|
||||
Material = "BlankSkyMat";
|
||||
drawBottom = "1";
|
||||
fogBandHeight = "0";
|
||||
position = "0 0 0";
|
||||
rotation = "1 0 0 0";
|
||||
scale = "1 1 1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "1";
|
||||
};
|
||||
new Sun(theSun) {
|
||||
azimuth = "230.396";
|
||||
elevation = "45";
|
||||
color = "0.968628 0.901961 0.901961 1";
|
||||
ambient = "0.8 0.972549 0.996078 1";
|
||||
brightness = "1";
|
||||
castShadows = "1";
|
||||
staticRefreshFreq = "250";
|
||||
dynamicRefreshFreq = "8";
|
||||
coronaEnabled = "1";
|
||||
coronaScale = "0.5";
|
||||
coronaTint = "1 1 1 1";
|
||||
coronaUseLightColor = "1";
|
||||
flareScale = "1";
|
||||
attenuationRatio = "0 1 1";
|
||||
shadowType = "PSSM";
|
||||
texSize = "1024";
|
||||
overDarkFactor = "3000 2000 1000 250";
|
||||
shadowDistance = "400";
|
||||
shadowSoftness = "0.25";
|
||||
numSplits = "4";
|
||||
logWeight = "0.96";
|
||||
fadeStartDistance = "325";
|
||||
lastSplitTerrainOnly = "0";
|
||||
representedInLightmap = "0";
|
||||
shadowDarkenColor = "0 0 0 -1";
|
||||
includeLightmappedGeometryInShadow = "0";
|
||||
position = "0 0 0";
|
||||
rotation = "1 0 0 0";
|
||||
scale = "1 1 1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "1";
|
||||
};
|
||||
new SimGroup(PlayerDropPoints) {
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "1";
|
||||
Enabled = "1";
|
||||
|
||||
new SpawnSphere(DefaultCameraSpawnSphere) {
|
||||
autoSpawn = "0";
|
||||
spawnTransform = "0";
|
||||
radius = "5";
|
||||
sphereWeight = "1";
|
||||
indoorWeight = "1";
|
||||
outdoorWeight = "1";
|
||||
isAIControlled = "0";
|
||||
dataBlock = "SpawnSphereMarker";
|
||||
position = "0 -23.8079 2";
|
||||
rotation = "1 0 0 0";
|
||||
scale = "1 1 1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "1";
|
||||
Enabled = "1";
|
||||
homingCount = "0";
|
||||
lockCount = "0";
|
||||
};
|
||||
};
|
||||
new GroundPlane() {
|
||||
squareSize = "128";
|
||||
scaleU = "12";
|
||||
scaleV = "12";
|
||||
Material = "Grid_512_Gray";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "1";
|
||||
Enabled = "1";
|
||||
position = "0 0 0";
|
||||
rotation = "1 0 0 0";
|
||||
scale = "1 1 1";
|
||||
};
|
||||
};
|
||||
//--- OBJECT WRITE END ---
|
||||
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
$PostFXManager::Settings::ColorCorrectionRamp = "data/postFX/art/null_color_ramp.png";
|
||||
$PostFXManager::Settings::DOF::BlurCurveFar = "";
|
||||
$PostFXManager::Settings::DOF::BlurCurveNear = "";
|
||||
$PostFXManager::Settings::DOF::BlurMax = "";
|
||||
$PostFXManager::Settings::DOF::BlurMin = "";
|
||||
$PostFXManager::Settings::DOF::EnableAutoFocus = "1";
|
||||
$PostFXManager::Settings::DOF::EnableDOF = "";
|
||||
$PostFXManager::Settings::DOF::FocusRangeMax = "";
|
||||
$PostFXManager::Settings::DOF::FocusRangeMin = "";
|
||||
$PostFXManager::Settings::EnableDOF = "1";
|
||||
$PostFXManager::Settings::EnableSSAO = "1";
|
||||
$PostFXManager::Settings::EnableHDR = "1";
|
||||
$PostFXManager::Settings::EnableLightRays = "0";
|
||||
$PostFXManager::Settings::EnablePostFX = "1";
|
||||
$PostFXManager::Settings::EnableVignette = "1";
|
||||
$PostFXManager::Settings::HDR::adaptRate = "2";
|
||||
$PostFXManager::Settings::HDR::blueShiftColor = "1.05 0.97 1.27";
|
||||
$PostFXManager::Settings::HDR::brightPassThreshold = "1";
|
||||
$PostFXManager::Settings::HDR::enableBloom = "1";
|
||||
$PostFXManager::Settings::HDR::enableBlueShift = "0";
|
||||
$PostFXManager::Settings::HDR::enableToneMapping = "0.346939";
|
||||
$PostFXManager::Settings::HDR::gaussMean = "0";
|
||||
$PostFXManager::Settings::HDR::gaussMultiplier = "0.3";
|
||||
$PostFXManager::Settings::HDR::gaussStdDev = "0.8";
|
||||
$PostFXManager::Settings::HDR::keyValue = "0.18";
|
||||
$PostFXManager::Settings::HDR::minLuminace = "0.001";
|
||||
$PostFXManager::Settings::HDR::whiteCutoff = "1";
|
||||
$PostFXManager::Settings::LightRays::brightScalar = "0.75";
|
||||
$PostFXManager::Settings::LightRays::decay = "1.0";
|
||||
$PostFXManager::Settings::LightRays::density = "0.94";
|
||||
$PostFXManager::Settings::LightRays::numSamples = "40";
|
||||
$PostFXManager::Settings::LightRays::weight = "5.65";
|
||||
$PostFXManager::Settings::SSAO::blurDepthTol = "0.001";
|
||||
$PostFXManager::Settings::SSAO::blurNormalTol = "0.95";
|
||||
$PostFXManager::Settings::SSAO::lDepthMax = "2";
|
||||
$PostFXManager::Settings::SSAO::lDepthMin = "0.2";
|
||||
$PostFXManager::Settings::SSAO::lDepthPow = "0.2";
|
||||
$PostFXManager::Settings::SSAO::lNormalPow = "2";
|
||||
$PostFXManager::Settings::SSAO::lNormalTol = "-0.5";
|
||||
$PostFXManager::Settings::SSAO::lRadius = "1";
|
||||
$PostFXManager::Settings::SSAO::lStrength = "10";
|
||||
$PostFXManager::Settings::SSAO::overallStrength = "2";
|
||||
$PostFXManager::Settings::SSAO::quality = "0";
|
||||
$PostFXManager::Settings::SSAO::sDepthMax = "1";
|
||||
$PostFXManager::Settings::SSAO::sDepthMin = "0.1";
|
||||
$PostFXManager::Settings::SSAO::sDepthPow = "1";
|
||||
$PostFXManager::Settings::SSAO::sNormalPow = "1";
|
||||
$PostFXManager::Settings::SSAO::sNormalTol = "0";
|
||||
$PostFXManager::Settings::SSAO::sRadius = "0.1";
|
||||
$PostFXManager::Settings::SSAO::sStrength = "6";
|
||||
$PostFXManager::Settings::Vignette::VMax = 1.04345;
|
||||
|
After Width: | Height: | Size: 38 KiB |
|
|
@ -0,0 +1,118 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// 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.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
if ( isObject( moveMap ) )
|
||||
moveMap.delete();
|
||||
|
||||
new ActionMap(moveMap);
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Non-remapable binds
|
||||
//------------------------------------------------------------------------------
|
||||
moveMap.bindCmd(keyboard, "escape", "", "Canvas.pushDialog(PauseMenu);");
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Movement Keys
|
||||
//------------------------------------------------------------------------------
|
||||
moveMap.bind( keyboard, a, moveleft );
|
||||
moveMap.bind( keyboard, d, moveright );
|
||||
moveMap.bind( keyboard, left, moveleft );
|
||||
moveMap.bind( keyboard, right, moveright );
|
||||
|
||||
moveMap.bind( keyboard, w, moveforward );
|
||||
moveMap.bind( keyboard, s, movebackward );
|
||||
moveMap.bind( keyboard, up, moveforward );
|
||||
moveMap.bind( keyboard, down, movebackward );
|
||||
|
||||
moveMap.bind( keyboard, e, moveup );
|
||||
moveMap.bind( keyboard, c, movedown );
|
||||
|
||||
moveMap.bind( keyboard, space, jump );
|
||||
moveMap.bind( mouse, xaxis, yaw );
|
||||
moveMap.bind( mouse, yaxis, pitch );
|
||||
|
||||
moveMap.bind( gamepad, thumbrx, "D", "-0.23 0.23", gamepadYaw );
|
||||
moveMap.bind( gamepad, thumbry, "D", "-0.23 0.23", gamepadPitch );
|
||||
moveMap.bind( gamepad, thumblx, "D", "-0.23 0.23", gamePadMoveX );
|
||||
moveMap.bind( gamepad, thumbly, "D", "-0.23 0.23", gamePadMoveY );
|
||||
|
||||
moveMap.bind( gamepad, btn_a, jump );
|
||||
moveMap.bindCmd( gamepad, btn_back, "disconnect();", "" );
|
||||
|
||||
moveMap.bindCmd(gamepad, dpadl, "toggleLightColorViz();", "");
|
||||
moveMap.bindCmd(gamepad, dpadu, "toggleDepthViz();", "");
|
||||
moveMap.bindCmd(gamepad, dpadd, "toggleNormalsViz();", "");
|
||||
moveMap.bindCmd(gamepad, dpadr, "toggleLightSpecularViz();", "");
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Mouse Trigger
|
||||
//------------------------------------------------------------------------------
|
||||
moveMap.bind( mouse, button0, mouseFire );
|
||||
moveMap.bind( mouse, button1, altTrigger );
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Gamepad Trigger
|
||||
//------------------------------------------------------------------------------
|
||||
moveMap.bind(gamepad, triggerr, gamepadFire);
|
||||
moveMap.bind(gamepad, triggerl, gamepadAltTrigger);
|
||||
|
||||
moveMap.bind(keyboard, f, setZoomFOV);
|
||||
moveMap.bind(keyboard, r, toggleZoom);
|
||||
moveMap.bind( gamepad, btn_b, toggleZoom );
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Camera & View functions
|
||||
//------------------------------------------------------------------------------
|
||||
moveMap.bind( keyboard, z, toggleFreeLook );
|
||||
moveMap.bind(keyboard, tab, toggleFirstPerson );
|
||||
moveMap.bind(keyboard, "alt c", toggleCamera);
|
||||
|
||||
moveMap.bind( gamepad, btn_back, toggleCamera );
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Demo recording functions
|
||||
//------------------------------------------------------------------------------
|
||||
moveMap.bind( keyboard, F3, startRecordingDemo );
|
||||
moveMap.bind( keyboard, F4, stopRecordingDemo );
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Helper Functions
|
||||
//------------------------------------------------------------------------------
|
||||
moveMap.bind(keyboard, "F8", dropCameraAtPlayer);
|
||||
moveMap.bind(keyboard, "F7", dropPlayerAtCamera);
|
||||
|
||||
GlobalActionMap.bind(keyboard, "ctrl o", bringUpOptions);
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Debugging Functions
|
||||
//------------------------------------------------------------------------------
|
||||
GlobalActionMap.bind(keyboard, "ctrl F2", showMetrics);
|
||||
GlobalActionMap.bind(keyboard, "ctrl F3", doProfile);
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Misc.
|
||||
//------------------------------------------------------------------------------
|
||||
GlobalActionMap.bind(keyboard, "tilde", toggleConsole);
|
||||
GlobalActionMap.bindCmd(keyboard, "alt k", "cls();","");
|
||||
GlobalActionMap.bindCmd(keyboard, "alt enter", "", "Canvas.attemptFullscreenToggle();");
|
||||
|
|
@ -0,0 +1,426 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// 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.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Non-remapable binds
|
||||
//------------------------------------------------------------------------------
|
||||
function escapeFromGame()
|
||||
{
|
||||
/*if ( $Server::ServerType $= "SinglePlayer" )
|
||||
MessageBoxYesNo( "Exit", "Exit from this Mission?", "disconnect();", "");
|
||||
else
|
||||
MessageBoxYesNo( "Disconnect", "Disconnect from the server?", "disconnect();", "");*/
|
||||
disconnect();
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Movement Keys
|
||||
//------------------------------------------------------------------------------
|
||||
$movementSpeed = 1; // m/s
|
||||
|
||||
function setSpeed(%speed)
|
||||
{
|
||||
if(%speed)
|
||||
$movementSpeed = %speed;
|
||||
}
|
||||
|
||||
function moveleft(%val)
|
||||
{
|
||||
$mvLeftAction = %val * $movementSpeed;
|
||||
}
|
||||
|
||||
function moveright(%val)
|
||||
{
|
||||
$mvRightAction = %val * $movementSpeed;
|
||||
}
|
||||
|
||||
function moveforward(%val)
|
||||
{
|
||||
$mvForwardAction = %val * $movementSpeed;
|
||||
}
|
||||
|
||||
function movebackward(%val)
|
||||
{
|
||||
$mvBackwardAction = %val * $movementSpeed;
|
||||
}
|
||||
|
||||
function moveup(%val)
|
||||
{
|
||||
%object = ServerConnection.getControlObject();
|
||||
|
||||
if(%object.isInNamespaceHierarchy("Camera"))
|
||||
$mvUpAction = %val * $movementSpeed;
|
||||
}
|
||||
|
||||
function movedown(%val)
|
||||
{
|
||||
%object = ServerConnection.getControlObject();
|
||||
|
||||
if(%object.isInNamespaceHierarchy("Camera"))
|
||||
$mvDownAction = %val * $movementSpeed;
|
||||
}
|
||||
|
||||
function turnLeft( %val )
|
||||
{
|
||||
$mvYawRightSpeed = %val ? $Pref::Input::KeyboardTurnSpeed : 0;
|
||||
}
|
||||
|
||||
function turnRight( %val )
|
||||
{
|
||||
$mvYawLeftSpeed = %val ? $Pref::Input::KeyboardTurnSpeed : 0;
|
||||
}
|
||||
|
||||
function panUp( %val )
|
||||
{
|
||||
$mvPitchDownSpeed = %val ? $Pref::Input::KeyboardTurnSpeed : 0;
|
||||
}
|
||||
|
||||
function panDown( %val )
|
||||
{
|
||||
$mvPitchUpSpeed = %val ? $Pref::Input::KeyboardTurnSpeed : 0;
|
||||
}
|
||||
|
||||
function getVerticalMouseAdjustAmount(%val)
|
||||
{
|
||||
%sensitivity = $pref::Input::VertMouseSensitivity;
|
||||
|
||||
// based on a default camera FOV of 90'
|
||||
if(ServerConnection.zoomed)
|
||||
%sensitivity = $pref::Input::ZoomVertMouseSensitivity;
|
||||
|
||||
if($pref::Input::invertVerticalMouse)
|
||||
%sensitivity *= -1;
|
||||
|
||||
return(%val * ($cameraFov / 90) * 0.01) * %sensitivity;
|
||||
}
|
||||
|
||||
function getHorizontalMouseAdjustAmount(%val)
|
||||
{
|
||||
%sensitivity = $pref::Input::HorzMouseSensitivity;
|
||||
|
||||
// based on a default camera FOV of 90'
|
||||
if(ServerConnection.zoomed)
|
||||
%sensitivity = $pref::Input::ZoomHorzMouseSensitivity;
|
||||
|
||||
return(%val * ($cameraFov / 90) * 0.01) * %sensitivity;
|
||||
}
|
||||
|
||||
function getRollMouseAdjustAmount(%val)
|
||||
{
|
||||
return(%val * ($cameraFov / 90) * 0.01) * $pref::Input::RollMouseSensitivity;
|
||||
}
|
||||
|
||||
function getGamepadAdjustAmount(%val)
|
||||
{
|
||||
// based on a default camera FOV of 90'
|
||||
return(%val * ($cameraFov / 90) * 0.01) * 10.0;
|
||||
}
|
||||
|
||||
function yaw(%val)
|
||||
{
|
||||
%yawAdj = getHorizontalMouseAdjustAmount(%val);
|
||||
if(ServerConnection.isControlObjectRotDampedCamera())
|
||||
{
|
||||
// Clamp and scale
|
||||
%yawAdj = mClamp(%yawAdj, -m2Pi()+0.01, m2Pi()-0.01);
|
||||
%yawAdj *= 0.5;
|
||||
}
|
||||
|
||||
$mvYaw += %yawAdj;
|
||||
}
|
||||
|
||||
function pitch(%val)
|
||||
{
|
||||
%pitchAdj = getVerticalMouseAdjustAmount(%val);
|
||||
if(ServerConnection.isControlObjectRotDampedCamera())
|
||||
{
|
||||
// Clamp and scale
|
||||
%pitchAdj = mClamp(%pitchAdj, -m2Pi()+0.01, m2Pi()-0.01);
|
||||
%pitchAdj *= 0.5;
|
||||
}
|
||||
|
||||
$mvPitch += %pitchAdj;
|
||||
}
|
||||
|
||||
function jump(%val)
|
||||
{
|
||||
$mvTriggerCount2++;
|
||||
}
|
||||
|
||||
function gamePadMoveX( %val )
|
||||
{
|
||||
$mvXAxis_L = %val;
|
||||
}
|
||||
|
||||
function gamePadMoveY( %val )
|
||||
{
|
||||
$mvYAxis_L = %val;
|
||||
}
|
||||
|
||||
function gamepadYaw(%val)
|
||||
{
|
||||
%yawAdj = getGamepadAdjustAmount(%val);
|
||||
if(ServerConnection.isControlObjectRotDampedCamera())
|
||||
{
|
||||
// Clamp and scale
|
||||
%yawAdj = mClamp(%yawAdj, -m2Pi()+0.01, m2Pi()-0.01);
|
||||
%yawAdj *= 0.5;
|
||||
}
|
||||
|
||||
if(%yawAdj > 0)
|
||||
{
|
||||
$mvYawLeftSpeed = %yawAdj;
|
||||
$mvYawRightSpeed = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
$mvYawLeftSpeed = 0;
|
||||
$mvYawRightSpeed = -%yawAdj;
|
||||
}
|
||||
}
|
||||
|
||||
function gamepadPitch(%val)
|
||||
{
|
||||
%pitchAdj = getGamepadAdjustAmount(%val);
|
||||
if(ServerConnection.isControlObjectRotDampedCamera())
|
||||
{
|
||||
// Clamp and scale
|
||||
%pitchAdj = mClamp(%pitchAdj, -m2Pi()+0.01, m2Pi()-0.01);
|
||||
%pitchAdj *= 0.5;
|
||||
}
|
||||
|
||||
if(%pitchAdj > 0)
|
||||
{
|
||||
$mvPitchDownSpeed = %pitchAdj;
|
||||
$mvPitchUpSpeed = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
$mvPitchDownSpeed = 0;
|
||||
$mvPitchUpSpeed = -%pitchAdj;
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Mouse Trigger
|
||||
//------------------------------------------------------------------------------
|
||||
function mouseFire(%val)
|
||||
{
|
||||
$mvTriggerCount0++;
|
||||
}
|
||||
|
||||
function altTrigger(%val)
|
||||
{
|
||||
$mvTriggerCount1++;
|
||||
|
||||
toggleZoom(%val);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Gamepad Trigger
|
||||
//------------------------------------------------------------------------------
|
||||
function gamepadFire(%val)
|
||||
{
|
||||
if(%val > 0.1 && !$gamepadFireTriggered)
|
||||
{
|
||||
$gamepadFireTriggered = true;
|
||||
$mvTriggerCount0++;
|
||||
}
|
||||
else if(%val <= 0.1 && $gamepadFireTriggered)
|
||||
{
|
||||
$gamepadFireTriggered = false;
|
||||
$mvTriggerCount0++;
|
||||
}
|
||||
}
|
||||
|
||||
function gamepadAltTrigger(%val)
|
||||
{
|
||||
if(%val > 0.1 && !$gamepadAltTriggerTriggered)
|
||||
{
|
||||
$gamepadAltTriggerTriggered = true;
|
||||
$mvTriggerCount1++;
|
||||
}
|
||||
else if(%val <= 0.1 && $gamepadAltTriggerTriggered)
|
||||
{
|
||||
$gamepadAltTriggerTriggered = false;
|
||||
$mvTriggerCount1++;
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Zoom and FOV functions
|
||||
//------------------------------------------------------------------------------
|
||||
if($Player::CurrentFOV $= "")
|
||||
$Player::CurrentFOV = $pref::Player::DefaultFOV;
|
||||
|
||||
// toggleZoomFOV() works by dividing the CurrentFOV by 2. Each time that this
|
||||
// toggle is hit it simply divides the CurrentFOV by 2 once again. If the
|
||||
// FOV is reduced below a certain threshold then it resets to equal half of the
|
||||
// DefaultFOV value. This gives us 4 zoom levels to cycle through.
|
||||
|
||||
function toggleZoomFOV()
|
||||
{
|
||||
$Player::CurrentFOV = $Player::CurrentFOV / 2;
|
||||
|
||||
if($Player::CurrentFOV < 5)
|
||||
resetCurrentFOV();
|
||||
|
||||
if(ServerConnection.zoomed)
|
||||
setFOV($Player::CurrentFOV);
|
||||
else
|
||||
{
|
||||
setFov(ServerConnection.getControlCameraDefaultFov());
|
||||
}
|
||||
}
|
||||
|
||||
function resetCurrentFOV()
|
||||
{
|
||||
$Player::CurrentFOV = ServerConnection.getControlCameraDefaultFov() / 2;
|
||||
}
|
||||
|
||||
function turnOffZoom()
|
||||
{
|
||||
ServerConnection.zoomed = false;
|
||||
setFov(ServerConnection.getControlCameraDefaultFov());
|
||||
|
||||
// Rather than just disable the DOF effect, we want to set it to the level's
|
||||
// preset values.
|
||||
//DOFPostEffect.disable();
|
||||
ppOptionsUpdateDOFSettings();
|
||||
}
|
||||
|
||||
function setZoomFOV(%val)
|
||||
{
|
||||
if(%val)
|
||||
toggleZoomFOV();
|
||||
}
|
||||
|
||||
function toggleZoom(%val)
|
||||
{
|
||||
if (%val)
|
||||
{
|
||||
ServerConnection.zoomed = true;
|
||||
setFov($Player::CurrentFOV);
|
||||
|
||||
DOFPostEffect.setAutoFocus( true );
|
||||
DOFPostEffect.setFocusParams( 0.5, 0.5, 50, 500, -5, 5 );
|
||||
DOFPostEffect.enable();
|
||||
}
|
||||
else
|
||||
{
|
||||
turnOffZoom();
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Camera & View functions
|
||||
//------------------------------------------------------------------------------
|
||||
function toggleFreeLook( %val )
|
||||
{
|
||||
if ( %val )
|
||||
$mvFreeLook = true;
|
||||
else
|
||||
$mvFreeLook = false;
|
||||
}
|
||||
|
||||
function toggleFirstPerson(%val)
|
||||
{
|
||||
if (%val)
|
||||
{
|
||||
ServerConnection.setFirstPerson(!ServerConnection.isFirstPerson());
|
||||
}
|
||||
}
|
||||
|
||||
function toggleCamera(%val)
|
||||
{
|
||||
if (%val)
|
||||
commandToServer('ToggleCamera');
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Demo recording functions
|
||||
//------------------------------------------------------------------------------
|
||||
function startRecordingDemo( %val )
|
||||
{
|
||||
if ( %val )
|
||||
startDemoRecord();
|
||||
}
|
||||
|
||||
function stopRecordingDemo( %val )
|
||||
{
|
||||
if ( %val )
|
||||
stopDemoRecord();
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Helper Functions
|
||||
//------------------------------------------------------------------------------
|
||||
function dropCameraAtPlayer(%val)
|
||||
{
|
||||
if (%val)
|
||||
commandToServer('dropCameraAtPlayer');
|
||||
}
|
||||
|
||||
function dropPlayerAtCamera(%val)
|
||||
{
|
||||
if (%val)
|
||||
commandToServer('DropPlayerAtCamera');
|
||||
}
|
||||
|
||||
function bringUpOptions(%val)
|
||||
{
|
||||
if (%val)
|
||||
Canvas.pushDialog(OptionsDlg);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Debugging Functions
|
||||
//------------------------------------------------------------------------------
|
||||
function showMetrics(%val)
|
||||
{
|
||||
if(%val)
|
||||
metrics("fps gfx shadow sfx terrain groundcover forest net");
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
//
|
||||
// Start profiler by pressing ctrl f3
|
||||
// ctrl f3 - starts profile that will dump to console and file
|
||||
//
|
||||
function doProfile(%val)
|
||||
{
|
||||
if (%val)
|
||||
{
|
||||
// key down -- start profile
|
||||
echo("Starting profile session...");
|
||||
profilerReset();
|
||||
profilerEnable(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
// key up -- finish off profile
|
||||
echo("Ending profile session...");
|
||||
|
||||
profilerDumpToFile("profilerDumpToFile" @ getSimTime() @ ".txt");
|
||||
profilerEnable(false);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
datablock CameraData(Observer)
|
||||
{
|
||||
mode = "Observer";
|
||||
};
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// 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.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
datablock ParticleData(DefaultParticle)
|
||||
{
|
||||
textureName = "data/spectatorGameplay/art/particles/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 = "data/spectatorGameplay/art/particles/defaultParticle";
|
||||
};
|
||||
|
||||
datablock ParticleEmitterData(DefaultEmitter)
|
||||
{
|
||||
ejectionPeriodMS = "50";
|
||||
ejectionVelocity = "1";
|
||||
velocityVariance = "0";
|
||||
ejectionOffset = "0.2";
|
||||
thetaMax = "40";
|
||||
particles = "DefaultParticle";
|
||||
blendStyle = "ADDITIVE";
|
||||
softParticles = "0";
|
||||
softnessDistance = "1";
|
||||
};
|
||||
|
|
@ -0,0 +1,608 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// 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.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// LightAnimData
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
datablock LightAnimData( NullLightAnim )
|
||||
{
|
||||
animEnabled = false;
|
||||
};
|
||||
|
||||
datablock LightAnimData( PulseLightAnim )
|
||||
{
|
||||
brightnessA = 0;
|
||||
brightnessZ = 1;
|
||||
brightnessPeriod = 1;
|
||||
brightnessKeys = "aza";
|
||||
brightnessSmooth = true;
|
||||
};
|
||||
|
||||
datablock LightAnimData( SubtlePulseLightAnim )
|
||||
{
|
||||
brightnessA = 0.5;
|
||||
brightnessZ = 1;
|
||||
brightnessPeriod = 1;
|
||||
brightnessKeys = "aza";
|
||||
brightnessSmooth = true;
|
||||
};
|
||||
|
||||
datablock LightAnimData( FlickerLightAnim )
|
||||
{
|
||||
brightnessA = 1;
|
||||
brightnessZ = 0;
|
||||
brightnessPeriod = 5;
|
||||
brightnessKeys = "aaazaaaaaazaaazaaazaaaaazaaaazzaaaazaaaaaazaaaazaaaza";
|
||||
brightnessSmooth = false;
|
||||
};
|
||||
|
||||
datablock LightAnimData( BlinkLightAnim )
|
||||
{
|
||||
brightnessA = 0;
|
||||
brightnessZ = 1;
|
||||
brightnessPeriod = 5;
|
||||
brightnessKeys = "azaaaazazaaaaaazaaaazaaaazzaaaaaazaazaaazaaaaaaa";
|
||||
brightnessSmooth = false;
|
||||
};
|
||||
|
||||
datablock LightAnimData( FireLightAnim )
|
||||
{
|
||||
brightnessA = 0.75;
|
||||
brightnessZ = 1;
|
||||
brightnessPeriod = 0.7;
|
||||
brightnessKeys = "annzzznnnzzzaznzzzz";
|
||||
brightnessSmooth = 0;
|
||||
offsetA[0] = "-0.05";
|
||||
offsetA[1] = "-0.05";
|
||||
offsetA[2] = "-0.05";
|
||||
offsetZ[0] = "0.05";
|
||||
offsetZ[1] = "0.05";
|
||||
offsetZ[2] = "0.05";
|
||||
offsetPeriod[0] = "1.25";
|
||||
offsetPeriod[1] = "1.25";
|
||||
offsetPeriod[2] = "1.25";
|
||||
offsetKeys[0] = "ahahaazahakayajza";
|
||||
offsetKeys[1] = "ahahaazahakayajza";
|
||||
offsetKeys[2] = "ahahaazahakayajza";
|
||||
rotKeys[0] = "";
|
||||
rotKeys[1] = "";
|
||||
rotKeys[2] = "";
|
||||
colorKeys[0] = "";
|
||||
colorKeys[1] = "";
|
||||
colorKeys[2] = "";
|
||||
};
|
||||
|
||||
datablock LightAnimData( SpinLightAnim )
|
||||
{
|
||||
rotA[2] = "0";
|
||||
rotZ[2] = "360";
|
||||
rotPeriod[2] = "1";
|
||||
rotKeys[2] = "az";
|
||||
rotSmooth[2] = true;
|
||||
};
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// LightFlareData
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
datablock LightFlareData( NullLightFlare )
|
||||
{
|
||||
flareEnabled = false;
|
||||
};
|
||||
|
||||
datablock LightFlareData( SunFlareExample )
|
||||
{
|
||||
overallScale = 4.0;
|
||||
flareEnabled = true;
|
||||
renderReflectPass = false;
|
||||
flareTexture = "data/spectatorGameplay/art/lights/lensFlareSheet0";
|
||||
|
||||
elementRect[0] = "512 0 512 512";
|
||||
elementDist[0] = 0.0;
|
||||
elementScale[0] = 2.0;
|
||||
elementTint[0] = "0.6 0.6 0.6";
|
||||
elementRotate[0] = true;
|
||||
elementUseLightColor[0] = true;
|
||||
|
||||
elementRect[1] = "1152 0 128 128";
|
||||
elementDist[1] = 0.3;
|
||||
elementScale[1] = 0.7;
|
||||
elementTint[1] = "1.0 1.0 1.0";
|
||||
elementRotate[1] = true;
|
||||
elementUseLightColor[1] = true;
|
||||
|
||||
elementRect[2] = "1024 0 128 128";
|
||||
elementDist[2] = 0.5;
|
||||
elementScale[2] = 0.25;
|
||||
elementTint[2] = "1.0 1.0 1.0";
|
||||
elementRotate[2] = true;
|
||||
elementUseLightColor[2] = true;
|
||||
|
||||
elementRect[3] = "1024 128 128 128";
|
||||
elementDist[3] = 0.8;
|
||||
elementScale[3] = 0.7;
|
||||
elementTint[3] = "1.0 1.0 1.0";
|
||||
elementRotate[3] = true;
|
||||
elementUseLightColor[3] = true;
|
||||
|
||||
elementRect[4] = "1024 0 128 128";
|
||||
elementDist[4] = 1.18;
|
||||
elementScale[4] = 0.5;
|
||||
elementTint[4] = "1.0 1.0 1.0";
|
||||
elementRotate[4] = true;
|
||||
elementUseLightColor[4] = true;
|
||||
|
||||
elementRect[5] = "1152 128 128 128";
|
||||
elementDist[5] = 1.25;
|
||||
elementScale[5] = 0.25;
|
||||
elementTint[5] = "1.0 1.0 1.0";
|
||||
elementRotate[5] = true;
|
||||
elementUseLightColor[5] = true;
|
||||
|
||||
elementRect[6] = "1024 0 128 128";
|
||||
elementDist[6] = 2.0;
|
||||
elementScale[6] = 0.25;
|
||||
elementTint[6] = "1.0 1.0 1.0";
|
||||
elementRotate[6] = true;
|
||||
elementUseLightColor[6] = true;
|
||||
occlusionRadius = "0.25";
|
||||
};
|
||||
|
||||
datablock LightFlareData( SunFlareExample2 )
|
||||
{
|
||||
overallScale = 2.0;
|
||||
flareEnabled = true;
|
||||
renderReflectPass = false;
|
||||
flareTexture = "data/spectatorGameplay/art/lights/lensFlareSheet0";
|
||||
|
||||
elementRect[0] = "1024 0 128 128";
|
||||
elementDist[0] = 0.5;
|
||||
elementScale[0] = 0.25;
|
||||
elementTint[0] = "1.0 1.0 1.0";
|
||||
elementRotate[0] = true;
|
||||
elementUseLightColor[0] = true;
|
||||
|
||||
elementRect[1] = "1024 128 128 128";
|
||||
elementDist[1] = 0.8;
|
||||
elementScale[1] = 0.7;
|
||||
elementTint[1] = "1.0 1.0 1.0";
|
||||
elementRotate[1] = true;
|
||||
elementUseLightColor[1] = true;
|
||||
|
||||
elementRect[2] = "1024 0 128 128";
|
||||
elementDist[2] = 1.18;
|
||||
elementScale[2] = 0.5;
|
||||
elementTint[2] = "1.0 1.0 1.0";
|
||||
elementRotate[2] = true;
|
||||
elementUseLightColor[2] = true;
|
||||
|
||||
elementRect[3] = "1152 128 128 128";
|
||||
elementDist[3] = 1.25;
|
||||
elementScale[3] = 0.25;
|
||||
elementTint[3] = "1.0 1.0 1.0";
|
||||
elementRotate[3] = true;
|
||||
elementUseLightColor[3] = true;
|
||||
|
||||
elementRect[4] = "1024 0 128 128";
|
||||
elementDist[4] = 2.0;
|
||||
elementScale[4] = 0.25;
|
||||
elementTint[4] = "0.7 0.7 0.7";
|
||||
elementRotate[4] = true;
|
||||
elementUseLightColor[4] = true;
|
||||
occlusionRadius = "0.25";
|
||||
};
|
||||
|
||||
datablock LightFlareData(SunFlareExample3)
|
||||
{
|
||||
overallScale = 2.0;
|
||||
flareEnabled = true;
|
||||
renderReflectPass = false;
|
||||
flareTexture = "data/spectatorGameplay/art/lights/lensflareSheet3.png";
|
||||
|
||||
elementRect[0] = "0 256 256 256";
|
||||
elementDist[0] = "-0.6";
|
||||
elementScale[0] = "3.5";
|
||||
elementTint[0] = "0.537255 0.537255 0.537255 1";
|
||||
elementRotate[0] = true;
|
||||
elementUseLightColor[0] = true;
|
||||
|
||||
elementRect[1] = "128 128 128 128";
|
||||
elementDist[1] = "0.1";
|
||||
elementScale[1] = "1.5";
|
||||
elementTint[1] = "0.996078 0.976471 0.721569 1";
|
||||
elementRotate[1] = true;
|
||||
elementUseLightColor[1] = true;
|
||||
|
||||
elementRect[2] = "0 0 64 64";
|
||||
elementDist[2] = "0.4";
|
||||
elementScale[2] = "0.25";
|
||||
elementTint[2] = "0 0 1 1";
|
||||
elementRotate[2] = true;
|
||||
elementUseLightColor[2] = true;
|
||||
|
||||
elementRect[3] = "0 0 64 64";
|
||||
elementDist[3] = "0.45";
|
||||
elementScale[3] = 0.25;
|
||||
elementTint[3] = "0 1 0 1";
|
||||
elementRotate[3] = true;
|
||||
elementUseLightColor[3] = true;
|
||||
|
||||
elementRect[4] = "0 0 64 64";
|
||||
elementDist[4] = "0.5";
|
||||
elementScale[4] = 0.25;
|
||||
elementTint[4] = "1 0 0 1";
|
||||
elementRotate[4] = true;
|
||||
elementUseLightColor[4] = true;
|
||||
elementRect[9] = "256 0 256 256";
|
||||
elementDist[3] = "0.45";
|
||||
elementScale[3] = "0.25";
|
||||
elementScale[9] = "2";
|
||||
elementRect[4] = "0 0 64 64";
|
||||
elementRect[5] = "128 0 128 128";
|
||||
elementDist[4] = "0.5";
|
||||
elementDist[5] = "1.2";
|
||||
elementScale[1] = "1.5";
|
||||
elementScale[4] = "0.25";
|
||||
elementScale[5] = "0.5";
|
||||
elementTint[1] = "0.996078 0.976471 0.721569 1";
|
||||
elementTint[2] = "0 0 1 1";
|
||||
elementTint[5] = "0.721569 0 1 1";
|
||||
elementRotate[5] = "0";
|
||||
elementUseLightColor[5] = "1";
|
||||
elementRect[0] = "0 256 256 256";
|
||||
elementRect[1] = "128 128 128 128";
|
||||
elementRect[2] = "0 0 64 64";
|
||||
elementRect[3] = "0 0 64 64";
|
||||
elementDist[0] = "-0.6";
|
||||
elementDist[1] = "0.1";
|
||||
elementDist[2] = "0.4";
|
||||
elementScale[0] = "3.5";
|
||||
elementScale[2] = "0.25";
|
||||
elementTint[0] = "0.537255 0.537255 0.537255 1";
|
||||
elementTint[3] = "0 1 0 1";
|
||||
elementTint[4] = "1 0 0 1";
|
||||
elementRect[6] = "64 64 64 64";
|
||||
elementDist[6] = "0.9";
|
||||
elementScale[6] = "4";
|
||||
elementTint[6] = "0.00392157 0.721569 0.00392157 1";
|
||||
elementRotate[6] = "0";
|
||||
elementUseLightColor[6] = "1";
|
||||
elementRect[7] = "64 64 64 64";
|
||||
elementRect[8] = "64 64 64 64";
|
||||
elementDist[7] = "0.25";
|
||||
elementDist[8] = "0.18";
|
||||
elementDist[9] = "0";
|
||||
elementScale[7] = "2";
|
||||
elementScale[8] = "0.5";
|
||||
elementTint[7] = "0.6 0.0117647 0.741176 1";
|
||||
elementTint[8] = "0.027451 0.690196 0.0117647 1";
|
||||
elementTint[9] = "0.647059 0.647059 0.647059 1";
|
||||
elementRotate[9] = "0";
|
||||
elementUseLightColor[7] = "1";
|
||||
elementUseLightColor[8] = "1";
|
||||
elementRect[10] = "256 256 256 256";
|
||||
elementRect[11] = "0 64 64 64";
|
||||
elementRect[12] = "0 64 64 64";
|
||||
elementRect[13] = "64 0 64 64";
|
||||
elementDist[10] = "0";
|
||||
elementDist[11] = "-0.3";
|
||||
elementDist[12] = "-0.32";
|
||||
elementDist[13] = "1";
|
||||
elementScale[10] = "10";
|
||||
elementScale[11] = "2.5";
|
||||
elementScale[12] = "0.3";
|
||||
elementScale[13] = "0.4";
|
||||
elementTint[10] = "0.321569 0.321569 0.321569 1";
|
||||
elementTint[11] = "0.443137 0.0431373 0.00784314 1";
|
||||
elementTint[12] = "0.00784314 0.996078 0.0313726 1";
|
||||
elementTint[13] = "0.996078 0.94902 0.00784314 1";
|
||||
elementUseLightColor[10] = "1";
|
||||
elementUseLightColor[11] = "1";
|
||||
elementUseLightColor[13] = "1";
|
||||
elementRect[14] = "0 0 64 64";
|
||||
elementDist[14] = "0.15";
|
||||
elementScale[14] = "0.8";
|
||||
elementTint[14] = "0.505882 0.0470588 0.00784314 1";
|
||||
elementRotate[14] = "1";
|
||||
elementUseLightColor[9] = "1";
|
||||
elementUseLightColor[14] = "1";
|
||||
elementRect[15] = "64 64 64 64";
|
||||
elementRect[16] = "0 64 64 64";
|
||||
elementRect[17] = "0 0 64 64";
|
||||
elementRect[18] = "0 64 64 64";
|
||||
elementRect[19] = "256 0 256 256";
|
||||
elementDist[15] = "0.8";
|
||||
elementDist[16] = "0.7";
|
||||
elementDist[17] = "1.4";
|
||||
elementDist[18] = "-0.5";
|
||||
elementDist[19] = "-1.5";
|
||||
elementScale[15] = "3";
|
||||
elementScale[16] = "0.3";
|
||||
elementScale[17] = "0.2";
|
||||
elementScale[18] = "1";
|
||||
elementScale[19] = "35";
|
||||
elementTint[15] = "0.00784314 0.00784314 0.996078 1";
|
||||
elementTint[16] = "0.992157 0.992157 0.992157 1";
|
||||
elementTint[17] = "0.996078 0.603922 0.00784314 1";
|
||||
elementTint[18] = "0.2 0.00392157 0.47451 1";
|
||||
elementTint[19] = "0.607843 0.607843 0.607843 1";
|
||||
elementUseLightColor[15] = "1";
|
||||
elementUseLightColor[18] = "1";
|
||||
elementUseLightColor[19] = "1";
|
||||
occlusionRadius = "0.25";
|
||||
};
|
||||
|
||||
|
||||
|
||||
datablock LightFlareData(SunFlarePacificIsland)
|
||||
{
|
||||
overallScale = 2.0;
|
||||
flareEnabled = true;
|
||||
renderReflectPass = false;
|
||||
flareTexture = "data/spectatorGameplay/art/lights/lensflareSheet3.png";
|
||||
|
||||
elementRect[0] = "0 256 256 256";
|
||||
elementDist[0] = "-0.6";
|
||||
elementScale[0] = "3.5";
|
||||
elementTint[0] = "0.537255 0.537255 0.537255 1";
|
||||
elementRotate[0] = true;
|
||||
elementUseLightColor[0] = true;
|
||||
|
||||
elementRect[1] = "128 128 128 128";
|
||||
elementDist[1] = "0.1";
|
||||
elementScale[1] = "1.5";
|
||||
elementTint[1] = "0.996078 0.976471 0.721569 1";
|
||||
elementRotate[1] = true;
|
||||
elementUseLightColor[1] = true;
|
||||
|
||||
elementRect[2] = "0 0 64 64";
|
||||
elementDist[2] = "0.4";
|
||||
elementScale[2] = "0.25";
|
||||
elementTint[2] = "0 0 1 1";
|
||||
elementRotate[2] = true;
|
||||
elementUseLightColor[2] = true;
|
||||
|
||||
elementRect[3] = "0 0 64 64";
|
||||
elementDist[3] = "0.45";
|
||||
elementScale[3] = 0.25;
|
||||
elementTint[3] = "0 1 0 1";
|
||||
elementRotate[3] = true;
|
||||
elementUseLightColor[3] = true;
|
||||
|
||||
elementRect[4] = "0 0 64 64";
|
||||
elementDist[4] = "0.5";
|
||||
elementScale[4] = 0.25;
|
||||
elementTint[4] = "1 0 0 1";
|
||||
elementRotate[4] = true;
|
||||
elementUseLightColor[4] = true;
|
||||
elementRect[9] = "256 0 256 256";
|
||||
elementDist[3] = "0.45";
|
||||
elementScale[3] = "0.25";
|
||||
elementScale[9] = "2";
|
||||
elementRect[4] = "0 0 64 64";
|
||||
elementRect[5] = "128 0 128 128";
|
||||
elementDist[4] = "0.5";
|
||||
elementDist[5] = "1.2";
|
||||
elementScale[1] = "1.5";
|
||||
elementScale[4] = "0.25";
|
||||
elementScale[5] = "0.5";
|
||||
elementTint[1] = "0.996078 0.976471 0.721569 1";
|
||||
elementTint[2] = "0 0 1 1";
|
||||
elementTint[5] = "0.721569 0 1 1";
|
||||
elementRotate[5] = "0";
|
||||
elementUseLightColor[5] = "1";
|
||||
elementRect[0] = "0 256 256 256";
|
||||
elementRect[1] = "128 128 128 128";
|
||||
elementRect[2] = "0 0 64 64";
|
||||
elementRect[3] = "0 0 64 64";
|
||||
elementDist[0] = "-0.6";
|
||||
elementDist[1] = "0.1";
|
||||
elementDist[2] = "0.4";
|
||||
elementScale[0] = "3.5";
|
||||
elementScale[2] = "0.25";
|
||||
elementTint[0] = "0.537255 0.537255 0.537255 1";
|
||||
elementTint[3] = "0 1 0 1";
|
||||
elementTint[4] = "1 0 0 1";
|
||||
elementRect[6] = "64 64 64 64";
|
||||
elementDist[6] = "0.9";
|
||||
elementScale[6] = "4";
|
||||
elementTint[6] = "0.00392157 0.721569 0.00392157 1";
|
||||
elementRotate[6] = "0";
|
||||
elementUseLightColor[6] = "1";
|
||||
elementRect[7] = "64 64 64 64";
|
||||
elementRect[8] = "64 64 64 64";
|
||||
elementDist[7] = "0.25";
|
||||
elementDist[8] = "0.18";
|
||||
elementDist[9] = "0";
|
||||
elementScale[7] = "2";
|
||||
elementScale[8] = "0.5";
|
||||
elementTint[7] = "0.6 0.0117647 0.741176 1";
|
||||
elementTint[8] = "0.027451 0.690196 0.0117647 1";
|
||||
elementTint[9] = "0.647059 0.647059 0.647059 1";
|
||||
elementRotate[9] = "0";
|
||||
elementUseLightColor[7] = "1";
|
||||
elementUseLightColor[8] = "1";
|
||||
elementRect[10] = "256 256 256 256";
|
||||
elementRect[11] = "0 64 64 64";
|
||||
elementRect[12] = "0 64 64 64";
|
||||
elementRect[13] = "64 0 64 64";
|
||||
elementDist[10] = "0";
|
||||
elementDist[11] = "-0.3";
|
||||
elementDist[12] = "-0.32";
|
||||
elementDist[13] = "1";
|
||||
elementScale[10] = "10";
|
||||
elementScale[11] = "2.5";
|
||||
elementScale[12] = "0.3";
|
||||
elementScale[13] = "0.4";
|
||||
elementTint[10] = "0.321569 0.321569 0.321569 1";
|
||||
elementTint[11] = "0.443137 0.0431373 0.00784314 1";
|
||||
elementTint[12] = "0.00784314 0.996078 0.0313726 1";
|
||||
elementTint[13] = "0.996078 0.94902 0.00784314 1";
|
||||
elementUseLightColor[10] = "1";
|
||||
elementUseLightColor[11] = "1";
|
||||
elementUseLightColor[13] = "1";
|
||||
elementRect[14] = "0 0 64 64";
|
||||
elementDist[14] = "0.15";
|
||||
elementScale[14] = "0.8";
|
||||
elementTint[14] = "0.505882 0.0470588 0.00784314 1";
|
||||
elementRotate[14] = "1";
|
||||
elementUseLightColor[9] = "1";
|
||||
elementUseLightColor[14] = "1";
|
||||
elementRect[15] = "64 64 64 64";
|
||||
elementRect[16] = "0 64 64 64";
|
||||
elementRect[17] = "0 0 64 64";
|
||||
elementRect[18] = "0 64 64 64";
|
||||
elementRect[19] = "256 0 256 256";
|
||||
elementDist[15] = "0.8";
|
||||
elementDist[16] = "0.7";
|
||||
elementDist[17] = "1.4";
|
||||
elementDist[18] = "-0.5";
|
||||
elementDist[19] = "-1.5";
|
||||
elementScale[15] = "3";
|
||||
elementScale[16] = "0.3";
|
||||
elementScale[17] = "0.2";
|
||||
elementScale[18] = "1";
|
||||
elementScale[19] = "35";
|
||||
elementTint[15] = "0.00784314 0.00784314 0.996078 1";
|
||||
elementTint[16] = "0.992157 0.992157 0.992157 1";
|
||||
elementTint[17] = "0.996078 0.603922 0.00784314 1";
|
||||
elementTint[18] = "0.2 0.00392157 0.47451 1";
|
||||
elementTint[19] = "0.607843 0.607843 0.607843 1";
|
||||
elementUseLightColor[15] = "1";
|
||||
elementUseLightColor[18] = "1";
|
||||
elementUseLightColor[19] = "1";
|
||||
};
|
||||
|
||||
|
||||
|
||||
datablock LightFlareData( LightFlareExample0 )
|
||||
{
|
||||
overallScale = 2.0;
|
||||
flareEnabled = true;
|
||||
renderReflectPass = true;
|
||||
flareTexture = "data/spectatorGameplay/art/lights/lensFlareSheet1";
|
||||
|
||||
elementRect[0] = "0 512 512 512";
|
||||
elementDist[0] = 0.0;
|
||||
elementScale[0] = 0.5;
|
||||
elementTint[0] = "1.0 1.0 1.0";
|
||||
elementRotate[0] = false;
|
||||
elementUseLightColor[0] = false;
|
||||
|
||||
elementRect[1] = "512 0 512 512";
|
||||
elementDist[1] = 0.0;
|
||||
elementScale[1] = 2.0;
|
||||
elementTint[1] = "0.5 0.5 0.5";
|
||||
elementRotate[1] = false;
|
||||
elementUseLightColor[1] = false;
|
||||
occlusionRadius = "0.25";
|
||||
};
|
||||
|
||||
datablock LightFlareData( LightFlareExample1 )
|
||||
{
|
||||
overallScale = 2.0;
|
||||
flareEnabled = true;
|
||||
renderReflectPass = true;
|
||||
flareTexture = "data/spectatorGameplay/art/lights/lensFlareSheet1";
|
||||
|
||||
elementRect[0] = "512 512 512 512";
|
||||
elementDist[0] = 0.0;
|
||||
elementScale[0] = 0.5;
|
||||
elementTint[0] = "1.0 1.0 1.0";
|
||||
elementRotate[0] = false;
|
||||
elementUseLightColor[0] = false;
|
||||
|
||||
elementRect[1] = "512 0 512 512";
|
||||
elementDist[1] = 0.0;
|
||||
elementScale[1] = 2.0;
|
||||
elementTint[1] = "0.5 0.5 0.5";
|
||||
elementRotate[1] = false;
|
||||
elementUseLightColor[1] = false;
|
||||
occlusionRadius = "0.25";
|
||||
};
|
||||
|
||||
datablock LightFlareData( LightFlareExample2 )
|
||||
{
|
||||
overallScale = 2.0;
|
||||
flareEnabled = true;
|
||||
renderReflectPass = true;
|
||||
flareTexture = "data/spectatorGameplay/art/lights/lensFlareSheet0";
|
||||
|
||||
elementRect[0] = "512 512 512 512";
|
||||
elementDist[0] = 0.0;
|
||||
elementScale[0] = 0.5;
|
||||
elementTint[0] = "1.0 1.0 1.0";
|
||||
elementRotate[0] = true;
|
||||
elementUseLightColor[0] = true;
|
||||
|
||||
elementRect[1] = "512 0 512 512";
|
||||
elementDist[1] = 0.0;
|
||||
elementScale[1] = 2.0;
|
||||
elementTint[1] = "0.7 0.7 0.7";
|
||||
elementRotate[1] = true;
|
||||
elementUseLightColor[1] = true;
|
||||
|
||||
elementRect[2] = "1152 0 128 128";
|
||||
elementDist[2] = 0.3;
|
||||
elementScale[2] = 0.5;
|
||||
elementTint[2] = "1.0 1.0 1.0";
|
||||
elementRotate[2] = true;
|
||||
elementUseLightColor[2] = true;
|
||||
|
||||
elementRect[3] = "1024 0 128 128";
|
||||
elementDist[3] = 0.5;
|
||||
elementScale[3] = 0.25;
|
||||
elementTint[3] = "1.0 1.0 1.0";
|
||||
elementRotate[3] = true;
|
||||
elementUseLightColor[3] = true;
|
||||
|
||||
elementRect[4] = "1024 128 128 128";
|
||||
elementDist[4] = 0.8;
|
||||
elementScale[4] = 0.6;
|
||||
elementTint[4] = "1.0 1.0 1.0";
|
||||
elementRotate[4] = true;
|
||||
elementUseLightColor[4] = true;
|
||||
|
||||
elementRect[5] = "1024 0 128 128";
|
||||
elementDist[5] = 1.18;
|
||||
elementScale[5] = 0.5;
|
||||
elementTint[5] = "0.7 0.7 0.7";
|
||||
elementRotate[5] = true;
|
||||
elementUseLightColor[5] = true;
|
||||
|
||||
elementRect[6] = "1152 128 128 128";
|
||||
elementDist[6] = 1.25;
|
||||
elementScale[6] = 0.35;
|
||||
elementTint[6] = "0.8 0.8 0.8";
|
||||
elementRotate[6] = true;
|
||||
elementUseLightColor[6] = true;
|
||||
|
||||
elementRect[7] = "1024 0 128 128";
|
||||
elementDist[7] = 2.0;
|
||||
elementScale[7] = 0.25;
|
||||
elementTint[7] = "1.0 1.0 1.0";
|
||||
elementRotate[7] = true;
|
||||
elementUseLightColor[7] = true;
|
||||
};
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// 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.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
// This is the default save location for any Datablocks created in the
|
||||
// Datablock Editor (this script is executed from onServerCreated())
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// 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.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
// This is the default save location for any Decal datablocks created in the
|
||||
// Decal Editor (this script is executed from onServerCreated())
|
||||
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// 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.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// 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.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
// This is the default save location for any Particle datablocks created in the
|
||||
// Particle Editor (this script is executed from onServerCreated())
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// 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.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
// This is the default save location for any Particle Emitter datablocks created in the
|
||||
// Particle Editor (this script is executed from onServerCreated())
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// 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.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
datablock MissionMarkerData(WayPointMarker)
|
||||
{
|
||||
category = "Misc";
|
||||
shapeFile = "data/spectatorGameplay/art/shapes/octahedron.dts";
|
||||
};
|
||||
|
||||
datablock MissionMarkerData(SpawnSphereMarker)
|
||||
{
|
||||
category = "Misc";
|
||||
shapeFile = "data/spectatorGameplay/art/shapes/octahedron.dts";
|
||||
};
|
||||
|
||||
datablock MissionMarkerData(CameraBookmarkMarker)
|
||||
{
|
||||
category = "Misc";
|
||||
shapeFile = "data/spectatorGameplay/art/shapes/camera.dts";
|
||||
};
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// 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.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
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";
|
||||
};
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// 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.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
|
@ -0,0 +1,80 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// 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.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// PlayGui is the main TSControl through which the game is viewed.
|
||||
// The PlayGui also contains the hud controls.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
function PlayGui::onWake(%this)
|
||||
{
|
||||
// Turn off any shell sounds...
|
||||
// sfxStop( ... );
|
||||
|
||||
$enableDirectInput = "1";
|
||||
activateDirectInput();
|
||||
|
||||
// Message hud dialog
|
||||
if ( isObject( MainChatHud ) )
|
||||
{
|
||||
Canvas.pushDialog( MainChatHud );
|
||||
chatHud.attach(HudMessageVector);
|
||||
}
|
||||
|
||||
// just update the action map here
|
||||
moveMap.push();
|
||||
|
||||
// hack city - these controls are floating around and need to be clamped
|
||||
if ( isFunction( "refreshCenterTextCtrl" ) )
|
||||
schedule(0, 0, "refreshCenterTextCtrl");
|
||||
if ( isFunction( "refreshBottomTextCtrl" ) )
|
||||
schedule(0, 0, "refreshBottomTextCtrl");
|
||||
}
|
||||
|
||||
function PlayGui::onSleep(%this)
|
||||
{
|
||||
if ( isObject( MainChatHud ) )
|
||||
Canvas.popDialog( MainChatHud );
|
||||
|
||||
// pop the keymaps
|
||||
moveMap.pop();
|
||||
}
|
||||
|
||||
function PlayGui::clearHud( %this )
|
||||
{
|
||||
Canvas.popDialog( MainChatHud );
|
||||
|
||||
while ( %this.getCount() > 0 )
|
||||
%this.getObject( 0 ).delete();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
function refreshBottomTextCtrl()
|
||||
{
|
||||
BottomPrintText.position = "0 0";
|
||||
}
|
||||
|
||||
function refreshCenterTextCtrl()
|
||||
{
|
||||
CenterPrintText.position = "0 0";
|
||||
}
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
new GameTSCtrl(PlayGui) {
|
||||
isContainer = "1";
|
||||
profile = "GuiContentProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "0 0";
|
||||
extent = "1024 768";
|
||||
minExtent = "8 8";
|
||||
canSave = "1";
|
||||
visible = "1";
|
||||
margin = "0 0 0 0";
|
||||
padding = "0 0 0 0";
|
||||
anchorTop = "1";
|
||||
anchorBottom = "0";
|
||||
anchorLeft = "1";
|
||||
anchorRight = "0";
|
||||
cameraZRot = "0";
|
||||
forceFOV = "0";
|
||||
enabled = "1";
|
||||
helpTag = "0";
|
||||
noCursor = "1";
|
||||
|
||||
new GuiBitmapCtrl(LagIcon) {
|
||||
bitmap = "data/ui/art/lagIcon.png";
|
||||
wrap = "0";
|
||||
isContainer = "0";
|
||||
Profile = "GuiDefaultProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
position = "572 3";
|
||||
Extent = "32 32";
|
||||
MinExtent = "8 8";
|
||||
canSave = "1";
|
||||
Visible = "0";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
};
|
||||
|
|
@ -0,0 +1,193 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// 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.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// What kind of "player" is spawned is either controlled directly by the
|
||||
// SpawnSphere or it defaults back to the values set here. This also controls
|
||||
// which SimGroups to attempt to select the spawn sphere's from by walking down
|
||||
// the list of SpawnGroups till it finds a valid spawn object.
|
||||
// These override the values set in core/scripts/server/spawn.cs
|
||||
//-----------------------------------------------------------------------------
|
||||
function DefaultGame::initGameVars(%this)
|
||||
{
|
||||
// Leave $Game::defaultPlayerClass and $Game::defaultPlayerDataBlock as empty strings ("")
|
||||
// to spawn a the $Game::defaultCameraClass as the control object.
|
||||
$Game::DefaultPlayerClass = "";
|
||||
$Game::DefaultPlayerDataBlock = "";
|
||||
$Game::DefaultPlayerSpawnGroups = "CameraSpawnPoints PlayerSpawnPoints PlayerDropPoints";
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// What kind of "camera" is spawned is either controlled directly by the
|
||||
// SpawnSphere or it defaults back to the values set here. This also controls
|
||||
// which SimGroups to attempt to select the spawn sphere's from by walking down
|
||||
// the list of SpawnGroups till it finds a valid spawn object.
|
||||
// These override the values set in core/scripts/server/spawn.cs
|
||||
//-----------------------------------------------------------------------------
|
||||
$Game::DefaultCameraClass = "Camera";
|
||||
$Game::DefaultCameraDataBlock = "Observer";
|
||||
$Game::DefaultCameraSpawnGroups = "CameraSpawnPoints PlayerSpawnPoints PlayerDropPoints";
|
||||
|
||||
// Global movement speed that affects all Cameras
|
||||
$Camera::MovementSpeed = 30;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// DefaultGame manages the communication between the server's world and the
|
||||
// client's simulation. These functions are responsible for maintaining the
|
||||
// client's camera and player objects.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// This is the main entry point for spawning a control object for the client.
|
||||
// The control object is the actual game object that the client is responsible
|
||||
// for controlling in the client and server simulations. We also spawn a
|
||||
// convenient camera object for use as an alternate control object. We do not
|
||||
// have to spawn this camera object in order to function in the simulation.
|
||||
//
|
||||
// Called for each client after it's finished downloading the mission and is
|
||||
// ready to start playing.
|
||||
//-----------------------------------------------------------------------------
|
||||
function DefaultGame::onClientEnterGame(%this, %client)
|
||||
{
|
||||
// This function currently relies on some helper functions defined in
|
||||
// core/scripts/spawn.cs. For custom spawn behaviors one can either
|
||||
// override the properties on the SpawnSphere's or directly override the
|
||||
// functions themselves.
|
||||
|
||||
// Find a spawn point for the camera
|
||||
%cameraSpawnPoint = %this.pickCameraSpawnPoint($Game::DefaultCameraSpawnGroups);
|
||||
|
||||
// Spawn a camera for this client using the found %spawnPoint
|
||||
%this.spawnCamera(%cameraSpawnPoint, %client);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Clean up the client's control objects
|
||||
//-----------------------------------------------------------------------------
|
||||
function DefaultGame::onClientLeaveGame(%this, %client)
|
||||
{
|
||||
// Cleanup the camera
|
||||
if (isObject(%this.camera))
|
||||
%this.camera.delete();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// The server has started up so do some game start up
|
||||
//-----------------------------------------------------------------------------
|
||||
function DefaultGame::onMissionStart(%this)
|
||||
{
|
||||
//set up the game and game variables
|
||||
%this.initGameVars();
|
||||
|
||||
$Game::Duration = %this.duration;
|
||||
}
|
||||
|
||||
function DefaultGame::onMissionEnded(%this)
|
||||
{
|
||||
cancel($Game::Schedule);
|
||||
$Game::Running = false;
|
||||
$Game::Cycling = false;
|
||||
}
|
||||
|
||||
function DefaultGame::onMissionReset(%this)
|
||||
{
|
||||
// Called by resetMission(), after all the temporary mission objects
|
||||
// have been deleted.
|
||||
%this.initGameVars();
|
||||
|
||||
$Game::Duration = %this.duration;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Functions that implement game-play
|
||||
// These are here for backwards compatibilty only, games and/or mods should
|
||||
// really be overloading the server and mission functions listed ubove.
|
||||
//-----------------------------------------------------------------------------
|
||||
function DefaultGame::pickCameraSpawnPoint(%this, %spawnGroups)
|
||||
{
|
||||
// Walk through the groups until we find a valid object
|
||||
for (%i = 0; %i < getWordCount(%spawnGroups); %i++)
|
||||
{
|
||||
%group = getWord(%spawnGroups, %i);
|
||||
|
||||
%count = getWordCount(%group);
|
||||
|
||||
if (isObject(%group))
|
||||
%spawnPoint = %group.getRandom();
|
||||
|
||||
if (isObject(%spawnPoint))
|
||||
return %spawnPoint;
|
||||
}
|
||||
|
||||
// Didn't find a spawn point by looking for the groups
|
||||
// so let's return the "default" SpawnSphere
|
||||
// First create it if it doesn't already exist
|
||||
if (!isObject(DefaultCameraSpawnSphere))
|
||||
{
|
||||
%spawn = new SpawnSphere(DefaultCameraSpawnSphere)
|
||||
{
|
||||
dataBlock = "SpawnSphereMarker";
|
||||
spawnClass = $Game::DefaultCameraClass;
|
||||
spawnDatablock = $Game::DefaultCameraDataBlock;
|
||||
};
|
||||
|
||||
// Add it to the MissionCleanup group so that it
|
||||
// doesn't get saved to the Mission (and gets cleaned
|
||||
// up of course)
|
||||
MissionCleanup.add(%spawn);
|
||||
}
|
||||
|
||||
return DefaultCameraSpawnSphere;
|
||||
}
|
||||
|
||||
function DefaultGame::spawnCamera(%this, %spawnPoint, %client)
|
||||
{
|
||||
// Set the control object to the default camera
|
||||
if (!isObject(%client.camera))
|
||||
{
|
||||
%camObj = spawnObject(Camera, Observer);
|
||||
%client.camera = %camObj;
|
||||
}
|
||||
|
||||
// If we have a camera then set up some properties
|
||||
if (isObject(%client.camera))
|
||||
{
|
||||
MissionCleanup.add( %client.camera );
|
||||
%client.camera.scopeToClient(%client);
|
||||
|
||||
%client.setControlObject(%client.camera);
|
||||
|
||||
if (isDefined("%spawnPoint"))
|
||||
{
|
||||
// Attempt to treat %spawnPoint as an object
|
||||
if (getWordCount(%spawnPoint) == 1 && isObject(%spawnPoint))
|
||||
{
|
||||
%client.camera.setTransform(%spawnPoint.getTransform());
|
||||
}
|
||||
else
|
||||
{
|
||||
// Treat %spawnPoint as an AxisAngle transform
|
||||
%client.camera.setTransform(%spawnPoint);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,106 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// 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.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
function VolumetricFog::onEnterFog(%this,%obj)
|
||||
{
|
||||
// This method is called whenever the control object (Camera or Player)
|
||||
// %obj enters the fog area.
|
||||
|
||||
// echo("Control Object " @ %obj @ " enters fog " @ %this);
|
||||
}
|
||||
|
||||
function VolumetricFog::onLeaveFog(%this,%obj)
|
||||
{
|
||||
// This method is called whenever the control object (Camera or Player)
|
||||
// %obj leaves the fog area.
|
||||
|
||||
// echo("Control Object " @ %obj @ " left fog " @ %this);
|
||||
}
|
||||
|
||||
function VolumetricFog::Dissolve(%this,%speed,%delete)
|
||||
{
|
||||
// This method dissolves the fog at speed milliseconds
|
||||
%this.isBuilding = true;
|
||||
if (%this.FogDensity > 0)
|
||||
{
|
||||
%this.setFogDensity(%this.FogDensity - 0.005);
|
||||
%this.schedule(%speed,Dissolve,%speed,%delete);
|
||||
}
|
||||
else
|
||||
{
|
||||
%this.isBuilding = false;
|
||||
%this.SetFogDensity(0.0);
|
||||
if (%delete !$= "" && %delete !$="0" && %delete !$="false")
|
||||
%this.schedule(250,delete);
|
||||
}
|
||||
}
|
||||
|
||||
function VolumetricFog::Thicken(%this,%speed, %end_density)
|
||||
{
|
||||
// This method thickens the fog at speed milliseconds to a density of %end_density
|
||||
|
||||
%this.isBuilding = true;
|
||||
if (%this.FogDensity + 0.005 < %end_density)
|
||||
{
|
||||
%this.setFogDensity(%this.FogDensity + 0.005);
|
||||
%this.schedule(%speed,Thicken,%speed, %end_density);
|
||||
}
|
||||
else
|
||||
{
|
||||
%this.setFogDensity(%end_density);
|
||||
%this.isBuilding = false;
|
||||
}
|
||||
}
|
||||
|
||||
function GenerateFog(%pos,%scale,%color,%density)
|
||||
{
|
||||
// This function can be used to generate some fog caused by massive gunfire etc.
|
||||
// Change shape and modulation data to your likings.
|
||||
|
||||
%fog=new VolumetricFog() {
|
||||
shapeName = "data/FPSGameplay/art/environment/Fog_Sphere.dts";
|
||||
fogColor = %color;
|
||||
fogDensity = "0.0";
|
||||
ignoreWater = "0";
|
||||
MinSize = "250";
|
||||
FadeSize = "750";
|
||||
texture = "data/FPSGameplay/art/environment/FogMod_heavy.dds";
|
||||
tiles = "1";
|
||||
modStrength = "0.2";
|
||||
PrimSpeed = "-0.01 0.04";
|
||||
SecSpeed = "0.02 0.02";
|
||||
position = %pos;
|
||||
rotation = "0 0 1 20.354";
|
||||
scale = %scale;
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "1";
|
||||
};
|
||||
|
||||
if (isObject(%fog))
|
||||
{
|
||||
MissionCleanup.add(%fog);
|
||||
|
||||
%fog.Thicken(500,%density);
|
||||
}
|
||||
|
||||
return %fog;
|
||||
}
|
||||