From 5233069908265611bc542d370258b1ab96fddfb4 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 25 Apr 2009 12:58:07 +0000 Subject: [PATCH] Running 2.48rc on my system segfaults when starting the game engine, only on the release, not for my own builds. 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 | 1 + source/gameengine/PyDoc/KX_GameObject.py | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/source/creator/creator.c b/source/creator/creator.c index 5c0ca9e07ff..7804eb7ad98 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -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 */ diff --git a/source/gameengine/PyDoc/KX_GameObject.py b/source/gameengine/PyDoc/KX_GameObject.py index 10abf8b8197..fcb3d91dbcb 100644 --- a/source/gameengine/PyDoc/KX_GameObject.py +++ b/source/gameengine/PyDoc/KX_GameObject.py @@ -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): """