diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 000000000..dd81cb739 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,58 @@ +# Torque 3D contribution guidelines + +So you want to help Torque out by contributing to the repo? That's awesome! +We just ask that you'd give this document a quick read to get yourself familiar with the process. +Do you want to [request a feature](#request-a-feature)? +Create a [pull-request](#create-a-pull-request) to contribute your own code to the engine? +[Report an issue](#report-an-issue) you've discovered? + +## Report an issue + +Before you report an issue with the engine, please [search](https://github.com/GarageGames/Torque3D/issues) and quickly make sure someone else hasn't obviously reported it. +If you're not sure if it's the same issue, go ahead and comment on it! +Once you're certain you've found a new issue, hit the [big green button](https://github.com/GarageGames/Torque3D/issues/new) and please include the following information: + + * Your platform and compiler, if you're not using a precompiled binary + * Steps to reproduce the issue, if _at all_ possible + * If it's related to graphics, your GFX card and driver details. + +## Create a pull-request + +We ask that potential contributors read our [pull-request guidelines](http://torque3d.org/contribute/#pull-request-guide) before opening a PR. +We also have some [code style guidelines](https://github.com/GarageGames/Torque3D/wiki/Code-Style-Guidelines). +Here's a quick guide to the branches in this repo that you might think of targeting a PR at: + +### The master branch + +The repository's `master` branch is where we make releases. +It's supposed to be stable at all times - or as stable as we can make it - and only gets updated when a new version comes out. +Any pull-requests to the master branch will have to be rejected - sorry :(. + +### The development branch + +The `development` branch is where most development happens. +It is the target for the next 'middle' version of the engine (the 6 in 3.6.1, for example). +This means we will add new features, and refactor code if it doesn't break existing games made with the engine _too_ much*. +Most pull requests to `development` can be accepted if we like your code - unless they would potentially break users' games. + +*How much is _too_ much is for the Steering Committee to decide. + +### The development-3.6 branch + +The `development-3.6` branch is where we will make bugfixes and small patches to the previous stable 'middle' version. +This branch is where the 'small' versions will be created - 3.6.2, 3.6.3, etcetera. +So if you have a bugfix or tiny enhancement that doesn't require anyone to change their game, it'd be best appreciated in this branch. + +### TLDR + +Don't make any PRs to `master`. +PR new features and large fixes/refactorings to `development`. +PR bugfixes to `development-3.6`. + +## Request a feature + +We ask that all feature requests be discussed in the [GarageGames forums](http://www.garagegames.com/community/forums), our [IRC channel](http://torque3d.wikidot.com/community:chat), or on our [UserVoice feature request voting page](https://garagegames.uservoice.com/forums/178972-torque-3d-mit/filters/top) before making an issue here. +If your idea is popular, we'll hear of it and probably make an issue ourselves, if we agree. + +Even better - don't request a feature, start working on it! +This engine isn't going to improve itself ;). diff --git a/Engine/source/T3D/debris.cpp b/Engine/source/T3D/debris.cpp index 495b5dbc2..d8ef4f8fa 100644 --- a/Engine/source/T3D/debris.cpp +++ b/Engine/source/T3D/debris.cpp @@ -99,7 +99,6 @@ DebrisData::DebrisData() friction = 0.2f; numBounces = 0; bounceVariance = 0; - minSpinSpeed = maxSpinSpeed = 0.0; staticOnMaxBounce = false; explodeOnMaxBounce = false; snapOnMaxBounce = false; @@ -659,11 +658,7 @@ void Debris::onRemove() } } - if( getSceneManager() ) - getSceneManager()->removeObjectFromScene(this); - - if( getContainer() ) - getContainer()->removeObject(this); + removeFromScene(); Parent::onRemove(); } diff --git a/Engine/source/T3D/fx/explosion.cpp b/Engine/source/T3D/fx/explosion.cpp index dd81dcba8..f23400232 100644 --- a/Engine/source/T3D/fx/explosion.cpp +++ b/Engine/source/T3D/fx/explosion.cpp @@ -964,10 +964,7 @@ void Explosion::onRemove() mMainEmitter = NULL; } - if (getSceneManager() != NULL) - getSceneManager()->removeObjectFromScene(this); - if (getContainer() != NULL) - getContainer()->removeObject(this); + removeFromScene(); Parent::onRemove(); } diff --git a/Engine/source/T3D/fx/splash.cpp b/Engine/source/T3D/fx/splash.cpp index 1558f2dbc..0e9a2c6f4 100644 --- a/Engine/source/T3D/fx/splash.cpp +++ b/Engine/source/T3D/fx/splash.cpp @@ -415,11 +415,7 @@ void Splash::onRemove() ringList.clear(); - if( getSceneManager() ) - getSceneManager()->removeObjectFromScene(this); - - if( getContainer() ) - getContainer()->removeObject(this); + removeFromScene(); Parent::onRemove(); } diff --git a/Engine/source/T3D/guiObjectView.cpp b/Engine/source/T3D/guiObjectView.cpp index 00e5de0df..32c1b1565 100644 --- a/Engine/source/T3D/guiObjectView.cpp +++ b/Engine/source/T3D/guiObjectView.cpp @@ -110,7 +110,7 @@ GuiObjectView::GuiObjectView() { mCameraMatrix.identity(); mCameraRot.set( 0.0f, 0.0f, 3.9f ); - mCameraPos.set( 0.0f, 1.75f, 1.25f ); + mCameraPos.set( 0.0f, 0.0f, 0.0f ); mCameraMatrix.setColumn( 3, mCameraPos ); mOrbitPos.set( 0.0f, 0.0f, 0.0f ); @@ -520,9 +520,9 @@ void GuiObjectView::renderWorld( const RectI& updateRect ) ( gClientSceneGraph, SPT_Diffuse, - SceneCameraState( GFX->getViewport(), frust, GFX->getWorldMatrix(), GFX->getProjectionMatrix() ), + SceneCameraState( GFX->getViewport(), frust, MatrixF::Identity, GFX->getProjectionMatrix() ), renderPass, - false + true ); // Set up our TS render state here. diff --git a/Engine/source/T3D/player.cpp b/Engine/source/T3D/player.cpp index 5a30fb77b..241be2c2f 100644 --- a/Engine/source/T3D/player.cpp +++ b/Engine/source/T3D/player.cpp @@ -356,6 +356,7 @@ PlayerData::PlayerData() decalID = 0; decalOffset = 0.0f; + actionCount = 0; lookAction = 0; // size of bounding box @@ -3691,7 +3692,7 @@ bool Player::setActionThread(const char* sequence,bool hold,bool wait,bool fsp) void Player::setActionThread(U32 action,bool forward,bool hold,bool wait,bool fsp, bool forceSet) { - if (!mDataBlock || (mActionAnimation.action == action && mActionAnimation.forward == forward && !forceSet)) + if (!mDataBlock || !mDataBlock->actionCount || (mActionAnimation.action == action && mActionAnimation.forward == forward && !forceSet)) return; if (action >= PlayerData::NumActionAnims) diff --git a/Engine/source/T3D/rigidShape.cpp b/Engine/source/T3D/rigidShape.cpp index f0545d054..c69396fde 100644 --- a/Engine/source/T3D/rigidShape.cpp +++ b/Engine/source/T3D/rigidShape.cpp @@ -92,7 +92,7 @@ ConsoleDocClass( RigidShapeData, "@see RigidShape\n" "@see ShapeBase\n\n" - "@ingroup Platform\n" + "@ingroup Physics\n" ); @@ -149,7 +149,7 @@ ConsoleDocClass( RigidShape, "@see RigidShapeData\n" "@see ShapeBase\n\n" - "@ingroup Platform\n" + "@ingroup Physics\n" ); diff --git a/Engine/source/T3D/sfx/sfx3DWorld.cpp b/Engine/source/T3D/sfx/sfx3DWorld.cpp index b04338460..1246895d0 100644 --- a/Engine/source/T3D/sfx/sfx3DWorld.cpp +++ b/Engine/source/T3D/sfx/sfx3DWorld.cpp @@ -91,7 +91,9 @@ void SFX3DObject::getEarTransform( MatrixF& transform ) const if ( !shapeInstance ) { // Just in case. - transform = mObject->getTransform(); + GameConnection* connection = dynamic_cast(NetConnection::getConnectionToServer()); + if ( !connection || !connection->getControlCameraTransform( 0.0f, &transform ) ) + transform = mObject->getTransform(); return; } diff --git a/Engine/source/T3D/tsStatic.cpp b/Engine/source/T3D/tsStatic.cpp index 1474bf96d..f072528cd 100644 --- a/Engine/source/T3D/tsStatic.cpp +++ b/Engine/source/T3D/tsStatic.cpp @@ -702,41 +702,9 @@ bool TSStatic::castRay(const Point3F &start, const Point3F &end, RayInfo* info) if ( mCollisionType == Bounds ) { - F32 st, et, fst = 0.0f, fet = 1.0f; - F32 *bmin = &mObjBox.minExtents.x; - F32 *bmax = &mObjBox.maxExtents.x; - F32 const *si = &start.x; - F32 const *ei = &end.x; - - for ( U32 i = 0; i < 3; i++ ) - { - if (*si < *ei) - { - if ( *si > *bmax || *ei < *bmin ) - return false; - F32 di = *ei - *si; - st = ( *si < *bmin ) ? ( *bmin - *si ) / di : 0.0f; - et = ( *ei > *bmax ) ? ( *bmax - *si ) / di : 1.0f; - } - else - { - if ( *ei > *bmax || *si < *bmin ) - return false; - F32 di = *ei - *si; - st = ( *si > *bmax ) ? ( *bmax - *si ) / di : 0.0f; - et = ( *ei < *bmin ) ? ( *bmin - *si ) / di : 1.0f; - } - if ( st > fst ) fst = st; - if ( et < fet ) fet = et; - if ( fet < fst ) - return false; - bmin++; bmax++; - si++; ei++; - } - - info->normal = start - end; - info->normal.normalizeSafe(); - getTransform().mulV( info->normal ); + F32 fst; + if (!mObjBox.collideLine(start, end, &fst, &info->normal)) + return false; info->t = fst; info->object = this; diff --git a/Engine/source/T3D/turret/turretShape.cpp b/Engine/source/T3D/turret/turretShape.cpp index 5d53fabe8..b824d75cd 100644 --- a/Engine/source/T3D/turret/turretShape.cpp +++ b/Engine/source/T3D/turret/turretShape.cpp @@ -1155,7 +1155,7 @@ void TurretShape::unpackUpdate(NetConnection *connection, BitStream *stream) void TurretShape::getWeaponMountTransform( S32 index, const MatrixF &xfm, MatrixF *outMat ) { // Returns mount point to world space transform - if ( index >= 0 && index < SceneObject::NumMountPoints) { + if ( index >= 0 && index < ShapeBase::MaxMountedImages) { S32 ni = mDataBlock->weaponMountNode[index]; if (ni != -1) { MatrixF mountTransform = mShapeInstance->mNodeTransforms[ni]; @@ -1180,7 +1180,7 @@ void TurretShape::getWeaponMountTransform( S32 index, const MatrixF &xfm, Matrix void TurretShape::getRenderWeaponMountTransform( F32 delta, S32 mountPoint, const MatrixF &xfm, MatrixF *outMat ) { // Returns mount point to world space transform - if ( mountPoint >= 0 && mountPoint < SceneObject::NumMountPoints) { + if ( mountPoint >= 0 && mountPoint < ShapeBase::MaxMountedImages) { S32 ni = mDataBlock->weaponMountNode[mountPoint]; if (ni != -1) { MatrixF mountTransform = mShapeInstance->mNodeTransforms[ni]; diff --git a/Engine/source/app/version.h b/Engine/source/app/version.h index 963fd452e..9f68b2cbc 100644 --- a/Engine/source/app/version.h +++ b/Engine/source/app/version.h @@ -41,10 +41,10 @@ /// code version, the game name, and which type of game it is (TGB, TGE, TGEA, etc.). /// /// Version number is major * 1000 + minor * 100 + revision * 10. -#define TORQUE_GAME_ENGINE 3610 +#define TORQUE_GAME_ENGINE 3620 /// Human readable engine version string. -#define TORQUE_GAME_ENGINE_VERSION_STRING "3.6.1" +#define TORQUE_GAME_ENGINE_VERSION_STRING "3.6.2" /// Gets the engine version number. The version number is specified as a global in version.cc U32 getVersionNumber(); diff --git a/Engine/source/console/fileSystemFunctions.cpp b/Engine/source/console/fileSystemFunctions.cpp index 75b1ba9f7..b37a61386 100644 --- a/Engine/source/console/fileSystemFunctions.cpp +++ b/Engine/source/console/fileSystemFunctions.cpp @@ -696,7 +696,7 @@ DefineEngineFunction(makeFullPath, String, ( const char* path, const char* cwd ) "@ingroup FileSystem") { static const U32 bufSize = 512; - char *buf = Con::getReturnBuffer(buf); + char *buf = Con::getReturnBuffer(bufSize); Platform::makeFullPathName(path, buf, bufSize, dStrlen(cwd) > 1 ? cwd : NULL); return buf; } @@ -723,7 +723,7 @@ DefineEngineFunction(pathConcat, String, ( const char* path, const char* file),, "@ingroup FileSystem") { static const U32 bufSize = 1024; - char *buf = Con::getReturnBuffer(buf); + char *buf = Con::getReturnBuffer(bufSize); Platform::makeFullPathName(file, buf, bufSize, path); return buf; } diff --git a/Engine/source/gui/core/guiCanvas.cpp b/Engine/source/gui/core/guiCanvas.cpp index 034a94020..ef7bf3630 100644 --- a/Engine/source/gui/core/guiCanvas.cpp +++ b/Engine/source/gui/core/guiCanvas.cpp @@ -2225,7 +2225,10 @@ DefineEngineMethod( GuiCanvas, reset, void, (),, } DefineEngineMethod( GuiCanvas, getCursorPos, Point2I, (),, - "@brief Get the current position of the cursor.\n\n" + "@brief Get the current position of the cursor in screen-space. Note that this position" + " might be outside the Torque window. If you want to get the position within the Canvas," + " call screenToClient on the result.\n\n" + "@see Canvas::screenToClient()\n\n" "@param param Description\n\n" "@tsexample\n" "%cursorPos = Canvas.getCursorPos();\n" diff --git a/Engine/source/gui/core/guiControl.cpp b/Engine/source/gui/core/guiControl.cpp index b78506f39..defea875c 100644 --- a/Engine/source/gui/core/guiControl.cpp +++ b/Engine/source/gui/core/guiControl.cpp @@ -1427,6 +1427,7 @@ bool GuiControl::cursorInControl() if (! root) return false; Point2I pt = root->getCursorPos(); + pt = root->getPlatformWindow() ? root->getPlatformWindow()->screenToClient(pt) : pt; Point2I extent = getExtent(); Point2I offset = localToGlobalCoord(Point2I(0, 0)); if (pt.x >= offset.x && pt.y >= offset.y && diff --git a/Engine/source/materials/processedFFMaterial.cpp b/Engine/source/materials/processedFFMaterial.cpp index 500783aee..1a1a4f9e5 100644 --- a/Engine/source/materials/processedFFMaterial.cpp +++ b/Engine/source/materials/processedFFMaterial.cpp @@ -368,7 +368,7 @@ void ProcessedFFMaterial::_initPassStateBlock( RenderPassData *rpd, GFXStateBloc result.blendDefined = true; result.blendEnable = true; result.blendSrc = GFXBlendOne; - result.blendSrc = GFXBlendOne; + result.blendDest = GFXBlendZero; } // This is here for generic FF shader fallbacks. diff --git a/Engine/source/materials/processedShaderMaterial.cpp b/Engine/source/materials/processedShaderMaterial.cpp index 410773d7e..1b17c17ce 100644 --- a/Engine/source/materials/processedShaderMaterial.cpp +++ b/Engine/source/materials/processedShaderMaterial.cpp @@ -328,6 +328,7 @@ void ProcessedShaderMaterial::_determineFeatures( U32 stageNum, if ( features.hasFeature( MFT_UseInstancing ) && mMaxStages == 1 && !mMaterial->mGlow[0] && + !mMaterial->mDynamicCubemap && shaderVersion >= 3.0f ) fd.features.addFeature( MFT_UseInstancing ); diff --git a/Engine/source/renderInstance/renderBinManager.cpp b/Engine/source/renderInstance/renderBinManager.cpp index 5fb05eebf..df41b634c 100644 --- a/Engine/source/renderInstance/renderBinManager.cpp +++ b/Engine/source/renderInstance/renderBinManager.cpp @@ -122,7 +122,6 @@ void RenderBinManager::internalAddElement(RenderInst* inst) mElementList.increment(); MainSortElem &elem = mElementList.last(); elem.inst = inst; - elem.key = elem.key2 = 0; elem.key = inst->defaultKey; elem.key2 = inst->defaultKey2; diff --git a/Engine/source/scene/simPath.cpp b/Engine/source/scene/simPath.cpp index 1ab5677ec..c25764ad1 100644 --- a/Engine/source/scene/simPath.cpp +++ b/Engine/source/scene/simPath.cpp @@ -371,7 +371,6 @@ Marker::Marker() mTypeMask |= MarkerObjectType; mSeqNum = 0; - mSmoothingType = SmoothingTypeLinear; mMSToNext = 1000; mSmoothingType = SmoothingTypeSpline; mKnotType = KnotTypeNormal; diff --git a/Engine/source/ts/tsMesh.cpp b/Engine/source/ts/tsMesh.cpp index 6648ae931..0ed173297 100644 --- a/Engine/source/ts/tsMesh.cpp +++ b/Engine/source/ts/tsMesh.cpp @@ -784,7 +784,7 @@ bool TSMesh::castRayRendered( S32 frame, const Point3F & start, const Point3F & // gonna depend on what kind of primitive it is... if ( (draw.matIndex & TSDrawPrimitive::TypeMask) == TSDrawPrimitive::Triangles ) { - for ( S32 j = 0; j < draw.numElements-2; j++) + for ( S32 j = 0; j < draw.numElements-2; j += 3 ) { idx0 = indices[drawStart + j + 0]; idx1 = indices[drawStart + j + 1]; diff --git a/README.md b/README.md index be83ee28c..5aed4b20a 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -Torque 3D v3.6.1 +Torque 3D v3.6.2 ================ MIT Licensed Open Source version of [Torque 3D](http://www.garagegames.com/products/torque-3d) from [GarageGames](http://www.garagegames.com) @@ -21,7 +21,9 @@ Pre-compiled Version In addition to GitHub we also have a couple of pre-packaged files for you to download if you would prefer to not compile the code yourself: -* [Complete Torque 3D 3.6.1 zip package](http://mit.garagegames.com/Torque3D-3-6-1.zip) with updated TorqueScript documentation, the *Project Manager*, and compiled versions of the templates. +* [Torque 3D 3.6 Full template](http://mit.garagegames.com/Torque3D-3-6-1-FullTemplate.zip), which contains precompiled binaries. +* [Complete Torque 3D 3.6 zip package](http://mit.garagegames.com/Torque3D-3-6-1.zip) containing the contents of this repository. +* [Windows binaries for 3.6.2](https://github.com/GarageGames/Torque3D/releases/tag/v3.6.2) which you can drop into your existing script projects. * [Torque 3D Project Manager v2.1](http://mit.garagegames.com/T3DProjectManager-2-1.zip) on its own for use in your T3D forks. If you're looking for an older release see the [Torque 3D Archive](https://github.com/GarageGames/Torque3D/wiki/Torque-3D-Archive) diff --git a/Templates/Empty/game/core/art/gui/FrameOverlayGui.gui b/Templates/Empty/game/core/art/gui/FrameOverlayGui.gui index 04a3f1472..eb810ee46 100644 --- a/Templates/Empty/game/core/art/gui/FrameOverlayGui.gui +++ b/Templates/Empty/game/core/art/gui/FrameOverlayGui.gui @@ -23,6 +23,8 @@ modal = "True"; helpTag = "0"; expression = "10"; + command = "Canvas.popDialog(FrameOverlayGui);"; + accelerator = "escape"; }; }; //--- OBJECT WRITE END --- diff --git a/Templates/Empty/game/core/scripts/client/postFx/default.postfxpreset.cs b/Templates/Empty/game/core/scripts/client/postFx/default.postfxpreset.cs index 35843b249..2fe077e63 100644 --- a/Templates/Empty/game/core/scripts/client/postFx/default.postfxpreset.cs +++ b/Templates/Empty/game/core/scripts/client/postFx/default.postfxpreset.cs @@ -20,6 +20,11 @@ // IN THE SOFTWARE. //----------------------------------------------------------------------------- +$PostFXManager::Settings::EnableDOF = "0"; +$PostFXManager::Settings::EnabledSSAO = "0"; +$PostFXManager::Settings::EnableHDR = "0"; +$PostFXManager::Settings::EnableLightRays = "0"; +$PostFXManager::Settings::EnablePostFX = "0"; $PostFXManager::Settings::DOF::BlurCurveFar = ""; $PostFXManager::Settings::DOF::BlurCurveNear = ""; $PostFXManager::Settings::DOF::BlurMax = ""; @@ -59,4 +64,4 @@ $PostFXManager::Settings::SSAO::sNormalPow = "1"; $PostFXManager::Settings::SSAO::sNormalTol = "0"; $PostFXManager::Settings::SSAO::sRadius = "0.1"; $PostFXManager::Settings::SSAO::sStrength = "6"; -$PostFXManager::Settings::ColorCorrectionRamp = "core/scripts/client/postFx/null_color_ramp.png"; \ No newline at end of file +$PostFXManager::Settings::ColorCorrectionRamp = "core/scripts/client/postFx/null_color_ramp.png"; diff --git a/Templates/Empty/game/scripts/client/default.bind.cs b/Templates/Empty/game/scripts/client/default.bind.cs index fa7455271..51dc53d4b 100644 --- a/Templates/Empty/game/scripts/client/default.bind.cs +++ b/Templates/Empty/game/scripts/client/default.bind.cs @@ -441,7 +441,12 @@ GlobalActionMap.bind(keyboard, "ctrl o", bringUpOptions); //------------------------------------------------------------------------------ // Debugging Functions //------------------------------------------------------------------------------ - +function showMetrics(%val) +{ + if(%val) + metrics("fps gfx shadow sfx terrain groundcover forest net"); +} +GlobalActionMap.bind(keyboard, "ctrl F2", showMetrics); //------------------------------------------------------------------------------ // diff --git a/Templates/Empty/game/scripts/gui/startupGui.cs b/Templates/Empty/game/scripts/gui/startupGui.cs index 675daeafa..afd4be7d4 100644 --- a/Templates/Empty/game/scripts/gui/startupGui.cs +++ b/Templates/Empty/game/scripts/gui/startupGui.cs @@ -45,6 +45,12 @@ function loadStartup() //SFXPlayOnce(AudioGui, "art/sound/gui/startup");//SFXPlay(startsnd); } +function StartupGui::onWake(%this) +{ + $enableDirectInput = "1"; + activateDirectInput(); +} + function StartupGui::click(%this) { %this.done = true; diff --git a/Templates/Full/game/core/art/gui/FrameOverlayGui.gui b/Templates/Full/game/core/art/gui/FrameOverlayGui.gui index 04a3f1472..eb810ee46 100644 --- a/Templates/Full/game/core/art/gui/FrameOverlayGui.gui +++ b/Templates/Full/game/core/art/gui/FrameOverlayGui.gui @@ -23,6 +23,8 @@ modal = "True"; helpTag = "0"; expression = "10"; + command = "Canvas.popDialog(FrameOverlayGui);"; + accelerator = "escape"; }; }; //--- OBJECT WRITE END --- diff --git a/Templates/Full/game/core/scripts/client/postFx/default.postfxpreset.cs b/Templates/Full/game/core/scripts/client/postFx/default.postfxpreset.cs index 35843b249..2fe077e63 100644 --- a/Templates/Full/game/core/scripts/client/postFx/default.postfxpreset.cs +++ b/Templates/Full/game/core/scripts/client/postFx/default.postfxpreset.cs @@ -20,6 +20,11 @@ // IN THE SOFTWARE. //----------------------------------------------------------------------------- +$PostFXManager::Settings::EnableDOF = "0"; +$PostFXManager::Settings::EnabledSSAO = "0"; +$PostFXManager::Settings::EnableHDR = "0"; +$PostFXManager::Settings::EnableLightRays = "0"; +$PostFXManager::Settings::EnablePostFX = "0"; $PostFXManager::Settings::DOF::BlurCurveFar = ""; $PostFXManager::Settings::DOF::BlurCurveNear = ""; $PostFXManager::Settings::DOF::BlurMax = ""; @@ -59,4 +64,4 @@ $PostFXManager::Settings::SSAO::sNormalPow = "1"; $PostFXManager::Settings::SSAO::sNormalTol = "0"; $PostFXManager::Settings::SSAO::sRadius = "0.1"; $PostFXManager::Settings::SSAO::sStrength = "6"; -$PostFXManager::Settings::ColorCorrectionRamp = "core/scripts/client/postFx/null_color_ramp.png"; \ No newline at end of file +$PostFXManager::Settings::ColorCorrectionRamp = "core/scripts/client/postFx/null_color_ramp.png"; diff --git a/Templates/Full/game/scripts/client/default.bind.cs b/Templates/Full/game/scripts/client/default.bind.cs index 17092d5b2..d2ca23730 100644 --- a/Templates/Full/game/scripts/client/default.bind.cs +++ b/Templates/Full/game/scripts/client/default.bind.cs @@ -615,7 +615,12 @@ GlobalActionMap.bind(keyboard, "ctrl o", bringUpOptions); //------------------------------------------------------------------------------ // Debugging Functions //------------------------------------------------------------------------------ - +function showMetrics(%val) +{ + if(%val) + metrics("fps gfx shadow sfx terrain groundcover forest net"); +} +GlobalActionMap.bind(keyboard, "ctrl F2", showMetrics); //------------------------------------------------------------------------------ // diff --git a/Templates/Full/game/scripts/gui/startupGui.cs b/Templates/Full/game/scripts/gui/startupGui.cs index 675daeafa..afd4be7d4 100644 --- a/Templates/Full/game/scripts/gui/startupGui.cs +++ b/Templates/Full/game/scripts/gui/startupGui.cs @@ -45,6 +45,12 @@ function loadStartup() //SFXPlayOnce(AudioGui, "art/sound/gui/startup");//SFXPlay(startsnd); } +function StartupGui::onWake(%this) +{ + $enableDirectInput = "1"; + activateDirectInput(); +} + function StartupGui::click(%this) { %this.done = true;