diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-07-29 21:49:14 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-07-29 21:49:14 +0400 |
commit | f608b3c44402ef5c58217481d93e7fa83c9cd7cf (patch) | |
tree | cc8211154eb5a3cf9e1d89484cbe48facd51b90e /source/gameengine | |
parent | c41e1e434ab9defa35178ad8886d81b60d889e9a (diff) |
code cleanup:
- building without python works again
- rename maxi/mini to i_max/i_min (so thay are available for function names)
- some minor edits to IK stretch setting (no functional changes).
Diffstat (limited to 'source/gameengine')
-rw-r--r-- | source/gameengine/Converter/KX_BlenderSceneConverter.cpp | 7 | ||||
-rw-r--r-- | source/gameengine/Ketsji/KX_Light.cpp | 10 | ||||
-rw-r--r-- | source/gameengine/Ketsji/KX_RadarSensor.h | 5 |
3 files changed, 15 insertions, 7 deletions
diff --git a/source/gameengine/Converter/KX_BlenderSceneConverter.cpp b/source/gameengine/Converter/KX_BlenderSceneConverter.cpp index 651c1a70f45..1c3352454a2 100644 --- a/source/gameengine/Converter/KX_BlenderSceneConverter.cpp +++ b/source/gameengine/Converter/KX_BlenderSceneConverter.cpp @@ -1043,9 +1043,11 @@ bool KX_BlenderSceneConverter::LinkBlendFile(BlendHandle *bpy_openlib, const cha delete other; } +#ifdef WITH_PYTHON /* Handle any text datablocks */ if (options & LIB_LOAD_LOAD_SCRIPTS) addImportMain(main_newlib); +#endif /* Now handle all the actions */ if (options & LIB_LOAD_LOAD_ACTIONS) { @@ -1339,8 +1341,11 @@ bool KX_BlenderSceneConverter::FreeBlendFile(struct Main *maggie) } } - /* make sure this maggie is removed from the import list if it's there (this operation is safe if it isn't in the list) */ +#ifdef WITH_PYTHON + /* make sure this maggie is removed from the import list if it's there + * (this operation is safe if it isn't in the list) */ removeImportMain(maggie); +#endif free_main(maggie); diff --git a/source/gameengine/Ketsji/KX_Light.cpp b/source/gameengine/Ketsji/KX_Light.cpp index 512dc4b931b..f5aa1bb3c75 100644 --- a/source/gameengine/Ketsji/KX_Light.cpp +++ b/source/gameengine/Ketsji/KX_Light.cpp @@ -29,11 +29,12 @@ * \ingroup ketsji */ - #if defined(WIN32) && !defined(FREE_WINDOWS) #pragma warning (disable : 4786) #endif +#include <stdio.h> + #include "GL/glew.h" #include "KX_Light.h" @@ -148,11 +149,12 @@ bool KX_LightObject::ApplyLight(KX_Scene *kxscene, int oblayer, int slot) //vec[1]= -base->object->obmat[2][1]; //vec[2]= -base->object->obmat[2][2]; glLightfv((GLenum)(GL_LIGHT0+slot), GL_SPOT_DIRECTION, vec); - glLightf((GLenum)(GL_LIGHT0+slot), GL_SPOT_CUTOFF, m_lightobj.m_spotsize/2.0); - glLightf((GLenum)(GL_LIGHT0+slot), GL_SPOT_EXPONENT, 128.0*m_lightobj.m_spotblend); + glLightf((GLenum)(GL_LIGHT0+slot), GL_SPOT_CUTOFF, m_lightobj.m_spotsize / 2.0f); + glLightf((GLenum)(GL_LIGHT0+slot), GL_SPOT_EXPONENT, 128.0f * m_lightobj.m_spotblend); } - else + else { glLightf((GLenum)(GL_LIGHT0+slot), GL_SPOT_CUTOFF, 180.0); + } } if (m_lightobj.m_nodiffuse) { diff --git a/source/gameengine/Ketsji/KX_RadarSensor.h b/source/gameengine/Ketsji/KX_RadarSensor.h index f1ed5b3c982..2de58f8b3a0 100644 --- a/source/gameengine/Ketsji/KX_RadarSensor.h +++ b/source/gameengine/Ketsji/KX_RadarSensor.h @@ -90,10 +90,11 @@ public: KX_RADAR_AXIS_NEG_Z }; - /* python */ virtual sensortype GetSensorType() { return ST_RADAR; } - + /* python */ +#ifdef WITH_PYTHON static PyObject* pyattr_get_angle(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef); +#endif }; #endif //__KX_RADARSENSOR_H__ |