patch 8235 8218 8211 added: various gameengine improvements, fixed windows project...
authorBenoit Bolsee <benoit.bolsee@online.be>
Fri, 15 Feb 2008 23:12:03 +0000 (23:12 +0000)
committerBenoit Bolsee <benoit.bolsee@online.be>
Fri, 15 Feb 2008 23:12:03 +0000 (23:12 +0000)
15 files changed:
projectfiles_vc7/blender/blenkernel/BKE_blenkernel.vcproj
projectfiles_vc7/blender/nodes/nodes.vcproj
projectfiles_vc7/gameengine/gameplayer/ghost/GP_ghost.vcproj
source/gameengine/Converter/KX_ConvertSensors.cpp
source/gameengine/GameLogic/SCA_ISensor.cpp
source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.cpp
source/gameengine/Ketsji/KX_Camera.cpp
source/gameengine/Ketsji/KX_Camera.h
source/gameengine/Ketsji/KX_IpoActuator.cpp
source/gameengine/Ketsji/KX_KetsjiEngine.cpp
source/gameengine/Ketsji/KX_PythonInit.cpp
source/gameengine/Ketsji/KX_PythonInit.h
source/gameengine/Ketsji/KX_RayCast.cpp
source/gameengine/Ketsji/KX_Scene.cpp
source/gameengine/Ketsji/KX_Scene.h

index 18e57f029f25ecb34ec922b68007a66caf1215c6..38eba479ffb7cf0a9ba1a00ba437e5b51183e74c 100644 (file)
@@ -73,7 +73,7 @@
                        <Tool
                                Name="VCCLCompilerTool"
                                Optimization="0"
-                               AdditionalIncludeDirectories="..\..\..\..\lib\windows\zlib\include;..\..\..\..\build\msvc_7\intern\bmfont\include;..\..\..\..\build\msvc_7\intern\bsp\include;..\..\..\..\build\msvc_7\intern\guardedalloc\include;..\..\..\..\build\msvc_7\intern\decimation\include;..\..\..\..\build\msvc_7\intern\elbeem\include;..\..\..\..\build\msvc_7\intern\iksolver\include;..\..\..\source\blender;..\..\..\source\blender\avi;..\..\..\source\blender\imbuf;..\..\..\source\blender\include;..\..\..\source\blender\python;..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\nodes;..\..\..\source\blender\blenloader;..\..\..\source\kernel\gen_system;..\..\..\source\blender\renderconverter;..\..\..\source\blender\render\extern\include;..\..\..\source\gameengine\SoundSystem;..\..\..\..\build\msvc_7\extern\verse\include;..\..\..\..\build\msvc_7\intern\opennl\include;..\..\..\..\build\msvc_7\extern\bullet\include"
+                               AdditionalIncludeDirectories="..\..\..\..\lib\windows\python\include\python2.5;..\..\..\..\lib\windows\zlib\include;..\..\..\..\build\msvc_7\intern\bmfont\include;..\..\..\..\build\msvc_7\intern\bsp\include;..\..\..\..\build\msvc_7\intern\guardedalloc\include;..\..\..\..\build\msvc_7\intern\decimation\include;..\..\..\..\build\msvc_7\intern\elbeem\include;..\..\..\..\build\msvc_7\intern\iksolver\include;..\..\..\source\blender;..\..\..\source\blender\avi;..\..\..\source\blender\imbuf;..\..\..\source\blender\include;..\..\..\source\blender\python;..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\nodes;..\..\..\source\blender\blenloader;..\..\..\source\kernel\gen_system;..\..\..\source\blender\renderconverter;..\..\..\source\blender\render\extern\include;..\..\..\source\gameengine\SoundSystem;..\..\..\..\build\msvc_7\extern\verse\include;..\..\..\..\build\msvc_7\intern\opennl\include;..\..\..\..\build\msvc_7\extern\bullet\include"
                                PreprocessorDefinitions="_DEBUG;WIN32;_LIB;WITH_FREETYPE2;WITH_VERSE;WITH_OPENEXR;WITH_DDS;WITH_BULLET = 1"
                                BasicRuntimeChecks="3"
                                RuntimeLibrary="1"
                        <Tool
                                Name="VCCLCompilerTool"
                                InlineFunctionExpansion="1"
