mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-28 15:55:39 +00:00
* BugFix: Clear a lot of warnings and correct a few actual programming errors along the way.
This commit is contained in:
parent
ef514d0e6b
commit
1b6b803a20
61 changed files with 120 additions and 118 deletions
|
|
@ -19,7 +19,6 @@
|
|||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
// IN THE SOFTWARE.
|
||||
//-----------------------------------------------------------------------------
|
||||
#pragma once
|
||||
|
||||
#ifndef MATERIALASSET_H
|
||||
#include "MaterialAsset.h"
|
||||
|
|
@ -171,10 +170,16 @@ void MaterialAsset::initializeAsset()
|
|||
if (Torque::FS::IsScriptFile(mScriptPath))
|
||||
{
|
||||
if (!Sim::findObject(mMatDefinitionName))
|
||||
if (Con::executeFile(mScriptPath, false, false))
|
||||
mLoadedState = ScriptLoaded;
|
||||
else
|
||||
mLoadedState = Failed;
|
||||
{
|
||||
if (Con::executeFile(mScriptPath, false, false))
|
||||
{
|
||||
mLoadedState = ScriptLoaded;
|
||||
}
|
||||
else
|
||||
{
|
||||
mLoadedState = Failed;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
loadMaterial();
|
||||
|
|
|
|||
|
|
@ -1409,7 +1409,7 @@ void AssetImporter::processImportAssets(AssetImportObject* assetItem)
|
|||
Con::executef(this, processCommand.c_str(), item);
|
||||
}
|
||||
|
||||
item->importStatus == AssetImportObject::Processed;
|
||||
item->importStatus = AssetImportObject::Processed;
|
||||
|
||||
//try recusing on the children(if any)
|
||||
processImportAssets(item);
|
||||
|
|
|
|||
|
|
@ -931,15 +931,6 @@ public:
|
|||
return imagePath;
|
||||
}
|
||||
|
||||
static inline const char* makeFullPath(const String& path)
|
||||
{
|
||||
char qualifiedFilePath[2048];
|
||||
|
||||
Platform::makeFullPathName(path.c_str(), qualifiedFilePath, sizeof(qualifiedFilePath));
|
||||
|
||||
return qualifiedFilePath;
|
||||
}
|
||||
|
||||
//
|
||||
void setTargetModuleId(const String& moduleId) { targetModuleId = moduleId; }
|
||||
const String& getTargetModuleId() { return targetModuleId; }
|
||||
|
|
|
|||
|
|
@ -318,10 +318,10 @@ void ConvexShape::initPersistFields()
|
|||
|
||||
addGroup( "Internal" );
|
||||
|
||||
addProtectedField( "surface", TypeRealString, NULL, &protectedSetSurface, &defaultProtectedGetFn,
|
||||
addProtectedField( "surface", TypeRealString, 0, &protectedSetSurface, &defaultProtectedGetFn,
|
||||
"Do not modify, for internal use.", AbstractClassRep::FIELD_HideInInspectors );
|
||||
|
||||
addProtectedField( "surfaceTexture", TypeRealString, NULL, &protectedSetSurfaceTexture, &defaultProtectedGetFn,
|
||||
addProtectedField( "surfaceTexture", TypeRealString, 0, &protectedSetSurfaceTexture, &defaultProtectedGetFn,
|
||||
"Do not modify, for internal use.", AbstractClassRep::FIELD_HideInInspectors );
|
||||
|
||||
endGroup( "Internal" );
|
||||
|
|
|
|||
|
|
@ -1914,7 +1914,11 @@ void ParticleEmitter::copyToVB( const Point3F &camPos, const LinearColorF &ambie
|
|||
{
|
||||
SortParticle* partPtr = orderedVector.address();
|
||||
for (U32 i = 0; i < n_parts - 1; i++, partPtr++, buffPtr -= 4)
|
||||
setupRibbon(partPtr->p, partPtr++->p, partPtr--->p, camPos, ambientColor, buffPtr);
|
||||
{
|
||||
SortParticle* part = partPtr;
|
||||
partPtr++;
|
||||
setupRibbon(part->p, partPtr->p, partPtr->p, camPos, ambientColor, buffPtr);
|
||||
}
|
||||
}
|
||||
// do unsorted-oriented particles
|
||||
else
|
||||
|
|
@ -1933,7 +1937,11 @@ void ParticleEmitter::copyToVB( const Point3F &camPos, const LinearColorF &ambie
|
|||
{
|
||||
SortParticle* partPtr = orderedVector.address();
|
||||
for (U32 i = 0; i < n_parts - 1; i++, partPtr++, buffPtr += 4)
|
||||
setupRibbon(partPtr->p, partPtr++->p, partPtr--->p, camPos, ambientColor, buffPtr);
|
||||
{
|
||||
SortParticle* part = partPtr;
|
||||
partPtr++;
|
||||
setupRibbon(part->p, partPtr->p, partPtr->p, camPos, ambientColor, buffPtr);
|
||||
}
|
||||
}
|
||||
// do unsorted-oriented particles
|
||||
else
|
||||
|
|
|
|||
|
|
@ -996,7 +996,7 @@ void Precipitation::initRenderObjects()
|
|||
// entire or a partially filled vb.
|
||||
mRainIB.set(GFX, mMaxVBDrops * 6, 0, GFXBufferTypeStatic);
|
||||
U16 *idxBuff;
|
||||
mRainIB.lock(&idxBuff, NULL, NULL, NULL);
|
||||
mRainIB.lock(&idxBuff, NULL, 0, 0);
|
||||
for( U32 i=0; i < mMaxVBDrops; i++ )
|
||||
{
|
||||
//
|
||||
|
|
|
|||
|
|
@ -807,7 +807,7 @@ bool GameConnection::isValidControlCameraFov(F32 fov)
|
|||
return cObj->isValidCameraFov(fov);
|
||||
}
|
||||
|
||||
return NULL;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool GameConnection::setControlCameraFov(F32 fov)
|
||||
|
|
|
|||
|
|
@ -116,7 +116,7 @@ class ShapeBaseConvex : public Convex
|
|||
Box3F box;
|
||||
|
||||
public:
|
||||
ShapeBaseConvex() :pShapeBase(NULL), transform(NULL), hullId(NULL), nodeTransform(0) { mType = ShapeBaseConvexType; }
|
||||
ShapeBaseConvex() :pShapeBase(NULL), transform(NULL), hullId(0), nodeTransform(0) { mType = ShapeBaseConvexType; }
|
||||
ShapeBaseConvex(const ShapeBaseConvex& cv) {
|
||||
mObject = cv.mObject;
|
||||
pShapeBase = cv.pShapeBase;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue