Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2009-06-03 08:12:59 +0400
committerCampbell Barton <ideasman42@gmail.com>2009-06-03 08:12:59 +0400
commit903722299d19a061ec38ca9f17fccc8b389b95a7 (patch)
tree2797395cf33dadf58fd786dc03dc655c3d450567 /source/gameengine/GameLogic/Joystick
parenta9c29cd4154fcc3933d59eb06d4fe20790298e88 (diff)
BGE PyAPI fixes
- CValue warning ShowDeprecationWarning("val = ob.attr", "val = ob['attr']"); had false positives because of python using getattr() internally. Only show the wanring now when a CValue is found. - Py functions that accepted a vector and a GameObject were slowed down by PySequence_Check() first called on the GameObject, though this would fail it would try and get attributes from the game object - ending up in ~8 attribute lookups each time. Avoiding PySequence_Check() makes ob.getDistanceTo(otherOb) over twice as fast. - Joystick hat events could crash the BGE for joysticks with more then 4 hats. - PLY Import failed on PLY files from Carve, added some extra types.
Diffstat (limited to 'source/gameengine/GameLogic/Joystick')
-rw-r--r--source/gameengine/GameLogic/Joystick/SCA_JoystickEvents.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/gameengine/GameLogic/Joystick/SCA_JoystickEvents.cpp b/source/gameengine/GameLogic/Joystick/SCA_JoystickEvents.cpp
index 66193a2f4b9..53d3be35f92 100644
--- a/source/gameengine/GameLogic/Joystick/SCA_JoystickEvents.cpp
+++ b/source/gameengine/GameLogic/Joystick/SCA_JoystickEvents.cpp
@@ -45,7 +45,7 @@ void SCA_Joystick::OnAxisMotion(SDL_Event* sdl_event)
/* See notes below in the event loop */
void SCA_Joystick::OnHatMotion(SDL_Event* sdl_event)
{
- if(sdl_event->jhat.hat >= JOYAXIS_MAX)
+ if(sdl_event->jhat.hat >= JOYHAT_MAX)
return;
m_hat_array[sdl_event->jhat.hat]= sdl_event->jhat.value;