-                               AdditionalIncludeDirectories="..\..\..\..\lib\windows\zlib\include;..\..\..\..\build\msvc_7\intern\bmfont\include;..\..\..\..\build\msvc_7\intern\bsp\include;..\..\..\..\build\msvc_7\intern\guardedalloc\include;..\..\..\..\build\msvc_7\intern\decimation\include;..\..\..\..\build\msvc_7\intern\elbeem\include;..\..\..\..\build\msvc_7\intern\iksolver\include;..\..\..\source\blender;..\..\..\source\blender\avi;..\..\..\source\blender\imbuf;..\..\..\source\blender\include;..\..\..\source\blender\python;..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\nodes;..\..\..\source\blender\blenloader;..\..\..\source\kernel\gen_system;..\..\..\source\blender\renderconverter;..\..\..\source\blender\render\extern\include;..\..\..\source\gameengine\SoundSystem;..\..\..\..\build\msvc_7\extern\verse\include;..\..\..\..\build\msvc_7\intern\opennl\include;..\..\..\..\build\msvc_7\extern\bullet\include"
+                               AdditionalIncludeDirectories="..\..\..\..\lib\windows\python\include\python2.5;..\..\..\..\lib\windows\zlib\include;..\..\..\..\build\msvc_7\intern\bmfont\include;..\..\..\..\build\msvc_7\intern\bsp\include;..\..\..\..\build\msvc_7\intern\guardedalloc\include;..\..\..\..\build\msvc_7\intern\decimation\include;..\..\..\..\build\msvc_7\intern\elbeem\include;..\..\..\..\build\msvc_7\intern\iksolver\include;..\..\..\source\blender;..\..\..\source\blender\avi;..\..\..\source\blender\imbuf;..\..\..\source\blender\include;..\..\..\source\blender\python;..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\nodes;..\..\..\source\blender\blenloader;..\..\..\source\kernel\gen_system;..\..\..\source\blender\renderconverter;..\..\..\source\blender\render\extern\include;..\..\..\source\gameengine\SoundSystem;..\..\..\..\build\msvc_7\extern\verse\include;..\..\..\..\build\msvc_7\intern\opennl\include;..\..\..\..\build\msvc_7\extern\bullet\include"
                                PreprocessorDefinitions="NDEBUG;WIN32;_LIB;WITH_FREETYPE2;UNWRAPPER;WITH_VERSE;WITH_OPENEXR;WITH_DDS;WITH_BULLET=1"
                                StringPooling="TRUE"
                                RuntimeLibrary="0"
                        <Tool
                                Name="VCCLCompilerTool"
                                Optimization="0"
-                               AdditionalIncludeDirectories="..\..\..\..\lib\windows\zlib\include;..\..\..\..\build\msvc_7\intern\bsp\include;..\..\..\..\build\msvc_7\intern\bmfont\include;..\..\..\..\build\msvc_7\intern\guardedalloc\include;..\..\..\..\build\msvc_7\intern\decimation\include;..\..\..\..\build\msvc_7\intern\elbeem\include;..\..\..\..\build\msvc_7\intern\iksolver\include;..\..\..\source\blender;..\..\..\source\blender\avi;..\..\..\source\blender\imbuf;..\..\..\source\blender\include;..\..\..\source\blender\python;..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\nodes;..\..\..\source\blender\blenloader;..\..\..\source\kernel\gen_system;..\..\..\source\blender\renderconverter;..\..\..\source\blender\render\extern\include;..\..\..\source\gameengine\SoundSystem;..\..\..\..\build\msvc_7\extern\verse\include;..\..\..\..\build\msvc_7\intern\opennl\include;..\..\..\..\build\msvc_7\extern\bullet\include"
+                               AdditionalIncludeDirectories="..\..\..\..\lib\windows\python\include\python2.5;..\..\..\..\lib\windows\zlib\include;..\..\..\..\build\msvc_7\intern\bsp\include;..\..\..\..\build\msvc_7\intern\bmfont\include;..\..\..\..\build\msvc_7\intern\guardedalloc\include;..\..\..\..\build\msvc_7\intern\decimation\include;..\..\..\..\build\msvc_7\intern\elbeem\include;..\..\..\..\build\msvc_7\intern\iksolver\include;..\..\..\source\blender;..\..\..\source\blender\avi;..\..\..\source\blender\imbuf;..\..\..\source\blender\include;..\..\..\source\blender\python;..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\nodes;..\..\..\source\blender\blenloader;..\..\..\source\kernel\gen_system;..\..\..\source\blender\renderconverter;..\..\..\source\blender\render\extern\include;..\..\..\source\gameengine\SoundSystem;..\..\..\..\build\msvc_7\extern\verse\include;..\..\..\..\build\msvc_7\intern\opennl\include;..\..\..\..\build\msvc_7\extern\bullet\include"
                                PreprocessorDefinitions="_DEBUG,WIN32,_LIB,WITH_FREETYPE2"
                                BasicRuntimeChecks="3"
                                RuntimeLibrary="1"
                        <Tool
                                Name="VCCLCompilerTool"
                                InlineFunctionExpansion="1"
