Fix for a relative paths issue in the game engine. G.sce was being
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Sat, 11 Oct 2008 00:56:49 +0000 (00:56 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Sat, 11 Oct 2008 00:56:49 +0000 (00:56 +0000)
commit9b948cad08067a6bedd49ccfb059874aba7555b9
tree5fc5236ab893aaaadec1a83081b923ededd24e32
parentc3aef29ab704ba7ca9ec401ad0028d21d8b431be
Fix for a relative paths issue in the game engine. G.sce was being
kept as the original file, but that can't work correct for solving
relative paths once a .blend in another directory is loaded. The
reason it went OK with the apricot tech demo is that the images there
were lib linked into the level file, which still worked.

Now it sets G.sce to the current loaded .blend file. Note that the
python config file path still uses the first loaded .blend file so it
looks in the same location each time.

Also added some NULL pointer checks in the joystick code because it
was crashing there on Mac, there's similar checks in related functions
so I'm assuming this was just a missed case.
source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
source/gameengine/GameLogic/Joystick/SCA_JoystickEvents.cpp
source/gameengine/GameLogic/SCA_JoystickManager.cpp
source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
source/gameengine/Ketsji/KX_PythonInit.cpp
source/gameengine/Ketsji/KX_PythonInit.h