mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-25 16:26:18 +00:00
Fixed: Valgrind warnings
This commit is contained in:
parent
805c27b3c8
commit
1c66d545fe
8 changed files with 22 additions and 17 deletions
|
@ -40,6 +40,7 @@ CPointLight::CPointLight() : _LightedModels(/*&_LightedModelListMemory*/)
|
||||||
_Diffuse= _Specular= CRGBA::White;
|
_Diffuse= _Specular= CRGBA::White;
|
||||||
|
|
||||||
// Default setup. this is arbitrary
|
// Default setup. this is arbitrary
|
||||||
|
_Type= PointLight;
|
||||||
_AttenuationBegin= 10;
|
_AttenuationBegin= 10;
|
||||||
_AttenuationEnd= 30;
|
_AttenuationEnd= 30;
|
||||||
|
|
||||||
|
|
|
@ -69,6 +69,7 @@ CRenderTrav::CRenderTrav()
|
||||||
_CurrentPassOpaque = true;
|
_CurrentPassOpaque = true;
|
||||||
|
|
||||||
_CacheLightContribution= NULL;
|
_CacheLightContribution= NULL;
|
||||||
|
_LastLocalAttenuation= false;
|
||||||
|
|
||||||
// Default light Setup.
|
// Default light Setup.
|
||||||
LightingSystemEnabled= false;
|
LightingSystemEnabled= false;
|
||||||
|
|
|
@ -512,7 +512,8 @@ void CVisualCollisionMesh::receiveShadowMap(const NLMISC::CMatrix &instanceMatr
|
||||||
}
|
}
|
||||||
|
|
||||||
// if triangle not clipped, add the triangle
|
// if triangle not clipped, add the triangle
|
||||||
if( (triFlag & NL3D_VCM_SHADOW_NUM_CLIP_PLANE_MASK)==0 )
|
// if( (triFlag & NL3D_VCM_SHADOW_NUM_CLIP_PLANE_MASK)==0 )
|
||||||
|
if (triFlag == 0) // previous line not useful due to init
|
||||||
{
|
{
|
||||||
// Add the 3 index to the index buffer.
|
// Add the 3 index to the index buffer.
|
||||||
ibPtr[currentTriIdx++]= (uint16) triId[0];
|
ibPtr[currentTriIdx++]= (uint16) triId[0];
|
||||||
|
|
|
@ -100,7 +100,7 @@ CFixedSizeAllocator::CChunk::~CChunk()
|
||||||
nlassert(NumFreeObjs == 0);
|
nlassert(NumFreeObjs == 0);
|
||||||
nlassert(Allocator->_NumChunks > 0);
|
nlassert(Allocator->_NumChunks > 0);
|
||||||
-- (Allocator->_NumChunks);
|
-- (Allocator->_NumChunks);
|
||||||
delete Mem;
|
delete[] Mem;
|
||||||
}
|
}
|
||||||
|
|
||||||
// *****************************************************************************************************************
|
// *****************************************************************************************************************
|
||||||
|
|
|
@ -83,7 +83,7 @@ CFileContainer::~CFileContainer()
|
||||||
{
|
{
|
||||||
if( _AllFileNames )
|
if( _AllFileNames )
|
||||||
{
|
{
|
||||||
delete _AllFileNames;
|
delete[] _AllFileNames;
|
||||||
_AllFileNames = NULL;
|
_AllFileNames = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,7 +28,8 @@ namespace NLSOUND
|
||||||
CComplexSource::CComplexSource (CComplexSound *soundPattern, bool spawn, TSpawnEndCallback cb, void *cbUserParam, NL3D::CCluster *cluster, CGroupController *groupController)
|
CComplexSource::CComplexSource (CComplexSound *soundPattern, bool spawn, TSpawnEndCallback cb, void *cbUserParam, NL3D::CCluster *cluster, CGroupController *groupController)
|
||||||
: CSourceCommon(soundPattern, spawn, cb, cbUserParam, cluster, groupController),
|
: CSourceCommon(soundPattern, spawn, cb, cbUserParam, cluster, groupController),
|
||||||
_Source1(NULL),
|
_Source1(NULL),
|
||||||
_Source2(NULL)
|
_Source2(NULL),
|
||||||
|
_Muted(false)
|
||||||
{
|
{
|
||||||
nlassert(soundPattern->getSoundType() == CSound::SOUND_COMPLEX);
|
nlassert(soundPattern->getSoundType() == CSound::SOUND_COMPLEX);
|
||||||
_PatternSound = static_cast<CComplexSound*>(soundPattern);
|
_PatternSound = static_cast<CComplexSound*>(soundPattern);
|
||||||
|
|
|
@ -1838,6 +1838,7 @@ CGroupHTML::CGroupHTML(const TCtorParam ¶m)
|
||||||
_GroupHtmlByUID[_GroupHtmlUID]= this;
|
_GroupHtmlByUID[_GroupHtmlUID]= this;
|
||||||
|
|
||||||
// init
|
// init
|
||||||
|
_TrustedDomain = false;
|
||||||
_ParsingLua = false;
|
_ParsingLua = false;
|
||||||
_IgnoreText = false;
|
_IgnoreText = false;
|
||||||
_BrowseNextTime = false;
|
_BrowseNextTime = false;
|
||||||
|
|
|
@ -320,9 +320,9 @@ CStaticFames::CStaticFames()
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
CStaticFames::~CStaticFames()
|
CStaticFames::~CStaticFames()
|
||||||
{
|
{
|
||||||
delete _FameTable;
|
delete[] _FameTable;
|
||||||
_FameTable = NULL;
|
_FameTable = NULL;
|
||||||
delete _PropagationFactorTable;
|
delete[] _PropagationFactorTable;
|
||||||
_PropagationFactorTable = NULL;
|
_PropagationFactorTable = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue