ref: aa6fbb27fa643d09277a5c411256accb884c1038
parent: e31c7680fc51eda71be60d926d20cfb4b59946c5
author: levesqu8 <levesqu8@msu.edu>
date: Tue Nov 21 14:04:20 EST 2017
Added feature to ignore Y Axis on mouse for movement
--- a/rott/rt_actor.c
+++ b/rott/rt_actor.c
@@ -3771,52 +3771,6 @@
}
}
-/*
-void SetStandAfterResurrect(objtype * actor)
-{
- switch(actor->obclass)
- {
- case lowguardobj:
- SetAfterResurrectState(actor, &s_lowgrdstand);
- //actor->state = &s_lowgrdchase1;
- break;
- case highguardobj:
- SetAfterResurrectState(actor, &s_highgrdstand);
- //actor->state = &s_highgrdchase1;
- break;
- case strikeguardobj:
- SetAfterResurrectState(actor, &s_strikestand);
- //actor->state = &s_strikechase1;
- break;
- case blitzguardobj:
- SetAfterResurrectState(actor, &s_blitzstand);
- //actor->state = &s_blitzchase1;
- break;
- case triadenforcerobj:
- SetAfterResurrectState(actor, &s_enforcerstand);
- //actor->state = &s_enforcerchase1;
- break;
- case overpatrolobj:
- SetAfterResurrectState(actor, &s_opstand);
- //actor->state = &s_opchase1;
- break;
- case deathmonkobj:
- SetAfterResurrectState(actor, &s_dmonkstand);
- //actor->state = &s_dmonkchase1;
- break;
- case dfiremonkobj:
- SetAfterResurrectState(actor, &s_firemonkstand);
- //actor->state = &s_firemonkchase1;
- break;
- default:
- Error("SetStandAfterResurrect was called with something that can't be handled!");
- break;
- }
-}
-*/
-
-
-
void SpawnDuringGame (classtype which, int tilex, int tiley, int dir, int ambush)
{
statetype *temp;
--- a/rott/rt_cfg.c
+++ b/rott/rt_cfg.c
@@ -119,6 +119,7 @@
boolean autoAimMissileWeps = 0;
boolean autoAim = 1;
boolean enableExtraPistolDrops = 0;
+boolean allowMovementWithMouseYAxis = 1;
int FocalWidthOffset = 0;
boolean joystickenabled = 0;
@@ -544,6 +545,8 @@
ReadInt("InverseMouse",&inverse_mouse);
+ ReadBoolean("AllowMovementWithMouseYAxis", &allowMovementWithMouseYAxis);
+
// Read in UseJump
ReadBoolean("UseJump",&usejump);
@@ -1804,6 +1807,11 @@
SafeWriteString(file,"; 1 - Normal Mouse Enabled\n");
SafeWriteString(file,"; -1 - Inverse Mouse Enabled\n");
WriteParameter(file,"InverseMouse ",inverse_mouse);
+
+ SafeWriteString(file,"\n;\n");
+ SafeWriteString(file,"; 1 - Allows X and Y movement with Mouse. (Default)\n");
+ SafeWriteString(file,"; 0 - Allow only X movement with Mouse.\n");
+ WriteParameter(file,"allowMovementWithMouseYAxis ",allowMovementWithMouseYAxis);
// Write out UseJump
SafeWriteString(file,"\n;\n");
--- a/rott/rt_menu.c
+++ b/rott/rt_menu.c
@@ -754,6 +754,7 @@
{
"MOUSELOOK",
"INVERSE MOUSE",
+ "ALLOW Y AXIS MOUSE",
"CROSS HAIR",
"JUMPING",
"FULLSCREEN",
@@ -776,7 +777,7 @@
CP_iteminfo VisualOptionsItems = { 20, MENU_Y, 1, 0, 43, VisualOptionsNames, mn_largefont };
-CP_iteminfo ExtOptionsItems = { 20, MENU_Y, 7, 0, 43, ExtOptionsNames, mn_largefont };
+CP_iteminfo ExtOptionsItems = { 20, MENU_Y, 8, 0, 43, ExtOptionsNames, mn_largefont };
CP_iteminfo ExtGameOptionsItems = { 20, MENU_Y, 4, 0, 43, ExtGameOptionsNames, mn_largefont }; //LT added
@@ -789,6 +790,7 @@
{
{1, "", 'M', NULL},
{1, "", 'I', NULL},
+ {1, "", 'D', NULL},
{1, "", 'C', NULL},
{1, "", 'J', NULL},
{1, "", 'F', NULL},
@@ -5437,6 +5439,7 @@
extern boolean sdl_fullscreen;
extern boolean autoAimMissileWeps;
extern boolean autoAim;
+extern boolean allowMovementWithMouseYAxis;
void CP_ExtOptionsMenu (void)
{
@@ -5463,14 +5466,18 @@
DrawExtOptionsButtons ();
break;
case 2:
- iG_aimCross ^= 1;
+ allowMovementWithMouseYAxis ^= 1;
DrawExtOptionsButtons ();
break;
case 3:
- usejump ^= 1;
+ iG_aimCross ^= 1;
DrawExtOptionsButtons ();
break;
case 4:
+ usejump ^= 1;
+ DrawExtOptionsButtons ();
+ break;
+ case 5:
if (SDL_WM_ToggleFullScreen(SDL_GetVideoSurface()))
{
sdl_fullscreen ^= 1;
@@ -5477,11 +5484,11 @@
DrawExtOptionsButtons ();
}
break;
- case 5:
+ case 6:
autoAimMissileWeps ^= 1;
DrawExtOptionsButtons();
break;
- case 6:
+ case 7:
autoAim ^= 1;
DrawExtOptionsButtons();
break;
@@ -5520,18 +5527,21 @@
if (inverse_mouse == -1)on = 1;
break;
case 2:
- if (iG_aimCross == 1) on = 1;
+ if (allowMovementWithMouseYAxis == 1) on = 1;
break;
case 3:
- if (usejump == 1) on = 1;
+ if (iG_aimCross == 1) on = 1;
break;
case 4:
- if (sdl_fullscreen== 1) on = 1;
+ if (usejump == 1) on = 1;
break;
case 5:
- if (autoAimMissileWeps == 1) on = 1;
+ if (sdl_fullscreen== 1) on = 1;
break;
case 6:
+ if (autoAimMissileWeps == 1) on = 1;
+ break;
+ case 7:
if (autoAim == 1) on = 1;
break;
}
--- a/rott/rt_playr.c
+++ b/rott/rt_playr.c
@@ -2480,6 +2480,8 @@
//******************************************************************************
boolean aimbuttonpressed=false;
+extern boolean allowMovementWithMouseYAxis;
+
void PollMove (void)
{
int angle;
@@ -2487,6 +2489,7 @@
x = KX + MX + JX + CX + VX;
+
y = KY + MY + JY + CY + VY;
if (buttonpoll[bt_aimbutton])
@@ -2512,6 +2515,11 @@
else
{
aimbuttonpressed=false;
+ }
+
+ if (!allowMovementWithMouseYAxis)
+ {
+ y = KY + JY + CY + VY;
}
if (player->flags & FL_FLEET)