-                               AdditionalIncludeDirectories="..\..\..\..\lib\windows\zlib\include;..\..\..\..\build\msvc_7\intern\bmfont\include;..\..\..\..\build\msvc_7\intern\bsp\include;..\..\..\..\build\msvc_7\intern\guardedalloc\include;..\..\..\..\build\msvc_7\intern\decimation\include;..\..\..\..\build\msvc_7\intern\elbeem\include;..\..\..\..\build\msvc_7\intern\iksolver\include;..\..\..\source\blender;..\..\..\source\blender\avi;..\..\..\source\blender\imbuf;..\..\..\source\blender\include;..\..\..\source\blender\python;..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\nodes;..\..\..\source\blender\blenloader;..\..\..\source\kernel\gen_system;..\..\..\source\blender\renderconverter;..\..\..\source\blender\render\extern\include;..\..\..\source\gameengine\SoundSystem;..\..\..\..\build\msvc_7\extern\verse\include;..\..\..\..\build\msvc_7\intern\opennl\include;..\..\..\..\build\msvc_7\extern\bullet\include"
+                               AdditionalIncludeDirectories="..\..\..\..\lib\windows\python\include\python2.5;..\..\..\..\lib\windows\zlib\include;..\..\..\..\build\msvc_7\intern\bmfont\include;..\..\..\..\build\msvc_7\intern\bsp\include;..\..\..\..\build\msvc_7\intern\guardedalloc\include;..\..\..\..\build\msvc_7\intern\decimation\include;..\..\..\..\build\msvc_7\intern\elbeem\include;..\..\..\..\build\msvc_7\intern\iksolver\include;..\..\..\source\blender;..\..\..\source\blender\avi;..\..\..\source\blender\imbuf;..\..\..\source\blender\include;..\..\..\source\blender\python;..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\nodes;..\..\..\source\blender\blenloader;..\..\..\source\kernel\gen_system;..\..\..\source\blender\renderconverter;..\..\..\source\blender\render\extern\include;..\..\..\source\gameengine\SoundSystem;..\..\..\..\build\msvc_7\extern\verse\include;..\..\..\..\build\msvc_7\intern\opennl\include;..\..\..\..\build\msvc_7\extern\bullet\include"
                                PreprocessorDefinitions="NDEBUG,WIN32,_LIB,WITH_FREETYPE2,UNWRAPPER"
                                StringPooling="TRUE"
                                RuntimeLibrary="0"
index ef5ebe0a46489e27a3f4dab750c3c8094ed37228..f144f6674fd2e62024fadfbd711815f73d3d86d3 100644 (file)
@@ -19,7 +19,7 @@
                        <Tool
                                Name="VCCLCompilerTool"
                                Optimization="0"
-                               AdditionalIncludeDirectories="..\..\..\..\lib\windows\zlib\include;..\..\..\..\build\msvc_7\intern\bsp\include;..\..\..\..\build\msvc_7\intern\guardedalloc\include;..\..\..\..\build\msvc_7\intern\decimation\include;..\..\..\..\build\msvc_7\intern\elbeem\include;..\..\..\..\build\msvc_7\intern\iksolver\include;..\..\..\source\blender;..\..\..\source\blender\avi;..\..\..\source\blender\imbuf;..\..\..\source\blender\include;..\..\..\source\blender\python;..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\nodes;..\..\..\source\blender\blenloader;..\..\..\source\kernel\gen_system;..\..\..\source\blender\renderconverter;..\..\..\source\blender\render\extern\include;..\..\..\source\gameengine\SoundSystem;..\..\..\..\build\msvc_7\extern\verse\include"
+                               AdditionalIncludeDirectories="..\..\..\..\lib\windows\python\include\python2.5;..\..\..\..\lib\windows\zlib\include;..\..\..\..\build\msvc_7\intern\bsp\include;..\..\..\..\build\msvc_7\intern\guardedalloc\include;..\..\..\..\build\msvc_7\intern\decimation\include;..\..\..\..\build\msvc_7\intern\elbeem\include;..\..\..\..\build\msvc_7\intern\iksolver\include;..\..\..\source\blender;..\..\..\source\blender\avi;..\..\..\source\blender\imbuf;..\..\..\source\blender\include;..\..\..\source\blender\python;..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\nodes;..\..\..\source\blender\blenloader;..\..\..\source\kernel\gen_system;..\..\..\source\blender\renderconverter;..\..\..\source\blender\render\extern\include;..\..\..\source\gameengine\SoundSystem;..\..\..\..\build\msvc_7\extern\verse\include"
                                PreprocessorDefinitions="_DEBUG;WIN32;_LIB;WITH_FREETYPE2"
                                MinimalRebuild="FALSE"
                                BasicRuntimeChecks="3"
@@ -66,7 +66,7 @@
                        CharacterSet="2">
                        <Tool
                                Name="VCCLCompilerTool"
