BGE: renamed sensor type enum to avoid conflict with mingw (NEAR was causing the problem).

This commit is contained in:
2009-05-24 12:53:49 +00:00
parent 83bb096f24
commit e41eeaa045
5 changed files with 9 additions and 9 deletions

View File

@@ -93,10 +93,10 @@ protected:
public:
enum sensortype {
NONE = 0,
TOUCH,
NEAR,
RADAR,
ST_NONE = 0,
ST_TOUCH,
ST_NEAR,
ST_RADAR,
// to be updated as needed
};
@@ -147,7 +147,7 @@ public:
virtual double GetNumber();
virtual sensortype GetSensorType() { return NONE; }
virtual sensortype GetSensorType() { return ST_NONE; }
/** Stop sensing for a while. */
void Suspend();

View File

@@ -78,7 +78,7 @@ public:
const PHY_CollData * coll_data);
virtual bool BroadPhaseFilterCollision(void*obj1,void*obj2);
virtual bool BroadPhaseSensorFilterCollision(void*obj1,void*obj2) { return false; };
virtual sensortype GetSensorType() { return NEAR; }
virtual sensortype GetSensorType() { return ST_NEAR; }
/* --------------------------------------------------------------------- */
/* Python interface ---------------------------------------------------- */

View File

@@ -92,7 +92,7 @@ public:
virtual PyObject* py_getattro(PyObject *attr);
virtual PyObject* py_getattro_dict();
virtual int py_setattro(PyObject *attr, PyObject* value);
virtual sensortype GetSensorType() { return RADAR; }
virtual sensortype GetSensorType() { return ST_RADAR; }
//Deprecated ----->
KX_PYMETHOD_DOC_NOARGS(KX_RadarSensor,GetConeOrigin);

View File

@@ -105,7 +105,7 @@ bool KX_TouchEventManager::newBroadphaseResponse(void *client_data,
it != info->m_sensors.end();
++it)
{
if ((*it)->GetSensorType() == SCA_ISensor::TOUCH)
if ((*it)->GetSensorType() == SCA_ISensor::ST_TOUCH)
{
KX_TouchSensor* touchsensor = static_cast<KX_TouchSensor*>(*it);
if (touchsensor->BroadPhaseSensorFilterCollision(object1, object2))

View File

@@ -104,7 +104,7 @@ public:
// return value = true if collision should be checked on pair of object
virtual bool BroadPhaseFilterCollision(void*obj1,void*obj2) { return true; }
virtual bool BroadPhaseSensorFilterCollision(void*obj1,void*obj2);
virtual sensortype GetSensorType() { return TOUCH; }
virtual sensortype GetSensorType() { return ST_TOUCH; }
virtual bool IsPositiveTrigger() {