diff options
author | Mitchell Stokes <mogurijin@gmail.com> | 2012-08-23 13:24:59 +0400 |
---|---|---|
committer | Mitchell Stokes <mogurijin@gmail.com> | 2012-08-23 13:24:59 +0400 |
commit | fd2c3d1e3014221667422f4f85665baaaf23bdf3 (patch) | |
tree | 49124229c72ab83bf8d80d2f7f0bab07ad7c1786 | |
parent | e91e1814d0cd6de342f64a6307f1359a7757cf62 (diff) |
BGE: When creating a controller by linking a sensor and actuator, the created controller will always be an and controller instead of the last controller type added.
-rw-r--r-- | source/blender/editors/interface/interface_handlers.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index f0d2cb183b5..39567a5b00b 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -838,6 +838,7 @@ static void ui_add_smart_controller(bContext *C, uiBut *from, uiBut *to) /* (3) add a new controller */ if (WM_operator_name_call(C, "LOGIC_OT_controller_add", WM_OP_EXEC_DEFAULT, NULL) & OPERATOR_FINISHED) { cont = (bController *)ob->controllers.last; + cont->type = CONT_LOGIC_AND; /* Quick fix to make sure we always have an AND controller. It might be nicer to make sure the operator gives us the right one though... */ /* (4) link the sensor->controller->actuator */ tmp_but = MEM_callocN(sizeof(uiBut), "uiBut"); |