-                               AdditionalIncludeDirectories="..\..\..\..\lib\windows\zlib\include;..\..\..\..\build\msvc_7\intern\bsp\include;..\..\..\..\build\msvc_7\intern\guardedalloc\include;..\..\..\..\build\msvc_7\intern\decimation\include;..\..\..\..\build\msvc_7\intern\elbeem\include;..\..\..\..\build\msvc_7\intern\iksolver\include;..\..\..\source\blender;..\..\..\source\blender\avi;..\..\..\source\blender\imbuf;..\..\..\source\blender\include;..\..\..\source\blender\python;..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\nodes;..\..\..\source\blender\blenloader;..\..\..\source\kernel\gen_system;..\..\..\source\blender\renderconverter;..\..\..\source\blender\render\extern\include;..\..\..\source\gameengine\SoundSystem;..\..\..\..\build\msvc_7\extern\verse\include"
+                               AdditionalIncludeDirectories="..\..\..\..\lib\windows\python\include\python2.5;..\..\..\..\lib\windows\zlib\include;..\..\..\..\build\msvc_7\intern\bsp\include;..\..\..\..\build\msvc_7\intern\guardedalloc\include;..\..\..\..\build\msvc_7\intern\decimation\include;..\..\..\..\build\msvc_7\intern\elbeem\include;..\..\..\..\build\msvc_7\intern\iksolver\include;..\..\..\source\blender;..\..\..\source\blender\avi;..\..\..\source\blender\imbuf;..\..\..\source\blender\include;..\..\..\source\blender\python;..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\nodes;..\..\..\source\blender\blenloader;..\..\..\source\kernel\gen_system;..\..\..\source\blender\renderconverter;..\..\..\source\blender\render\extern\include;..\..\..\source\gameengine\SoundSystem;..\..\..\..\build\msvc_7\extern\verse\include"
                                PreprocessorDefinitions="_DEBUG;WIN32;_LIB;WITH_FREETYPE2"
                                BasicRuntimeChecks="0"
                                RuntimeLibrary="0"
                        <Tool
                                Name="VCCLCompilerTool"
                                Optimization="0"
-                               AdditionalIncludeDirectories="..\..\..\..\lib\windows\zlib\include;..\..\..\..\build\msvc_7\intern\bsp\include;..\..\..\..\build\msvc_7\intern\guardedalloc\include;..\..\..\..\build\msvc_7\intern\decimation\include;..\..\..\..\build\msvc_7\intern\elbeem\include;..\..\..\..\build\msvc_7\intern\iksolver\include;..\..\..\source\blender;..\..\..\source\blender\avi;..\..\..\source\blender\imbuf;..\..\..\source\blender\include;..\..\..\source\blender\python;..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\nodes;..\..\..\source\blender\blenloader;..\..\..\source\kernel\gen_system;..\..\..\source\blender\renderconverter;..\..\..\source\blender\render\extern\include;..\..\..\source\gameengine\SoundSystem;..\..\..\..\build\msvc_7\extern\verse\include"
+                               AdditionalIncludeDirectories="..\..\..\..\lib\windows\python\include\python2.5;..\..\..\..\lib\windows\zlib\include;..\..\..\..\build\msvc_7\intern\bsp\include;..\..\..\..\build\msvc_7\intern\guardedalloc\include;..\..\..\..\build\msvc_7\intern\decimation\include;..\..\..\..\build\msvc_7\intern\elbeem\include;..\..\..\..\build\msvc_7\intern\iksolver\include;..\..\..\source\blender;..\..\..\source\blender\avi;..\..\..\source\blender\imbuf;..\..\..\source\blender\include;..\..\..\source\blender\python;..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\nodes;..\..\..\source\blender\blenloader;..\..\..\source\kernel\gen_system;..\..\..\source\blender\renderconverter;..\..\..\source\blender\render\extern\include;..\..\..\source\gameengine\SoundSystem;..\..\..\..\build\msvc_7\extern\verse\include"
                                PreprocessorDefinitions="_DEBUG;WIN32;_LIB;WITH_FREETYPE2;WITH_OPENEXR"
                                MinimalRebuild="FALSE"
                                BasicRuntimeChecks="3"
                        CharacterSet="2">
                        <Tool
                                Name="VCCLCompilerTool"
