BGE Py API patch from Mitchell Stokes, add distance attribute to the radar sensor...
authorCampbell Barton <ideasman42@gmail.com>
Sat, 2 May 2009 04:53:01 +0000 (04:53 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sat, 2 May 2009 04:53:01 +0000 (04:53 +0000)
removed (ssizeobjargproc) it breaks py2.3

source/gameengine/Converter/BL_ActionActuator.cpp
source/gameengine/Expressions/ListValue.cpp
source/gameengine/Ketsji/KX_RadarSensor.cpp
source/gameengine/PyDoc/BL_ActionActuator.py

index 8b8e6b54320baa89fbbd4493efd281fe6f28bdca..646a65d347bcda63c625ce44db02a2cf0e1bb734 100644 (file)
@@ -1012,7 +1012,7 @@ PyAttributeDef BL_ActionActuator::Attributes[] = {
        KX_PYATTRIBUTE_FLOAT_RW_CHECK("frame", 0, MAXFRAMEF, BL_ActionActuator, m_localtime, CheckFrame),
        KX_PYATTRIBUTE_STRING_RW("property", 0, 31, false, BL_ActionActuator, m_propname),
        KX_PYATTRIBUTE_STRING_RW("frameProperty", 0, 31, false, BL_ActionActuator, m_framepropname),
-       KX_PYATTRIBUTE_BOOL_RW("continue", BL_ActionActuator, m_end_reset),
+       KX_PYATTRIBUTE_BOOL_RW("useContinue", BL_ActionActuator, m_end_reset),
        KX_PYATTRIBUTE_FLOAT_RW_CHECK("blendTime", 0, MAXFRAMEF, BL_ActionActuator, m_blendframe, CheckBlendTime),
        KX_PYATTRIBUTE_SHORT_RW_CHECK("type",0,100,false,BL_ActionActuator,m_playtype,CheckType),
        { NULL }        //Sentinel
index fc6b929914674bdbad229287f620407ed2fc2a56..027d25943363e726bc02b8529a64996b82eb7b54 100644 (file)
@@ -218,7 +218,7 @@ static  PySequenceMethods listvalue_as_sequence = {
        NULL,
 #else
        listvalue_buffer_slice, /*sq_slice*/
-       (ssizeobjargproc)NULL, /*sq_ass_item*/
+       NULL, /*sq_ass_item*/
        NULL, /*sq_ass_slice*/
 #endif
 };
index 1959dd5204659500cb3bf5f75fa5c64e7214e86c..4532224a81e1980007dcbd9e570d4cb56dbed65a 100644 (file)
@@ -280,6 +280,7 @@ PyMethodDef KX_RadarSensor::Methods[] = {
 PyAttributeDef KX_RadarSensor::Attributes[] = {
        KX_PYATTRIBUTE_FLOAT_ARRAY_RO("coneOrigin", KX_RadarSensor, m_cone_origin, 3),
        KX_PYATTRIBUTE_FLOAT_ARRAY_RO("coneTarget", KX_RadarSensor, m_cone_target, 3),
+       KX_PYATTRIBUTE_FLOAT_RO("distance", KX_RadarSensor, m_coneheight),
        KX_PYATTRIBUTE_FLOAT_RW("angle", 0, 360, KX_RadarSensor, m_coneradius),
        KX_PYATTRIBUTE_INT_RW("axis", 0, 5, true, KX_RadarSensor, m_axis),
        {NULL} //Sentinel
index 480681dc14a7155cb85adafc70b6e2bd197f59d2..455f83d5ce7eabee8ef701d87db0098222e4771a 100644 (file)
@@ -29,7 +29,7 @@ class BL_ActionActuator(SCA_IActuator):
        @type blendTime: float
        @ivar type: The operation mode of the actuator. KX_ACTIONACT_PLAY, KX_ACTIONACT_PROPERTY, KX_ACTIONACT_FLIPPER, KX_ACTIONACT_LOOPSTOP, KX_ACTIONACT_LOOPEND
        @type type: integer
-       @ivar continue: The actions continue option, True or False.
+       @ivar useContinue: The actions continue option, True or False.
                                        When True, the action will always play from where last left off,
                                        otherwise negative events to this actuator will reset it to its start frame.
        @type: boolean