modified behaviour of PropertySensor and MessageSensor on popular request.
[blender.git] / source / gameengine / GameLogic / SCA_PropertySensor.cpp
index 6f98b777d8c46a1681fdc782d2b205df4df8f8ae..979ce51ab5e55eefcfc9368f2bae50c48dccfc78 100644 (file)
@@ -260,7 +260,16 @@ bool       SCA_PropertySensor::CheckPropertyCondition()
        default:
                ; /* error */
        }
        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;
 }
 
        return result;
 }