-                               AdditionalIncludeDirectories="..\..\..\..\lib\windows\zlib\include;..\..\..\..\build\msvc_7\intern\bsp\include;..\..\..\..\build\msvc_7\intern\guardedalloc\include;..\..\..\..\build\msvc_7\intern\decimation\include;..\..\..\..\build\msvc_7\intern\elbeem\include;..\..\..\..\build\msvc_7\intern\iksolver\include;..\..\..\source\blender;..\..\..\source\blender\avi;..\..\..\source\blender\imbuf;..\..\..\source\blender\include;..\..\..\source\blender\python;..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\nodes;..\..\..\source\blender\blenloader;..\..\..\source\kernel\gen_system;..\..\..\source\blender\renderconverter;..\..\..\source\blender\render\extern\include;..\..\..\source\gameengine\SoundSystem;..\..\..\..\build\msvc_7\extern\verse\include"
+                               AdditionalIncludeDirectories="..\..\..\..\lib\windows\python\include\python2.5;..\..\..\..\lib\windows\zlib\include;..\..\..\..\build\msvc_7\intern\bsp\include;..\..\..\..\build\msvc_7\intern\guardedalloc\include;..\..\..\..\build\msvc_7\intern\decimation\include;..\..\..\..\build\msvc_7\intern\elbeem\include;..\..\..\..\build\msvc_7\intern\iksolver\include;..\..\..\source\blender;..\..\..\source\blender\avi;..\..\..\source\blender\imbuf;..\..\..\source\blender\include;..\..\..\source\blender\python;..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\nodes;..\..\..\source\blender\blenloader;..\..\..\source\kernel\gen_system;..\..\..\source\blender\renderconverter;..\..\..\source\blender\render\extern\include;..\..\..\source\gameengine\SoundSystem;..\..\..\..\build\msvc_7\extern\verse\include"
                                PreprocessorDefinitions="_DEBUG;WIN32;_LIB;WITH_FREETYPE2, WITH_OPENEXR"
                                BasicRuntimeChecks="0"
                                RuntimeLibrary="0"
                                <File
                                        RelativePath="..\..\..\source\blender\nodes\intern\SHD_nodes\SHD_curves.c">
                                </File>
+                               <File
+                                       RelativePath="..\..\..\source\blender\nodes\intern\SHD_nodes\SHD_dynamic.c">
+                               </File>
                                <File
                                        RelativePath="..\..\..\source\blender\nodes\intern\SHD_nodes\SHD_geom.c">
                                </File>
index 4f1e616dd366f7bb370ecb421ba8c677b2446ebd..83a7e9c2566f8e21d29ca2dd80f62f661b7e5ecf 100644 (file)
@@ -40,7 +40,7 @@
                                Name="VCLinkerTool"
                                AdditionalOptions="/MACHINE:I386
 "
-                               AdditionalDependencies="libguardedalloc.lib libstring.lib libghost.lib odelib.lib fmodvc.lib libbmfont.lib ws2_32.lib vfw32.lib odbc32.lib odbccp32.lib opengl32.lib glu32.lib openal_static.lib libjpeg.lib dxguid.lib libblenkey.lib libeay32.lib libpng.lib libz.lib libmoto.lib libSoundSystem.lib qtmlClient.lib libDummySoundSystem.lib libOpenALSoundSystem.lib SDL.lib solid.lib freetype2ST.lib Bullet.lib libdecimation.lib python25_d.lib pthreadVSE2.lib pthreadVC2.lib verse.lib libopennl.lib"
+                               AdditionalDependencies="libguardedalloc.lib libstring.lib libghost.lib odelib.lib fmodvc.lib libbmfont.lib ws2_32.lib vfw32.lib odbc32.lib odbccp32.lib opengl32.lib glu32.lib openal_static.lib libjpeg.lib dxguid.lib libeay32.lib libpng.lib libz.lib libmoto.lib libSoundSystem.lib qtmlClient.lib libDummySoundSystem.lib libOpenALSoundSystem.lib SDL.lib solid.lib freetype2ST.lib Bullet.lib libdecimation.lib python25_d.lib pthreadVSE2.lib pthreadVC2.lib verse.lib libopennl.lib"
                                ShowProgress="0"
                                OutputFile="..\..\..\..\bin\debug\blenderplayer.exe"
                                LinkIncremental="2"
