Delete all SOLID shapes at the end of the game engine. They were all being leaked!

This commit is contained in:
Kester Maddock
2004-05-08 00:25:20 +00:00
parent 83907fc5f7
commit bd50d2f9cd
4 changed files with 6 additions and 1 deletions

View File

@@ -117,6 +117,8 @@ KX_BlenderSceneConverter::~KX_BlenderSceneConverter()
delete (*itm);
itm++;
}
KX_ClearSumoSharedShapes();
}

View File

@@ -108,6 +108,8 @@ void KX_ConvertSumoObject( class KX_GameObject* gameobj,
struct PHY_ShapeProps* shapeprops,
struct PHY_MaterialProps* smmaterial,
struct KX_ObjectProperties* objprop);
void KX_ClearSumoSharedShapes();
#endif
#endif //KX_CONVERTPHYSICSOBJECTS

View File

@@ -77,7 +77,7 @@
#include "KX_SumoPhysicsController.h"
GEN_Map<GEN_HashedPtr,DT_ShapeHandle> map_gamemesh_to_sumoshape;
static GEN_Map<GEN_HashedPtr,DT_ShapeHandle> map_gamemesh_to_sumoshape;
// forward declarations
void BL_RegisterSumoObject(KX_GameObject* gameobj,class SM_Scene* sumoScene,class SM_Object* sumoObj,const STR_String& matname,bool isDynamic,bool isActor);

View File

@@ -46,6 +46,7 @@ SM_FhObject::SM_FhObject(DT_ShapeHandle rayshape, MT_Vector3 ray, SM_Object *par
SM_FhObject::~SM_FhObject()
{
DT_DeleteShape(getShapeHandle());
}
DT_Bool SM_FhObject::ray_hit(void *client_data,