diff --git a/Engine/source/T3D/fps/guiClockHud.cpp b/Engine/source/T3D/fps/guiClockHud.cpp index 334b272ea..3475b92c9 100644 --- a/Engine/source/T3D/fps/guiClockHud.cpp +++ b/Engine/source/T3D/fps/guiClockHud.cpp @@ -87,6 +87,7 @@ ConsoleDocClass( GuiClockHud, GuiClockHud::GuiClockHud() { mShowFrame = mShowFill = true; + mTimeReversed = false; mFillColor.set(0, 0, 0, 0.5); mFrameColor.set(0, 1, 0, 1); mTextColor.set( 0, 1, 0, 1 ); diff --git a/Engine/source/T3D/fps/guiShapeNameHud.cpp b/Engine/source/T3D/fps/guiShapeNameHud.cpp index 0609bbd0e..9556330d2 100644 --- a/Engine/source/T3D/fps/guiShapeNameHud.cpp +++ b/Engine/source/T3D/fps/guiShapeNameHud.cpp @@ -117,8 +117,11 @@ GuiShapeNameHud::GuiShapeNameHud() { mFillColor.set( 0.25f, 0.25f, 0.25f, 0.25f ); mFrameColor.set( 0, 1, 0, 1 ); + mLabelFillColor.set( 0.25f, 0.25f, 0.25f, 0.25f ); + mLabelFrameColor.set( 0, 1, 0, 1 ); mTextColor.set( 0, 1, 0, 1 ); mShowFrame = mShowFill = true; + mShowLabelFrame = mShowLabelFill = false; mVerticalOffset = 0.5f; mDistanceFade = 0.1f; mLabelPadding.set(0, 0); diff --git a/Engine/source/T3D/fx/groundCover.cpp b/Engine/source/T3D/fx/groundCover.cpp index bfc2f7737..9262487dd 100644 --- a/Engine/source/T3D/fx/groundCover.cpp +++ b/Engine/source/T3D/fx/groundCover.cpp @@ -148,7 +148,7 @@ protected: public: - GroundCoverCell() {} + GroundCoverCell() : mDirty(false) {} ~GroundCoverCell() { diff --git a/Engine/source/T3D/fx/lightning.cpp b/Engine/source/T3D/fx/lightning.cpp index 4465e1d1d..125c5891d 100644 --- a/Engine/source/T3D/fx/lightning.cpp +++ b/Engine/source/T3D/fx/lightning.cpp @@ -156,6 +156,7 @@ LightningStrikeEvent::LightningStrikeEvent() { mLightning = NULL; mTarget = NULL; + mClientId = 0; } LightningStrikeEvent::~LightningStrikeEvent() diff --git a/Engine/source/app/net/serverQuery.cpp b/Engine/source/app/net/serverQuery.cpp index 8f1b58ecf..27453ff18 100644 --- a/Engine/source/app/net/serverQuery.cpp +++ b/Engine/source/app/net/serverQuery.cpp @@ -240,6 +240,7 @@ struct ServerFilter ServerFilter() { + type = Normal; queryFlags = 0; gameType = NULL; missionType = NULL; diff --git a/Engine/source/console/CMDscan.cpp b/Engine/source/console/CMDscan.cpp index cdc3ea594..98f31fa3c 100644 --- a/Engine/source/console/CMDscan.cpp +++ b/Engine/source/console/CMDscan.cpp @@ -2179,6 +2179,7 @@ void CMDerror(char *format, ...) #else vsnprintf( tempBuf, BUFMAX, format, args ); #endif + va_end(args); if(fileName) { diff --git a/Engine/source/console/CMDscan.l b/Engine/source/console/CMDscan.l index 471acf807..4464fb5f4 100644 --- a/Engine/source/console/CMDscan.l +++ b/Engine/source/console/CMDscan.l @@ -250,6 +250,7 @@ void CMDerror(char *format, ...) #else vsnprintf( tempBuf, BUFMAX, format, args ); #endif + va_end(args); if(fileName) { diff --git a/Engine/source/console/console.cpp b/Engine/source/console/console.cpp index 83639a67f..e9f7cdf8a 100644 --- a/Engine/source/console/console.cpp +++ b/Engine/source/console/console.cpp @@ -1162,6 +1162,7 @@ const char *evaluatef(const char* string, ...) va_list args; va_start(args, string); dVsprintf(buffer, sizeof(buffer), string, args); + va_end(args); CodeBlock *newCodeBlock = new CodeBlock(); return newCodeBlock->compileExec(NULL, buffer, false, 0); } diff --git a/Engine/source/core/strings/stringFunctions.cpp b/Engine/source/core/strings/stringFunctions.cpp index 6807dc1e2..ab0757eac 100644 --- a/Engine/source/core/strings/stringFunctions.cpp +++ b/Engine/source/core/strings/stringFunctions.cpp @@ -389,6 +389,7 @@ void dPrintf(const char *format, ...) va_list args; va_start(args, format); vprintf(format, args); + va_end(args); } S32 dVprintf(const char *format, va_list arglist) @@ -402,6 +403,7 @@ S32 dSprintf(char *buffer, U32 bufferSize, const char *format, ...) va_start(args, format); S32 len = vsnprintf(buffer, bufferSize, format, args); + va_end(args); AssertWarn( len < bufferSize, "Buffer too small in call to dSprintf!" ); @@ -470,7 +472,9 @@ S32 dSscanf(const char *buffer, const char *format, ...) #else va_list args; va_start(args, format); - return vsscanf(buffer, format, args); + S32 res = vsscanf(buffer, format, args); + va_end(args); + return res; #endif } diff --git a/Engine/source/core/strings/unicode.cpp b/Engine/source/core/strings/unicode.cpp index 4496da76b..64acee244 100644 --- a/Engine/source/core/strings/unicode.cpp +++ b/Engine/source/core/strings/unicode.cpp @@ -103,13 +103,17 @@ struct UTF16Cache dMemcpy(mString, other.mString, mLength * sizeof(UTF16)); } - void operator =(const UTF16Cache &other) + UTF16Cache & operator =(const UTF16Cache &other) { - delete [] mString; + if (&other != this) + { + delete [] mString; - mLength = other.mLength; - mString = new UTF16[mLength]; - dMemcpy(mString, other.mString, mLength * sizeof(UTF16)); + mLength = other.mLength; + mString = new UTF16[mLength]; + dMemcpy(mString, other.mString, mLength * sizeof(UTF16)); + } + return *this; } ~UTF16Cache() diff --git a/Engine/source/core/util/test/strTest.cpp b/Engine/source/core/util/test/strTest.cpp index 5658f2aa0..203fc3bb4 100644 --- a/Engine/source/core/util/test/strTest.cpp +++ b/Engine/source/core/util/test/strTest.cpp @@ -39,7 +39,7 @@ protected: const UTF16* mUTF16; U32 mLength; - StrTest() : mData( 0 ), mUTF16( 0 ) {} + StrTest() : mData( 0 ), mUTF16( 0 ), mLength( 0 ) {} StrTest( const char* str ) : mData( str ), mLength( str ? dStrlen( str ) : 0 ), mUTF16( NULL ) { diff --git a/Engine/source/environment/basicClouds.cpp b/Engine/source/environment/basicClouds.cpp index 737458093..185aa3a97 100644 --- a/Engine/source/environment/basicClouds.cpp +++ b/Engine/source/environment/basicClouds.cpp @@ -63,6 +63,12 @@ BasicClouds::BasicClouds() mTypeMask |= EnvironmentObjectType | StaticObjectType; mNetFlags.set(Ghostable | ScopeAlways); + mTimeSC = 0; + mModelViewProjSC = 0; + mTexScaleSC = 0; + mTexDirectionSC = 0; + mTexOffsetSC = 0; + mLayerEnabled[0] = true; mLayerEnabled[1] = true; mLayerEnabled[2] = true; diff --git a/Engine/source/environment/cloudLayer.cpp b/Engine/source/environment/cloudLayer.cpp index ca7ae4ebc..dca9faf00 100644 --- a/Engine/source/environment/cloudLayer.cpp +++ b/Engine/source/environment/cloudLayer.cpp @@ -73,15 +73,27 @@ U32 CloudLayer::smVertCount = smVertStride * smVertStride; U32 CloudLayer::smTriangleCount = smStrideMinusOne * smStrideMinusOne * 2; CloudLayer::CloudLayer() -: mBaseColor( 0.9f, 0.9f, 0.9f, 1.0f ), - mCoverage( 0.5f ), +: mLastTime( 0 ), + mBaseColor( 0.9f, 0.9f, 0.9f, 1.0f ), mExposure( 1.0f ), - mWindSpeed( 1.0f ), - mLastTime( 0 ) + mCoverage( 0.5f ), + mWindSpeed( 1.0f ) { mTypeMask |= EnvironmentObjectType | StaticObjectType; mNetFlags.set(Ghostable | ScopeAlways); + mModelViewProjSC = + mAmbientColorSC = + mSunColorSC = + mSunVecSC = + mTexScaleSC = + mBaseColorSC = + mCoverageSC = + mExposureSC = + mEyePosWorldSC = 0; + + mTexOffsetSC[0] = mTexOffsetSC[1] = mTexOffsetSC[2] = 0; + mTexScale[0] = 1.0; mTexScale[1] = 1.0; mTexScale[2] = 1.0; diff --git a/Engine/source/gfx/bitmap/ddsLoader.cpp b/Engine/source/gfx/bitmap/ddsLoader.cpp index 4ad23ef39..6e32f0e6d 100644 --- a/Engine/source/gfx/bitmap/ddsLoader.cpp +++ b/Engine/source/gfx/bitmap/ddsLoader.cpp @@ -606,8 +606,6 @@ bool DDSFile::read(Stream &s, U32 dropMipCount) mPitchOrLinearSize = getSurfaceSize( dropMipCount ); else if ( mFlags.test( PitchSizeFlag ) ) mPitchOrLinearSize = getSurfacePitch( dropMipCount ); - else - mPitchOrLinearSize = mPitchOrLinearSize; // Do nothing? // Now fix up the rest of the mMipMapCount = getMax( (U32)1, mMipMapCount - dropMipCount ); diff --git a/Engine/source/gfx/gl/gfxGLShader.cpp b/Engine/source/gfx/gl/gfxGLShader.cpp index c4ec5f814..001836158 100644 --- a/Engine/source/gfx/gl/gfxGLShader.cpp +++ b/Engine/source/gfx/gl/gfxGLShader.cpp @@ -64,7 +64,7 @@ public: }; GFXGLShaderConstHandle::GFXGLShaderConstHandle( GFXGLShader *shader ) - : mShader( shader ), mSamplerNum(-1), mInstancingConstant(false) + : mShader( shader ), mLocation(0), mOffset(0), mSize(0), mSamplerNum(-1), mInstancingConstant(false) { mValid = false; } diff --git a/Engine/source/gfx/video/theoraTexture.h b/Engine/source/gfx/video/theoraTexture.h index 47289de3d..29341db0f 100644 --- a/Engine/source/gfx/video/theoraTexture.h +++ b/Engine/source/gfx/video/theoraTexture.h @@ -103,7 +103,7 @@ class TheoraTextureFrame F32 mFrameDuration; TheoraTextureFrame() - : mLockedRect( NULL ) + : mLockedRect( NULL ), mFrameNumber(0), mFrameTime(0.0f), mFrameDuration(0.0f) { } }; diff --git a/Engine/source/gfx/video/videoEncoderTheora.cpp b/Engine/source/gfx/video/videoEncoderTheora.cpp index 3e6160a12..f3c1e4674 100644 --- a/Engine/source/gfx/video/videoEncoderTheora.cpp +++ b/Engine/source/gfx/video/videoEncoderTheora.cpp @@ -193,7 +193,7 @@ class VideoEncoderTheora : public VideoEncoder, public Thread public: VideoEncoderTheora() : - mLastFrame(NULL) + mCurrentFrame(0), td(NULL), mLastFrame(NULL) { setStatus(false); } diff --git a/Engine/source/gui/controls/guiGameListOptionsCtrl.h b/Engine/source/gui/controls/guiGameListOptionsCtrl.h index d390e5e16..998ade923 100644 --- a/Engine/source/gui/controls/guiGameListOptionsCtrl.h +++ b/Engine/source/gui/controls/guiGameListOptionsCtrl.h @@ -41,7 +41,7 @@ protected: S32 mSelectedOption; ///< Index into mOptions pointing at the selected option bool mWrapOptions; ///< Determines if options should "wrap around" at the ends - Row() + Row() : mSelectedOption(0), mWrapOptions(false) { VECTOR_SET_ASSOCIATION( mOptions ); } diff --git a/Engine/source/gui/worldEditor/guiDecalEditorCtrl.cpp b/Engine/source/gui/worldEditor/guiDecalEditorCtrl.cpp index ab6b377e2..3370da07c 100644 --- a/Engine/source/gui/worldEditor/guiDecalEditorCtrl.cpp +++ b/Engine/source/gui/worldEditor/guiDecalEditorCtrl.cpp @@ -905,7 +905,7 @@ ConsoleDocClass( DICreateUndoAction, "@internal"); DICreateUndoAction::DICreateUndoAction( const UTF8* actionName ) - : UndoAction( actionName ) + : UndoAction( actionName ), mEditor(0), mDatablockId(0) { } @@ -993,7 +993,7 @@ ConsoleDocClass( DIDeleteUndoAction, "@internal"); DIDeleteUndoAction::DIDeleteUndoAction( const UTF8 *actionName ) - : UndoAction( actionName ) + : UndoAction( actionName ), mEditor(0), mDatablockId(0) { } @@ -1081,7 +1081,7 @@ ConsoleDocClass( DBDeleteUndoAction, "@internal"); DBDeleteUndoAction::DBDeleteUndoAction( const UTF8 *actionName ) - : UndoAction( actionName ) + : UndoAction( actionName ), mEditor(0), mDatablockId(0) { } @@ -1190,7 +1190,7 @@ ConsoleDocClass( DBRetargetUndoAction, "@internal"); DBRetargetUndoAction::DBRetargetUndoAction( const UTF8 *actionName ) - : UndoAction( actionName ) + : UndoAction( actionName ), mEditor(0), mDBFromId(0), mDBToId(0) { } diff --git a/Engine/source/lighting/basic/blTerrainSystem.cpp b/Engine/source/lighting/basic/blTerrainSystem.cpp index 4e972977c..1dd98f3fe 100644 --- a/Engine/source/lighting/basic/blTerrainSystem.cpp +++ b/Engine/source/lighting/basic/blTerrainSystem.cpp @@ -159,7 +159,9 @@ blTerrainProxy::blTerrainProxy( SceneObject *obj ) : Parent( obj ), mLightMapSize( getObject()->getLightMapSize() ), mTerrainBlockSize( getObject()->getBlockSize() ), - mLightmap( NULL ) + mShadowVolume( NULL ), + mLightmap( NULL ), + sgBakedLightmap( NULL ) { } diff --git a/Engine/source/main/main.cpp b/Engine/source/main/main.cpp index 56bed4ceb..f74430fc1 100644 --- a/Engine/source/main/main.cpp +++ b/Engine/source/main/main.cpp @@ -32,7 +32,7 @@ extern "C" int (*torque_winmain)( HINSTANCE hInstance, HINSTANCE h, LPSTR lpszCmdLine, int nShow) = NULL; }; -bool getDllName(std::wstring& dllName, const std::wstring suffix) +bool getDllName(std::wstring& dllName, const std::wstring& suffix) { wchar_t filenameBuf[MAX_PATH]; DWORD length = GetModuleFileNameW( NULL, filenameBuf, MAX_PATH ); diff --git a/Engine/source/navigation/duDebugDrawTorque.cpp b/Engine/source/navigation/duDebugDrawTorque.cpp index 3692e50ee..d3928ca76 100644 --- a/Engine/source/navigation/duDebugDrawTorque.cpp +++ b/Engine/source/navigation/duDebugDrawTorque.cpp @@ -38,9 +38,13 @@ duDebugDrawTorque::duDebugDrawTorque() { + mPrimType = 0; + mQuadsMode = false; + mVertCount = 0; + mGroup = 0; + mCurrColor = 0; mOverrideColor = 0; mOverride = false; - mGroup = 0; } duDebugDrawTorque::~duDebugDrawTorque() diff --git a/Engine/source/navigation/navMesh.cpp b/Engine/source/navigation/navMesh.cpp index 8b668b479..d708c65e7 100644 --- a/Engine/source/navigation/navMesh.cpp +++ b/Engine/source/navigation/navMesh.cpp @@ -622,7 +622,7 @@ bool NavMesh::build(bool background, bool saveIntermediates) if(!background) { - while(mDirtyTiles.size()) + while(!mDirtyTiles.empty()) buildNextTile(); } @@ -637,7 +637,7 @@ DefineEngineMethod(NavMesh, build, bool, (bool background, bool save), (true, fa void NavMesh::cancelBuild() { - while(mDirtyTiles.size()) mDirtyTiles.pop(); + while(!mDirtyTiles.empty()) mDirtyTiles.pop(); ctx->stopTimer(RC_TIMER_TOTAL); mBuilding = false; } @@ -707,7 +707,7 @@ void NavMesh::updateTiles(bool dirty) mTiles.clear(); mTileData.clear(); - while(mDirtyTiles.size()) mDirtyTiles.pop(); + while(!mDirtyTiles.empty()) mDirtyTiles.pop(); const Box3F &box = DTStoRC(getWorldBox()); if(box.isEmpty()) @@ -756,7 +756,7 @@ void NavMesh::processTick(const Move *move) void NavMesh::buildNextTile() { - if(mDirtyTiles.size()) + if(!mDirtyTiles.empty()) { // Pop a single dirty tile and process it. U32 i = mDirtyTiles.front(); @@ -794,7 +794,7 @@ void NavMesh::buildNextTile() } } // Did we just build the last tile? - if(!mDirtyTiles.size()) + if(mDirtyTiles.empty()) { ctx->stopTimer(RC_TIMER_TOTAL); if(getEventManager()) diff --git a/Engine/source/navigation/recastPolyList.cpp b/Engine/source/navigation/recastPolyList.cpp index db2d25284..a45276ff8 100644 --- a/Engine/source/navigation/recastPolyList.cpp +++ b/Engine/source/navigation/recastPolyList.cpp @@ -36,6 +36,7 @@ RecastPolyList::RecastPolyList() ntris = 0; tris = NULL; tricap = 0; + vidx = 0; } RecastPolyList::~RecastPolyList() diff --git a/Engine/source/platform/platformAssert.cpp b/Engine/source/platform/platformAssert.cpp index 7e1d3b93a..0a92bf1a1 100644 --- a/Engine/source/platform/platformAssert.cpp +++ b/Engine/source/platform/platformAssert.cpp @@ -179,6 +179,7 @@ const char* avar(const char *message, ...) va_list args; va_start(args, message); dVsprintf(buffer, sizeof(buffer), message, args); + va_end(args); return( buffer ); } diff --git a/Engine/source/platform/platformFileIO.cpp b/Engine/source/platform/platformFileIO.cpp index 33fff52b7..d7b742303 100644 --- a/Engine/source/platform/platformFileIO.cpp +++ b/Engine/source/platform/platformFileIO.cpp @@ -421,6 +421,7 @@ StringTableEntry Platform::makeRelativePathName(const char *path, const char *to else { + // FIXME: This condition is clearly wrong if((*pathPtr == 0 && *toPtr == '/') || (*toPtr == '/' && *pathPtr == 0)) branch = pathPtr; diff --git a/Engine/source/platformMac/macCarbStrings.cpp b/Engine/source/platformMac/macCarbStrings.cpp index 1f3ecb0c9..7e15da227 100644 --- a/Engine/source/platformMac/macCarbStrings.cpp +++ b/Engine/source/platformMac/macCarbStrings.cpp @@ -45,7 +45,7 @@ int dSprintf(char *buffer, dsize_t /*bufferSize*/, const char *format, ...) va_list args; va_start(args, format); S32 len = vsprintf(buffer, format, args); - + va_end(args); return (len); } diff --git a/Engine/source/platformWin32/threads/thread.cpp b/Engine/source/platformWin32/threads/thread.cpp index d1ba59cc2..cc6939533 100644 --- a/Engine/source/platformWin32/threads/thread.cpp +++ b/Engine/source/platformWin32/threads/thread.cpp @@ -53,6 +53,7 @@ public: mRunArg = 0; mThread = 0; mThreadHnd = 0; + mThreadID = 0; mDead = false; }; }; diff --git a/Engine/source/platformWin32/winTimer.cpp b/Engine/source/platformWin32/winTimer.cpp index ce300d82c..940e2c7b8 100644 --- a/Engine/source/platformWin32/winTimer.cpp +++ b/Engine/source/platformWin32/winTimer.cpp @@ -43,13 +43,17 @@ public: Win32Timer() { mPerfCountRemainderCurrent = 0.0f; + mPerfCountRemainderNext = 0.0f; // Attempt to use QPC for high res timing, otherwise fallback to GTC. mUsingPerfCounter = QueryPerformanceFrequency((LARGE_INTEGER *) &mFrequency); if(mUsingPerfCounter) mUsingPerfCounter = QueryPerformanceCounter((LARGE_INTEGER *) &mPerfCountCurrent); if(!mUsingPerfCounter) + { mTickCountCurrent = GetTickCount(); + mTickCountNext = 0; + } } const S32 getElapsedMs() diff --git a/Engine/source/platformX86UNIX/x86UNIXConsole.cpp b/Engine/source/platformX86UNIX/x86UNIXConsole.cpp index 5e8f41f85..9dee9d263 100644 --- a/Engine/source/platformX86UNIX/x86UNIXConsole.cpp +++ b/Engine/source/platformX86UNIX/x86UNIXConsole.cpp @@ -174,6 +174,7 @@ void StdConsole::printf(const char *s, ...) va_list args; va_start(args, s); vsnprintf(buffer, BufSize, s, args); + va_end(args); // Replace tabs with carats, like the "real" console does. char *pos = buffer; while (*pos) { diff --git a/Engine/source/platformX86UNIX/x86UNIXInput.client.cpp b/Engine/source/platformX86UNIX/x86UNIXInput.client.cpp index 57dd1e3bb..37e3ee179 100644 --- a/Engine/source/platformX86UNIX/x86UNIXInput.client.cpp +++ b/Engine/source/platformX86UNIX/x86UNIXInput.client.cpp @@ -364,6 +364,9 @@ bool Platform::setClipboard(const char *text) XClipboard::XClipboard() { mInitialized = false; + mXData = 0; + mTData = 0; + mTDataSize = 0; } //------------------------------------------------------------------------------ diff --git a/Engine/source/renderInstance/renderOcclusionMgr.cpp b/Engine/source/renderInstance/renderOcclusionMgr.cpp index 126d375a8..7e084130f 100644 --- a/Engine/source/renderInstance/renderOcclusionMgr.cpp +++ b/Engine/source/renderInstance/renderOcclusionMgr.cpp @@ -56,12 +56,6 @@ RenderOcclusionMgr::RenderOcclusionMgr() mMatInstance = NULL; } -RenderOcclusionMgr::RenderOcclusionMgr(RenderInstType riType, F32 renderOrder, F32 processAddOrder) -: RenderBinManager(riType, renderOrder, processAddOrder) -{ - delete mMatInstance; -} - static const Point3F cubePoints[8] = { Point3F(-0.5, -0.5, -0.5), Point3F(-0.5, -0.5, 0.5), Point3F(-0.5, 0.5, -0.5), Point3F(-0.5, 0.5, 0.5), diff --git a/Engine/source/renderInstance/renderOcclusionMgr.h b/Engine/source/renderInstance/renderOcclusionMgr.h index 41050c38d..34f64eb46 100644 --- a/Engine/source/renderInstance/renderOcclusionMgr.h +++ b/Engine/source/renderInstance/renderOcclusionMgr.h @@ -38,7 +38,6 @@ class RenderOcclusionMgr : public RenderBinManager typedef RenderBinManager Parent; public: RenderOcclusionMgr(); - RenderOcclusionMgr(RenderInstType riType, F32 renderOrder, F32 processAddOrder); // RenderOcclusionMgr virtual void init(); diff --git a/Engine/source/scene/pathManager.cpp b/Engine/source/scene/pathManager.cpp index 350a538ba..2f1c423c3 100644 --- a/Engine/source/scene/pathManager.cpp +++ b/Engine/source/scene/pathManager.cpp @@ -86,7 +86,7 @@ class PathManagerEvent : public NetEvent public: typedef NetEvent Parent; - PathManagerEvent() { } + PathManagerEvent() : modifiedPath(0), clearPaths(false) { } void pack(NetConnection*, BitStream*); void write(NetConnection*, BitStream*); diff --git a/Engine/source/sfx/sfxSound.cpp b/Engine/source/sfx/sfxSound.cpp index b2fd1059a..683f70cda 100644 --- a/Engine/source/sfx/sfxSound.cpp +++ b/Engine/source/sfx/sfxSound.cpp @@ -627,7 +627,7 @@ S32 QSORT_CALLBACK SFXSound::qsortCompare( const void* item1, const void* item2 if( !source1IsPlaying && !source2IsPlaying ) return 0; - else if( !source1IsPlaying && source1IsPlaying ) + else if( !source1IsPlaying && source2IsPlaying ) return 1; else if( source1IsPlaying && !source2IsPlaying ) return -1; diff --git a/Engine/source/shaderGen/langElement.cpp b/Engine/source/shaderGen/langElement.cpp index 315fe4fca..9989eb2d2 100644 --- a/Engine/source/shaderGen/langElement.cpp +++ b/Engine/source/shaderGen/langElement.cpp @@ -89,19 +89,22 @@ Var::Var() { dStrcpy( (char*)type, "float4" ); structName[0] = '\0'; + connectName[0] = '\0'; + constSortPos = cspUninit; + constNum = 0; + texCoordNum = 0; uniform = false; vertData = false; connector = false; sampler = false; mapsToSampler = false; - texCoordNum = 0; - constSortPos = cspUninit; arraySize = 1; } Var::Var( const char *inName, const char *inType ) { structName[0] = '\0'; + connectName[0] = '\0'; uniform = false; vertData = false; connector = false; diff --git a/Engine/source/shaderGen/shaderComp.cpp b/Engine/source/shaderGen/shaderComp.cpp index d976fb7b9..2110c209f 100644 --- a/Engine/source/shaderGen/shaderComp.cpp +++ b/Engine/source/shaderGen/shaderComp.cpp @@ -31,6 +31,7 @@ ShaderConnector::ShaderConnector() { mCurTexElem = 0; + mName[0] = '\0'; } //---------------------------------------------------------------------------- diff --git a/Engine/source/sim/netGhost.cpp b/Engine/source/sim/netGhost.cpp index 13acfc7e3..52fb23f69 100644 --- a/Engine/source/sim/netGhost.cpp +++ b/Engine/source/sim/netGhost.cpp @@ -52,7 +52,13 @@ public: objectId = obj->getId(); ghostIndex = index; } + else + { + objectId = 0; + ghostIndex = 0; + } object = NULL; + validObject = false; } ~GhostAlwaysObjectEvent() { delete object; }