index 40c15302553b96374116a12adf4d27ab03afebde..d9c49217042ab33a53a526698e43c7a5efabeb47 100644 (file)
@@ -386,8 +386,9 @@ void BL_ConvertSensors(struct Object* blenderobject,
                                        bool bFindMaterial = false;
                                        PHY_IPhysicsController* physCtrl = kxscene->GetPhysicsEnvironment()->CreateSphereController(radius,pos);
 
-                                       if (isInActiveLayer)
-                                               kxscene->GetPhysicsEnvironment()->addSensor(physCtrl);
+                                       //will be done in KX_TouchEventManager::RegisterSensor()  
+                                       //if (isInActiveLayer)
+                                       //      kxscene->GetPhysicsEnvironment()->addSensor(physCtrl);
 
                                                
 
index cca303c6266edc35ec62c224d67b360a1b7b6798..1a65f8311ed9a0a797720580fdc3aaced831b3a3 100644 (file)
@@ -343,6 +343,4 @@ PyObject* SCA_ISensor::PyEvaluate(PyObject* self, PyObject* args, PyObject* kwds
 {
        return BoolToPyArg(Evaluate(NULL));
 }
-
-
 /* eof */
index 86f114b2f51d36197db49241fff634c6572a307d..51cfe30179cc1c392933942e1061774a130562c2 100644 (file)
@@ -142,7 +142,11 @@ bool KX_NetworkMessageSensor::Evaluate(CValue* event)
 
        result = (WasUp != m_IsUp);
 
-       // Return true if the message received state has changed. 
+       // Return always true if a message was received otherwise we can loose messages
+       if (m_IsUp)
+               return true;
+       // Is it usefull to return also true when the first frame without a message?? 
+       // This will cause a fast on/off cycle that seems useless!
        return result;
 }
 
index 011443054a7cb88bf2381636f75dbb1240cbfa0e..bb8ea7f23b381c4f9c63674dfe381c9c6ff61ae0 100644 (file)
@@ -32,7 +32,8 @@
  */
  
 #include "KX_Camera.h"
-
+#include "KX_Scene.h"
+#include "KX_PythonInit.h"
 #include "KX_Python.h"
 #include "KX_PyMath.h"
 #ifdef HAVE_CONFIG_H
@@ -391,6 +392,7 @@ PyMethodDef KX_Camera::Methods[] = {
        KX_PYMETHODTABLE(KX_Camera, setProjectionMatrix),
        KX_PYMETHODTABLE(KX_Camera, enableViewport),
        KX_PYMETHODTABLE(KX_Camera, setViewport),
+       KX_PYMETHODTABLE(KX_Camera, setOnTop),
        
        {NULL,NULL} //Sentinel
 };
@@ -759,3 +761,15 @@ KX_PYMETHODDEF_DOC(KX_Camera, setViewport,
        }
        Py_Return;
 }
+
+KX_PYMETHODDEF_DOC(KX_Camera, setOnTop,
+"setOnTop()\n"
+"Sets this camera's viewport on top\n")
+{
+       class KX_Scene* scene;
+       
+       scene = PHY_GetActiveScene();
+       MT_assert(scene);
+       scene->SetCameraOnTop(this);
+       Py_Return;
+}
index 60f0b10794099416e7ca0c5678041bbeef0c7ba0..34a3d2f265327acdbc8ff094b3b36b5b71ab02a3 100644 (file)
@@ -251,6 +251,7 @@ public:
        
        KX_PYMETHOD_DOC(KX_Camera, enableViewport);
        KX_PYMETHOD_DOC(KX_Camera, setViewport);        
+       KX_PYMETHOD_DOC(KX_Camera, setOnTop);   
 
        virtual PyObject* _getattr(const STR_String& attr); /* lens, near, far, projection_matrix */
        virtual int       _setattr(const STR_String& attr, PyObject *pyvalue);
index e7f1dea7bbf6a7d5356560b3b7c1132c0a00022e..287634fc7ec6ca9cbc860cacf5b9978b725d31d2 100644 (file)
@@ -211,12 +211,6 @@ bool KX_IpoActuator::Update(double curtime, bool frame)
                        (*i)->Release();
                }
                m_events.clear();
-       
-               if (m_type != KX_ACT_IPO_PLAY)
-               {
-                       if (bNegativeEvent)
-                               RemoveAllEvents();
-               }
        }
        
        double  start_smaller_then_end = ( m_startframe < m_endframe ? 1.0 : -1.0);
