diff options
author | Mitchell Stokes <mogurijin@gmail.com> | 2012-06-14 12:01:20 +0400 |
---|---|---|
committer | Mitchell Stokes <mogurijin@gmail.com> | 2012-06-14 12:01:20 +0400 |
commit | c07c57237398fbd214c329f2be0d88cc255e26eb (patch) | |
tree | 8073d71a0b4b6d2afd71f4f43e54c922ad76ea61 /source/gameengine/Ketsji/KX_RadarSensor.h | |
parent | cae6873bc69ab8590ca6f4d2bbf2eb3d189ab13a (diff) |
Fix for [#31813] "bge.types.KX_RadarSensor incorrect attributes" reported by Monster.
KX_RadarSensor.angle was returning the angle that was used to construct Bullet's physics shape, which is calculated from the logic brick gui. KX_RadarSensor.angle now recalculates the original value from the gui. However, m_coneradius isn't actually used by KX_RadarSensor that I can see, so it might be better to just assign the original angle to m_coneradius instead of the calculated value. I've also made KX_RadarSensor.angle read-only, since setting m_coneradius does not appear to have any affect, which means writing to KX_RadarSensor.angle never worked properly.
Diffstat (limited to 'source/gameengine/Ketsji/KX_RadarSensor.h')
-rw-r--r-- | source/gameengine/Ketsji/KX_RadarSensor.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/gameengine/Ketsji/KX_RadarSensor.h b/source/gameengine/Ketsji/KX_RadarSensor.h index 903413ca89b..f1ed5b3c982 100644 --- a/source/gameengine/Ketsji/KX_RadarSensor.h +++ b/source/gameengine/Ketsji/KX_RadarSensor.h @@ -93,6 +93,7 @@ public: /* python */ virtual sensortype GetSensorType() { return ST_RADAR; } + static PyObject* pyattr_get_angle(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef); }; #endif //__KX_RADARSENSOR_H__ |