diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-09-19 18:20:15 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-09-19 18:20:15 +0400 |
commit | 153e4cad4be9455e47b823745c9fa6cbe0305e52 (patch) | |
tree | cdfd2179f0ad043256ddac4a23ccec088f3a89a5 /source/gameengine | |
parent | e9b967d05b366783a93d92d6935e970c1ea42edd (diff) | |
parent | 5c7b5c0b51f57ad19b79eac78e3e4afb263b23cc (diff) |
Cycles: svn merge -r40266:40358 https://svn.blender.org/svnroot/bf-blender/trunk/blender
Diffstat (limited to 'source/gameengine')
-rw-r--r-- | source/gameengine/Ketsji/KX_Dome.cpp | 2 | ||||
-rw-r--r-- | source/gameengine/Ketsji/KX_GameObject.cpp | 4 | ||||
-rw-r--r-- | source/gameengine/Ketsji/KX_KetsjiEngine.cpp | 4 | ||||
-rw-r--r-- | source/gameengine/Ketsji/KX_Scene.cpp | 5 |
4 files changed, 12 insertions, 3 deletions
diff --git a/source/gameengine/Ketsji/KX_Dome.cpp b/source/gameengine/Ketsji/KX_Dome.cpp index 00c5e5803a8..f0ea6f15ffe 100644 --- a/source/gameengine/Ketsji/KX_Dome.cpp +++ b/source/gameengine/Ketsji/KX_Dome.cpp @@ -561,7 +561,7 @@ void KX_Dome::CreateMeshDome180(void) int i,j; float uv_ratio = (float)(m_buffersize-1) / m_imagesize; - m_radangle = m_angle * M_PI/180.0;//calculates the radians angle, used for flattening + m_radangle = DEG2RADF(m_angle); //calculates the radians angle, used for flattening //creating faces for the env mapcube 180deg Dome // Top Face - just a triangle diff --git a/source/gameengine/Ketsji/KX_GameObject.cpp b/source/gameengine/Ketsji/KX_GameObject.cpp index ae8d7094015..853b36b54f7 100644 --- a/source/gameengine/Ketsji/KX_GameObject.cpp +++ b/source/gameengine/Ketsji/KX_GameObject.cpp @@ -364,7 +364,9 @@ BL_ActionManager* KX_GameObject::GetActionManager() { // We only want to create an action manager if we need it if (!m_actionManager) - { KX_GetActiveScene()->AddAnimatedObject(this); m_actionManager = new BL_ActionManager(this); + { + KX_GetActiveScene()->AddAnimatedObject(this); + m_actionManager = new BL_ActionManager(this); } return m_actionManager; } diff --git a/source/gameengine/Ketsji/KX_KetsjiEngine.cpp b/source/gameengine/Ketsji/KX_KetsjiEngine.cpp index 65ff06456b4..acd25ace04a 100644 --- a/source/gameengine/Ketsji/KX_KetsjiEngine.cpp +++ b/source/gameengine/Ketsji/KX_KetsjiEngine.cpp @@ -327,6 +327,8 @@ void KX_KetsjiEngine::RenderDome() // do the rendering m_dome->RenderDomeFrame(scene,cam, i); + //render all the font objects for this scene + RenderFonts(scene); } list<class KX_Camera*>* cameras = scene->GetCameras(); @@ -344,6 +346,8 @@ void KX_KetsjiEngine::RenderDome() // do the rendering m_dome->RenderDomeFrame(scene, (*it),i); + //render all the font objects for this scene + RenderFonts(scene); } it++; diff --git a/source/gameengine/Ketsji/KX_Scene.cpp b/source/gameengine/Ketsji/KX_Scene.cpp index bdc30810b9e..7ff4a786387 100644 --- a/source/gameengine/Ketsji/KX_Scene.cpp +++ b/source/gameengine/Ketsji/KX_Scene.cpp @@ -1034,6 +1034,8 @@ int KX_Scene::NewRemoveObject(class CValue* gameobj) ret = newobj->Release(); if (m_euthanasyobjects->RemoveValue(newobj)) ret = newobj->Release(); + if (m_animatedlist->RemoveValue(newobj)) + ret = newobj->Release(); if (newobj == m_active_camera) { @@ -1525,6 +1527,7 @@ void KX_Scene::LogicBeginFrame(double curtime) void KX_Scene::AddAnimatedObject(CValue* gameobj) { + gameobj->AddRef(); m_animatedlist->Add(gameobj); } @@ -1537,7 +1540,7 @@ void KX_Scene::UpdateAnimations(double curtime) { // Update any animations for (int i=0; i<m_animatedlist->GetCount(); ++i) - ((KX_GameObject*)GetObjectList()->GetValue(i))->UpdateActionManager(curtime); + ((KX_GameObject*)m_animatedlist->GetValue(i))->UpdateActionManager(curtime); } void KX_Scene::LogicUpdateFrame(double curtime, bool frame) |