@@ -226,6 +220,7 @@ bool KX_IpoActuator::Update(double curtime, bool frame)
        {
                if (m_starttime < -2.0*start_smaller_then_end*(m_endframe - m_startframe))
                {
+                       // start for all Ipo, initial start for LOOP_STOP
                        m_starttime = curtime - KX_KetsjiEngine::GetSuspendedDelta();
                        m_bIpoPlaying = true;
                }
@@ -238,17 +233,10 @@ bool KX_IpoActuator::Update(double curtime, bool frame)
        {
                // Check if playing forwards.  result = ! finished
                
-               if (!bNegativeEvent)
-               {
-                       if (start_smaller_then_end > 0.0)
-                               result = (m_localtime < m_endframe && !(m_localtime == m_startframe && bNegativeEvent));
-                       else
-                               result = (m_localtime > m_endframe && !(m_localtime == m_startframe && bNegativeEvent));
-               }
+               if (start_smaller_then_end > 0.0)
+                       result = (m_localtime < m_endframe && m_bIpoPlaying);
                else
-               {
-                       result = (m_bIpoPlaying && (m_localtime < m_endframe));
-               }
+                       result = (m_localtime > m_endframe && m_bIpoPlaying);
                
                if (result)
                {
@@ -267,7 +255,6 @@ bool KX_IpoActuator::Update(double curtime, bool frame)
                } else
                {
                        m_localtime=m_startframe;
-                       SetStartTime(curtime);
                        m_direction=1;
                }
                break;
@@ -275,7 +262,7 @@ bool KX_IpoActuator::Update(double curtime, bool frame)
        case KX_ACT_IPO_PINGPONG:
        {
                result = true;
-               if (bNegativeEvent && ((m_localtime == m_startframe )|| (m_localtime == m_endframe)))
+               if (bNegativeEvent && !m_bIpoPlaying)
                        result = false;
                else
                        SetLocalTime(curtime);
@@ -297,14 +284,18 @@ bool KX_IpoActuator::Update(double curtime, bool frame)
        }
        case KX_ACT_IPO_FLIPPER:
        {
-               result = !(bNegativeEvent && (m_localtime == m_startframe));
+               if (bNegativeEvent && !m_bIpoPlaying)
+                       result = false;
                if (numevents)
                {
+                       float oldDirection = m_direction;
                        if (bNegativeEvent)
                                m_direction = -1;
                        else
                                m_direction = 1;
-                       SetStartTime(curtime);
+                       if (m_direction != oldDirection)
+                               // changing direction, reset start time
+                               SetStartTime(curtime);
                }
                
                SetLocalTime(curtime);
@@ -332,18 +323,26 @@ bool KX_IpoActuator::Update(double curtime, bool frame)
                                m_bNegativeEvent = false;
                                numevents = 0;
                        }
-                       SetStartTime(curtime);
+                       if (!m_bIpoPlaying)
+                       {
+                               // Ipo was stopped, make sure we will restart from where it stopped
+                               SetStartTime(curtime);
+                               if (!bNegativeEvent)
+                                       // positive signal will restart the Ipo
+                                       m_bIpoPlaying = true;
+                       }
+
                } // fall through to loopend, and quit the ipo animation immediatly 
        }
        case KX_ACT_IPO_LOOPEND:
        {
                if (numevents){
-                       if (bNegativeEvent){
+                       if (bNegativeEvent && m_bIpoPlaying){
                                m_bNegativeEvent = true;
                        }
                }
                
-               if (bNegativeEvent && m_localtime == m_startframe){
+               if (bNegativeEvent && !m_bIpoPlaying){
                        result = false;
                } 
                else
@@ -414,8 +413,12 @@ bool KX_IpoActuator::Update(double curtime, bool frame)
                result = false;
        }
        
-       if (!result && m_type != KX_ACT_IPO_LOOPSTOP)
-               m_starttime = -2.0*start_smaller_then_end*(m_endframe - m_startframe) - 1.0;
+       if (!result)
+       {
+               if (m_type != KX_ACT_IPO_LOOPSTOP)
+                       m_starttime = -2.0*start_smaller_then_end*(m_endframe - m_startframe) - 1.0;
+               m_bIpoPlaying = false;
+       }
 
        return result;
 }
index e0a826b8d5d6fcb95423498bbd53204559e10edb..8febc0e10cd0dc8dd4eba730c97a7675f27887f8 100644 (file)
@@ -631,10 +631,10 @@ void KX_KetsjiEngine::Render()
                        RenderFrame(scene, cam);
                }
                
-               set<class KX_Camera*>* cameras = scene->GetCameras();
+               list<class KX_Camera*>* cameras = scene->GetCameras();
                
                // Draw the scene once for each camera with an enabled viewport
