diff --git a/src/Core/Resource/Area/CGameArea.cpp b/src/Core/Resource/Area/CGameArea.cpp index 0769550e..ffb2bace 100644 --- a/src/Core/Resource/Area/CGameArea.cpp +++ b/src/Core/Resource/Area/CGameArea.cpp @@ -2,16 +2,8 @@ #include "Core/Resource/Script/CScriptLayer.h" #include "Core/Render/CRenderer.h" -CGameArea::CGameArea(CResourceEntry *pEntry /*= 0*/) +CGameArea::CGameArea(CResourceEntry *pEntry) : CResource(pEntry) - , mWorldIndex(-1) - , mVertexCount(0) - , mTriangleCount(0) - , mTerrainMerged(false) - , mOriginalWorldMeshCount(0) - , mUsesCompression(false) - , mpMaterialSet(nullptr) - , mpCollision(nullptr) { } diff --git a/src/Core/Resource/Area/CGameArea.h b/src/Core/Resource/Area/CGameArea.h index aa9692b3..cc48d7f4 100644 --- a/src/Core/Resource/Area/CGameArea.h +++ b/src/Core/Resource/Area/CGameArea.h @@ -26,17 +26,17 @@ class CGameArea : public CResource friend class CAreaLoader; friend class CAreaCooker; - uint32 mWorldIndex; - uint32 mVertexCount; - uint32 mTriangleCount; - bool mTerrainMerged; + uint32 mWorldIndex = UINT32_MAX; + uint32 mVertexCount = 0; + uint32 mTriangleCount = 0; + bool mTerrainMerged = false; CTransform4f mTransform; CAABox mAABox; // Data saved from the original file to help on recook std::vector> mSectionDataBuffers; - uint32 mOriginalWorldMeshCount; - bool mUsesCompression; + uint32 mOriginalWorldMeshCount = 0; + bool mUsesCompression = false; struct SSectionNumber { @@ -46,7 +46,7 @@ class CGameArea : public CResource std::vector mSectionNumbers; // Geometry - CMaterialSet *mpMaterialSet; + CMaterialSet *mpMaterialSet = nullptr; std::vector> mWorldModels; // TerrainModels is the original version of each model; this is currently mainly used in the POI map editor std::vector> mStaticWorldModels; // StaticTerrainModels is the merged terrain for faster rendering in the world editor // Script