mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-16 09:04:38 +00:00
uninitialized variables-terrain
This commit is contained in:
parent
fabd5864fa
commit
c2e74f375a
6 changed files with 28 additions and 4 deletions
|
|
@ -58,7 +58,11 @@ TerrCell::TerrCell()
|
||||||
mHasEmpty( false ),
|
mHasEmpty( false ),
|
||||||
mMaterial( NULL ),
|
mMaterial( NULL ),
|
||||||
mMaterials( 0 ),
|
mMaterials( 0 ),
|
||||||
mIsInteriorOnly( false )
|
mIsInteriorOnly( false ),
|
||||||
|
mSize(smMinCellSize),
|
||||||
|
mLevel(0),
|
||||||
|
mTerrain(NULL),
|
||||||
|
mRadius(0.5f)
|
||||||
{
|
{
|
||||||
dMemset( mChildren, 0, sizeof( mChildren ) );
|
dMemset( mChildren, 0, sizeof( mChildren ) );
|
||||||
zode_vertexBuffer = 0;
|
zode_vertexBuffer = 0;
|
||||||
|
|
|
||||||
|
|
@ -73,7 +73,8 @@ TerrainCellMaterial::TerrainCellMaterial()
|
||||||
: mTerrain( NULL ),
|
: mTerrain( NULL ),
|
||||||
mCurrPass( 0 ),
|
mCurrPass( 0 ),
|
||||||
mDeferredMat( NULL ),
|
mDeferredMat( NULL ),
|
||||||
mReflectMat( NULL )
|
mReflectMat( NULL ),
|
||||||
|
mMaterials(0)
|
||||||
{
|
{
|
||||||
smAllMaterials.push_back( this );
|
smAllMaterials.push_back( this );
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -58,6 +58,8 @@ protected:
|
||||||
public:
|
public:
|
||||||
|
|
||||||
MaterialInfo()
|
MaterialInfo()
|
||||||
|
:mat(NULL), layerId(0), detailTexConst(NULL), macroTexConst(NULL), normalTexConst(NULL),
|
||||||
|
compositeTexConst(NULL), detailInfoVConst(NULL), detailInfoPConst(NULL), macroInfoVConst(NULL), macroInfoPConst(NULL)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -92,7 +94,15 @@ protected:
|
||||||
public:
|
public:
|
||||||
|
|
||||||
Pass()
|
Pass()
|
||||||
: shader( NULL )
|
: shader( NULL ),
|
||||||
|
modelViewProjConst(NULL), worldViewOnly(NULL), viewToObj(NULL),
|
||||||
|
eyePosWorldConst(NULL), eyePosConst(NULL),
|
||||||
|
objTransConst(NULL), worldToObjConst(NULL), vEyeConst(NULL),
|
||||||
|
layerSizeConst(NULL), lightParamsConst(NULL), lightInfoBufferConst(NULL),
|
||||||
|
baseTexMapConst(NULL), layerTexConst(NULL),
|
||||||
|
lightMapTexConst(NULL),
|
||||||
|
squareSize(NULL), oneOverTerrainSize(NULL),
|
||||||
|
fogDataConst(NULL), fogColorConst(NULL)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -167,13 +167,20 @@ S32 sFaceList135[16][9] = {
|
||||||
|
|
||||||
TerrainConvex::TerrainConvex()
|
TerrainConvex::TerrainConvex()
|
||||||
{
|
{
|
||||||
|
halfA = true;
|
||||||
|
square = NULL;
|
||||||
|
squareId = 0;
|
||||||
|
material = 0;
|
||||||
|
split45 = false;
|
||||||
|
|
||||||
mType = TerrainConvexType;
|
mType = TerrainConvexType;
|
||||||
}
|
}
|
||||||
|
|
||||||
TerrainConvex::TerrainConvex( const TerrainConvex &cv )
|
TerrainConvex::TerrainConvex( const TerrainConvex &cv )
|
||||||
{
|
{
|
||||||
mType = TerrainConvexType;
|
mType = TerrainConvexType;
|
||||||
|
halfA = false;
|
||||||
|
square = NULL;
|
||||||
// Only a partial copy...
|
// Only a partial copy...
|
||||||
mObject = cv.mObject;
|
mObject = cv.mObject;
|
||||||
split45 = cv.split45;
|
split45 = cv.split45;
|
||||||
|
|
|
||||||
|
|
@ -190,6 +190,7 @@ TerrainBlock::TerrainBlock()
|
||||||
mMaxDetailDistance( 0.0f ),
|
mMaxDetailDistance( 0.0f ),
|
||||||
mBaseTexScaleConst( NULL ),
|
mBaseTexScaleConst( NULL ),
|
||||||
mBaseTexIdConst( NULL ),
|
mBaseTexIdConst( NULL ),
|
||||||
|
mBaseLayerSizeConst(NULL),
|
||||||
mDetailsDirty( false ),
|
mDetailsDirty( false ),
|
||||||
mLayerTexDirty( false ),
|
mLayerTexDirty( false ),
|
||||||
mBaseTexSize( 1024 ),
|
mBaseTexSize( 1024 ),
|
||||||
|
|
|
||||||
|
|
@ -46,6 +46,7 @@ template<> ResourceBase::Signature Resource<TerrainFile>::signature()
|
||||||
|
|
||||||
TerrainFile::TerrainFile()
|
TerrainFile::TerrainFile()
|
||||||
: mSize( 256 ),
|
: mSize( 256 ),
|
||||||
|
mGridLevels(0),
|
||||||
mFileVersion( FILE_VERSION ),
|
mFileVersion( FILE_VERSION ),
|
||||||
mNeedsResaving( false )
|
mNeedsResaving( false )
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue