modified behaviour of PropertySensor and MessageSensor on popular request.
Logic systems should be improved, with consistent Level and Edge triggering usage in the logic bricks.
This commit is contained in:
@@ -260,7 +260,16 @@ bool SCA_PropertySensor::CheckPropertyCondition()
|
||||
default:
|
||||
; /* error */
|
||||
}
|
||||
m_recentresult=result;
|
||||
|
||||
//the concept of Edge and Level triggering has unwanted effect for KX_PROPSENSOR_CHANGED
|
||||
//see Game Engine bugtracker [ #3809 ]
|
||||
if (m_checktype != KX_PROPSENSOR_CHANGED)
|
||||
{
|
||||
m_recentresult=result;
|
||||
} else
|
||||
{
|
||||
m_recentresult=true;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -149,7 +149,10 @@ bool KX_NetworkMessageSensor::Evaluate(CValue* event)
|
||||
bool KX_NetworkMessageSensor::IsPositiveTrigger()
|
||||
{
|
||||
// printf("KX_NetworkMessageSensor IsPositiveTrigger\n");
|
||||
return m_IsUp;
|
||||
//attempt to fix [ #3809 ] IPO Actuator does not work with some Sensors
|
||||
//a better solution is to properly introduce separate Edge and Level triggering concept
|
||||
|
||||
return true;//m_IsUp;
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------- */
|
||||
|
||||
Reference in New Issue
Block a user