From 216967c3bf72ccff9d069327a5531e50f8f88b5a Mon Sep 17 00:00:00 2001 From: oy Date: Mon, 17 Jan 2011 12:28:37 +0100 Subject: release gameclient components when opening the editor. Closes #429 --- src/game/client/components/controls.cpp | 5 +++++ src/game/client/components/controls.h | 1 + 2 files changed, 6 insertions(+) (limited to 'src/game/client/components') diff --git a/src/game/client/components/controls.cpp b/src/game/client/components/controls.cpp index 1dd74af2..f7da46b6 100644 --- a/src/game/client/components/controls.cpp +++ b/src/game/client/components/controls.cpp @@ -32,6 +32,11 @@ void CControls::OnReset() m_InputDirectionRight = 0; } +void CControls::OnRelease() +{ + OnReset(); +} + void CControls::OnPlayerDeath() { m_LastData.m_WantedWeapon = m_InputData.m_WantedWeapon = 0; diff --git a/src/game/client/components/controls.h b/src/game/client/components/controls.h index 38b3c8ba..a50318f5 100644 --- a/src/game/client/components/controls.h +++ b/src/game/client/components/controls.h @@ -19,6 +19,7 @@ public: CControls(); virtual void OnReset(); + virtual void OnRelease(); virtual void OnRender(); virtual void OnMessage(int MsgType, void *pRawMsg); virtual bool OnMouseMove(float x, float y); -- cgit 1.4.1