From 7d99a4ded9d3d24c24ea2d5bcc488469cf60fa4a Mon Sep 17 00:00:00 2001 From: Jorge Bernal Date: Wed, 25 Jun 2014 15:47:30 -0700 Subject: BGE: New Mouse Actuator Disclaimer: The author of this patch is Geoffrey Gollmer (gomer). I only updated the patch to the current git master status, reworked several parts to fit well with current coding style and applied several fixes. This actuator allows users to show/hide the mouse cursor using logic bricks, as well as control object rotation with a mouse in the BGE. The mouse rotation is flexible enough to allow any type of mouse look, as well as banking for flight controls. {F94520} {F91859} Blend file for testing Mouse actuator (with default parameters and crosshair): {F94920} Reviewers: moguri Reviewed By: moguri CC: gomer, lordodin Differential Revision: https://developer.blender.org/D559 --- source/blender/blenloader/intern/readfile.c | 3 +++ source/blender/blenloader/intern/writefile.c | 3 +++ 2 files changed, 6 insertions(+) (limited to 'source/blender/blenloader/intern') diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index b0edb41f96d..91753158d02 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -4450,6 +4450,9 @@ static void lib_link_object(FileData *fd, Main *main) steeringa->target = newlibadr(fd, ob->id.lib, steeringa->target); steeringa->navmesh = newlibadr(fd, ob->id.lib, steeringa->navmesh); } + else if(act->type == ACT_MOUSE) { + /* bMouseActuator *moa= act->data; */ + } } { diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index 45139789f1e..a0198a687a2 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -1237,6 +1237,9 @@ static void write_actuators(WriteData *wd, ListBase *lb) case ACT_STEERING: writestruct(wd, DATA, "bSteeringActuator", 1, act->data); break; + case ACT_MOUSE: + writestruct(wd, DATA, "bMouseActuator", 1, act->data); + break; default: ; /* error: don't know how to write this file */ } -- cgit v1.2.3