Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2008-09-18 05:46:28 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2008-09-18 05:46:28 +0400
commit0a7767d597dc92727a64fae676cbf03c9ef17915 (patch)
tree32aa2443298aad6bfd40640b8e35d44218d80bac /source/gameengine/Ketsji/KX_MouseFocusSensor.h
parent3bf0a6fed88e43605fa82acbd1dbad7e64bed93d (diff)
Fix for bug #3858: the game engine mouse focus sensor did not work
correct if there was more than one camera. It shoots rays from the active camera, but used the viewport from whichever camera was drawn last, now it uses the correct vieport.
Diffstat (limited to 'source/gameengine/Ketsji/KX_MouseFocusSensor.h')
-rw-r--r--source/gameengine/Ketsji/KX_MouseFocusSensor.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/source/gameengine/Ketsji/KX_MouseFocusSensor.h b/source/gameengine/Ketsji/KX_MouseFocusSensor.h
index a6cc39d66eb..6731444699b 100644
--- a/source/gameengine/Ketsji/KX_MouseFocusSensor.h
+++ b/source/gameengine/Ketsji/KX_MouseFocusSensor.h
@@ -56,6 +56,7 @@ class KX_MouseFocusSensor : public SCA_MouseSensor
int focusmode,
RAS_ICanvas* canvas,
KX_Scene* kxscene,
+ KX_KetsjiEngine* kxengine,
SCA_IObject* gameobj,
PyTypeObject* T=&Type );
@@ -143,12 +144,6 @@ class KX_MouseFocusSensor : public SCA_MouseSensor
/**
- * Ref to the engine, for retrieving a reference to the current
- * scene. */
- class KX_KetsjiEngine* m_engine;
-
-
- /**
* The active canvas. The size of this canvas determines a part of
* the start position of the picking ray. */
RAS_ICanvas* m_gp_canvas;
@@ -158,6 +153,9 @@ class KX_MouseFocusSensor : public SCA_MouseSensor
* determines a part of the start location of the picking ray. */
KX_Scene* m_kxscene;
+ /**
+ * The KX engine is needed for computing the viewport */
+ KX_KetsjiEngine* m_kxengine;
};
#endif //__KX_MOUSESENSOR