Commit d01b48c9 authored by Daniel Buckmaster's avatar Daniel Buckmaster

Merge pull request #885 from GarageGames/development-3.6

Version 3.6.2
parents 6b2f334d 3902ebb8
# 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 ;).
......@@ -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();
}
......
......@@ -964,10 +964,7 @@ void Explosion::onRemove()
mMainEmitter = NULL;
}
if (getSceneManager() != NULL)
getSceneManager()->removeObjectFromScene(this);
if (getContainer() != NULL)
getContainer()->removeObject(this);
removeFromScene();
Parent::onRemove();
}
......
......@@ -415,11 +415,7 @@ void Splash::onRemove()
ringList.clear();
if( getSceneManager() )
getSceneManager()->removeObjectFromScene(this);
if( getContainer() )
getContainer()->removeObject(this);
removeFromScene();
Parent::onRemove();
}
......
......@@ -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.
......
......@@ -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)
......
......@@ -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"
);
......
......@@ -91,7 +91,9 @@ void SFX3DObject::getEarTransform( MatrixF& transform ) const
if ( !shapeInstance )
{
// Just in case.
transform = mObject->getTransform();
GameConnection* connection = dynamic_cast<GameConnection *>(NetConnection::getConnectionToServer());
if ( !connection || !connection->getControlCameraTransform( 0.0f, &transform ) )
transform = mObject->getTransform();
return;
}
......
......@@ -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;
......
......@@ -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];
......
......@@ -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();
......
......@@ -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;
}
......
......@@ -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"
......
......@@ -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 &&
......
......@@ -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.
......
......@@ -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 );
......
......@@ -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;
......
......@@ -371,7 +371,6 @@ Marker::Marker()
mTypeMask |= MarkerObjectType;
mSeqNum = 0;
mSmoothingType = SmoothingTypeLinear;
mMSToNext = 1000;
mSmoothingType = SmoothingTypeSpline;
mKnotType = KnotTypeNormal;
......
......@@ -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];
......
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)
......
......@@ -23,6 +23,8 @@
modal = "True";
helpTag = "0";
expression = "10";
command = "Canvas.popDialog(FrameOverlayGui);";
accelerator = "escape";
};
};
//--- OBJECT WRITE END ---
......@@ -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";
......@@ -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);
//------------------------------------------------------------------------------
//
......
......@@ -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;
......
......@@ -23,6 +23,8 @@
modal = "True";
helpTag = "0";
expression = "10";
command = "Canvas.popDialog(FrameOverlayGui);";
accelerator = "escape";
};
};
//--- OBJECT WRITE END ---
......@@ -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";
......@@ -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);
//------------------------------------------------------------------------------
//
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment