diff --git a/qcommon/filesystem.h b/qcommon/filesystem.h index 7ea0d8d..f2f7159 100644 --- a/qcommon/filesystem.h +++ b/qcommon/filesystem.h @@ -32,8 +32,11 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include "../unix/zip/unzip.h" #include "../unix/zip/zip.h" #else // _WIN32 -#include -#include +//#include +//#include +// KMQ2 MacOSX port builds with the above, but the below should work as well. +#include "../unix/zip/unzip.h" +#include "../unix/zip/zip.h" #endif // _WIN32 #define BASEDIRNAME "baseq2" diff --git a/unix/glw_unix.h b/unix/glw_unix.h index f49d534..04612f2 100644 --- a/unix/glw_unix.h +++ b/unix/glw_unix.h @@ -23,7 +23,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #if !defined(__linux__) && !defined(__FreeBSD__) && !defined(__APPLE__) #error You shouldn't be including this file on non-Linux platforms #endif -#endif #ifndef __GLW_UNIX_H__ #define __GLW_UNIX_H__ diff --git a/unix/in_unix.c b/unix/in_unix.c index fbb8145..d840400 100644 --- a/unix/in_unix.c +++ b/unix/in_unix.c @@ -174,6 +174,34 @@ void IN_Move (usercmd_t *cmd) cmd->forwardmove -= m_forward->value * my; mx = my = 0; + + // flibitijibibo added + if (!in_joystick->value) + { + return; + } + + // add controller movement to cmd + if ( (in_speed.state & 1) ^ (int)cl_run->value) + speed = 2; + else + speed = 1; + + aspeed = speed * cls.netFrameTime; + cmd->sidemove += controller_leftx * speed * cl_sidespeed->value; + cmd->forwardmove -= controller_lefty * speed * cl_forwardspeed->value; + + if (in_autosensitivity->integer && cl.base_fov < 90) + { + cl.viewangles[YAW] -= controller_rightx * aspeed * cl_pitchspeed->value * (cl.refdef.fov_x/90.0); + cl.viewangles[PITCH] += controller_righty * aspeed * cl_pitchspeed->value * (cl.refdef.fov_x/90.0); + } + else + { + cl.viewangles[YAW] -= controller_rightx * aspeed * cl_pitchspeed->value; + cl.viewangles[PITCH] += controller_righty * aspeed * cl_pitchspeed->value; + } + // end flibitijibibo } void IN_Frame (void) @@ -185,6 +213,4 @@ void IN_Frame (void) IN_Activate(false); else IN_Activate(true); - } - diff --git a/unix/sys_unix.c b/unix/sys_unix.c index 913ba12..a189687 100644 --- a/unix/sys_unix.c +++ b/unix/sys_unix.c @@ -243,7 +243,7 @@ void *Sys_GetGameAPI (void *parms) char curpath[MAX_OSPATH]; char *path; -#ifdef (__APPLE__) +#ifdef __APPLE__ // KMQ2 MacOSX port uses the Fruitz of Dojo plug system. So this will go unused. #define LIB_SUFFIX "dylib" #else