From 41cd83500c12a3212dc95594493d16b01ba3a7bb Mon Sep 17 00:00:00 2001 From: Erik Persson Date: Thu, 20 Feb 2014 16:02:53 +0100 Subject: [PATCH] GL - deleteing cones in attatchmentMassdriver --- Code/Game/GameLogic/AttatchmentMassDriver.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Code/Game/GameLogic/AttatchmentMassDriver.cpp b/Code/Game/GameLogic/AttatchmentMassDriver.cpp index 3102b9f2..89de1f3e 100644 --- a/Code/Game/GameLogic/AttatchmentMassDriver.cpp +++ b/Code/Game/GameLogic/AttatchmentMassDriver.cpp @@ -106,6 +106,8 @@ void AttatchmentMassDriver::ForcePush(const GameLogic::WEAPON_FIRE &usage, float args.pushForce = pushForce; Oyster::Physics::API::Instance().ApplyEffect(hitCone,&args,ForcePushAction); + + if(hitCone) delete hitCone; } /******************************************************** @@ -141,6 +143,8 @@ void AttatchmentMassDriver::ForcePull(const WEAPON_FIRE &usage, float dt) args.pushForce = -pushForce; Oyster::Physics::API::Instance().ApplyEffect(hitCone,&args,ForcePushAction); + + if(hitCone) delete hitCone; } void AttatchmentMassDriver::PickUpObject(const WEAPON_FIRE &usage, float dt) @@ -150,5 +154,5 @@ void AttatchmentMassDriver::PickUpObject(const WEAPON_FIRE &usage, float dt) Oyster::Physics::API::Instance().ApplyEffect(hitSphere,this,AttemptPickUp); - delete hitSphere; + if(hitSphere) delete hitSphere; }