From d80dec600b4c9326c8065585fee27cdc164b189d Mon Sep 17 00:00:00 2001 From: Dander7BD Date: Thu, 20 Feb 2014 09:20:26 +0100 Subject: [PATCH] Memory leak dealt with + removed obsolete debug trap --- Code/Game/GameClient/GameClient.vcxproj.user | 2 +- Code/Game/GameClient/GameClientState/C_Object.cpp | 4 +++- Code/Game/GameClient/GameClientState/Camera_FPSV2.cpp | 5 ----- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/Code/Game/GameClient/GameClient.vcxproj.user b/Code/Game/GameClient/GameClient.vcxproj.user index 2e28d6f7..4b847ee6 100644 --- a/Code/Game/GameClient/GameClient.vcxproj.user +++ b/Code/Game/GameClient/GameClient.vcxproj.user @@ -1,7 +1,7 @@  - true + false $(OutDir) diff --git a/Code/Game/GameClient/GameClientState/C_Object.cpp b/Code/Game/GameClient/GameClientState/C_Object.cpp index ccea9a86..50664a92 100644 --- a/Code/Game/GameClient/GameClientState/C_Object.cpp +++ b/Code/Game/GameClient/GameClientState/C_Object.cpp @@ -16,8 +16,10 @@ C_Object::C_Object() } C_Object::~C_Object() { - + if( this->model ) + this->Release(); } + bool C_Object::Init(ModelInitData modelInit) { position = modelInit.position; diff --git a/Code/Game/GameClient/GameClientState/Camera_FPSV2.cpp b/Code/Game/GameClient/GameClientState/Camera_FPSV2.cpp index 0cf4500d..14b16838 100644 --- a/Code/Game/GameClient/GameClientState/Camera_FPSV2.cpp +++ b/Code/Game/GameClient/GameClientState/Camera_FPSV2.cpp @@ -136,11 +136,6 @@ void Camera_FPSV2::StrafeLeft( Float distance ) void Camera_FPSV2::PitchUp( Float radian ) { - if( radian >= 0.5f ) - { // HACK: debugging - const char *breakPoint = ""; - } - this->pitchUp = Clamp( this->pitchUp + radian, -0.48f * pi, 0.48f * pi ); this->pitchHaveChanged = true; }