-               set<KX_Camera*>::iterator it = cameras->begin();
+               list<KX_Camera*>::iterator it = cameras->begin();
                while(it != cameras->end())
                {
                        if((*it)->GetViewport())
index 1a6aafafabf766224c27c736b7e57c536fad5b32..58369ddcab6bda2b48515a444bf1f3b9223bc14d 100644 (file)
@@ -1159,3 +1159,8 @@ void PHY_SetActiveScene(class KX_Scene* scene)
 {
        gp_KetsjiScene = scene;
 }
+
+class KX_Scene* PHY_GetActiveScene()
+{
+       return gp_KetsjiScene;
+}
index a4c2d1453a6873294b178070c6baf770b19b1751..edb7cfe4a3f3f141cbd557def7d2ba50e6024e41 100644 (file)
@@ -53,6 +53,7 @@ void          exitGamePythonScripting();
 void           dictionaryClearByHand(PyObject *dict);
 
 void PHY_SetActiveScene(class KX_Scene* scene);
+class KX_Scene* PHY_GetActiveScene();
 #include "MT_Vector3.h"
 
 void           KX_RasterizerDrawDebugLine(const MT_Vector3& from,const MT_Vector3& to,const MT_Vector3& color);
index 7b13cb1fd7da580e3ea51bbdde9406bf6f38935f..ea17e0b3dd6195b059f38d91d43a8d44356e7758 100644 (file)
@@ -77,6 +77,14 @@ bool KX_RayCast::RayTest(KX_IPhysicsController* ignore_controller, PHY_IPhysicsE
                if (callback.RayHit(info, result_point, result_normal))
                        return true;
        
+               // There is a bug in the code below: the delta is computed with the wrong
+               // sign on the face opposite to the center, resulting in infinite looping.
+               // In Blender 2.45 this code was never executed because callback.RayHit() always 
+               // returned true, causing the ray sensor to stop on the first object.
+               // To avoid changing the behaviour will simply return false here.
+               // It should be discussed if we want the ray sensor to "see" through objects
+               // that don't have the required property/material (condition to get here)
+               return false;
        
                // skip past the object and keep tracing
                /* We add 0.01 of fudge, so that if the margin && radius == 0., we don't endless loop. */
index 1ed429ea4904be033c17f8682490fd18124f96c2..f9c2f8e571b085741ccc0888fcd1ed37f2d271e1 100644 (file)
@@ -263,7 +263,7 @@ SCA_TimeEventManager* KX_Scene::GetTimeEventManager()
 
 
  
-set<class KX_Camera*>* KX_Scene::GetCameras()
+list<class KX_Camera*>* KX_Scene::GetCameras()
 {
        return &m_cameras;
 }
@@ -847,7 +847,7 @@ MT_CmMatrix4x4& KX_Scene::GetProjectionMatrix()
 
 KX_Camera* KX_Scene::FindCamera(KX_Camera* cam)
 {
-       set<KX_Camera*>::iterator it = m_cameras.begin();
+       list<KX_Camera*>::iterator it = m_cameras.begin();
 
        while ( (it != m_cameras.end()) 
                        && ((*it) != cam) ) {
@@ -860,7 +860,7 @@ KX_Camera* KX_Scene::FindCamera(KX_Camera* cam)
 
 KX_Camera* KX_Scene::FindCamera(STR_String& name)
 {
-       set<KX_Camera*>::iterator it = m_cameras.begin();
+       list<KX_Camera*>::iterator it = m_cameras.begin();
 
        while ( (it != m_cameras.end()) 
                        && ((*it)->GetName() != name) ) {
@@ -872,7 +872,8 @@ KX_Camera* KX_Scene::FindCamera(STR_String& name)
 
 void KX_Scene::AddCamera(KX_Camera* cam)
 {
-       m_cameras.insert(cam);
+       if (!FindCamera(cam))
+               m_cameras.push_back(cam);
 }
 
 KX_Camera* KX_Scene::GetActiveCamera()
@@ -893,6 +894,17 @@ void KX_Scene::SetActiveCamera(KX_Camera* cam)
        m_active_camera = cam;
 }
 
+void KX_Scene::SetCameraOnTop(KX_Camera* cam)
+{
+       if (!FindCamera(cam)){
+               // adding is always done at the back, so that's all that needs to be done
+               AddCamera(cam);
+               if (cam) std::cout << "Added cam " << cam->GetName() << std::endl;
+       } else {
+               m_cameras.remove(cam);
+               m_cameras.push_back(cam);
+       }
+}
 
 
 void KX_Scene::UpdateMeshTransformations()
index ba479c5e5437167b284f18ab6a9628d347f9cbaa..50fcf1a3c40d06eb7ec64d16a7424e4023390378 100644 (file)
@@ -39,6 +39,7 @@
 
 #include <vector>
 #include <set>
+#include <list>
 
 #include "GEN_Map.h"
 #include "GEN_HashedPtr.h"
@@ -119,7 +120,7 @@ protected:
        /**
         * The set of cameras for this scene
         */
-       set<class KX_Camera*>       m_cameras;
+       list<class KX_Camera*>       m_cameras;
        
        /**
         * Various SCA managers used by the scene
@@ -330,7 +331,7 @@ public:
        GetTimeEventManager(
        );
 
-               set<class KX_Camera*>*
+               list<class KX_Camera*>*
        GetCameras(
        );
  
@@ -368,6 +369,15 @@ public:
                class KX_Camera*
        );
 
+       /**
+        * Move this camera to the end of the list so that it is rendered last.
+        * If the camera is not on the list, it will be added
+        */
+               void
+       SetCameraOnTop(
+               class KX_Camera*
+       );
+
        /** Return the viewmatrix as used by the last frame. */
                MT_CmMatrix4x4&                 
        GetViewMatrix(