Running 2.48rc on my system segfaults when starting the game engine, only on the...
authorCampbell Barton <ideasman42@gmail.com>
Sat, 25 Apr 2009 12:58:07 +0000 (12:58 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sat, 25 Apr 2009 12:58:07 +0000 (12:58 +0000)
Setting the SDL video driver to dummy prevents the crash, this is recommended in the SDL docs if your not using the video driver.

source/creator/creator.c
source/gameengine/PyDoc/KX_GameObject.py

index 5c0ca9e07ff77a3a960f912a6611dace7b62ff21..7804eb7ad989c3b64728cbd25af5d1d749b48108 100644 (file)
@@ -538,6 +538,7 @@ int main(int argc, char **argv)
                BLI_where_is_temp( btempdir, 1 ); /* call after loading the .B.blend so we can read U.tempdir */
 
 #ifndef DISABLE_SDL
+               setenv("SDL_VIDEODRIVER", "dummy", 1); /* initializing the video driver can cause crashes on some systems - Campbell */
 #ifdef __linux__
                /* On linux the default SDL driver dma often would not play
                 * use alsa if none is set */
index 10abf8b819784fbdddd191ff9b8dd582c506122e..fcb3d91dbcbb9cbc4f52f6df792108775e3d9db7 100644 (file)
@@ -159,7 +159,7 @@ class KX_GameObject: # (SCA_IObject)
                @param orn: a rotation matrix specifying the new rotation.
                @note: When using this matrix with Blender.Mathutils.Matrix() types, it will need to be transposed.
                """
-       def alignAxisToVect(vect, axis):
+       def alignAxisToVect(vect, axis, factor):
                """
                Aligns any of the game object's axis along the given vector.
                
@@ -170,6 +170,8 @@ class KX_GameObject: # (SCA_IObject)
                                        - 0: X axis
                                        - 1: Y axis
                                        - 2: Z axis (default) 
+               @type factor: float
+               @param factor: Only rotate a feaction of the distance to the target vector (0.0 - 1.0)
                """
        def getAxisVect(vect):
                """