From 67c0b32375c9c2f9838cf110975d7fce9d783daa Mon Sep 17 00:00:00 2001 From: Benoit Bolsee Date: Mon, 23 Jun 2008 20:26:48 +0000 Subject: BGE patch: Add level option on sensor and fix sensor reset. Level option is now available on all sensors but is only implemented on mouse and keyboard sensors. The purpose of that option is to make the sensor react on level rather than edge by default. It's only applicable to state engine system when there is a state transition: the sensor will generate a pulse if the condition is met from the start of the state. Normally, the keyboard sensor generate a pulse only when the key is pressed and not when the key is already pressed. This patch allows to select this behavior. The second part of the patch corrects the reset method for sensors with inverted output. --- source/blender/makesdna/DNA_sensor_types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/makesdna/DNA_sensor_types.h') diff --git a/source/blender/makesdna/DNA_sensor_types.h b/source/blender/makesdna/DNA_sensor_types.h index 3fd57a85349..ae7b92bb06c 100644 --- a/source/blender/makesdna/DNA_sensor_types.h +++ b/source/blender/makesdna/DNA_sensor_types.h @@ -144,7 +144,7 @@ typedef struct bSensor { /* just add here, to avoid align errors... */ short invert; /* Whether or not to invert the output. */ - short freq2; /* The negative pulsing frequency? Not used anymore... */ + short level; /* Whether the sensor is level base (edge by default) */ int pad; } bSensor; -- cgit v1.2.3