correct (?) code formatting

pull/107/head
Skirlez 5 years ago committed by GitHub
parent 9f211fddab
commit e591c5c018
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -161,8 +161,9 @@ if (gamepad_is_supported()) {
if (is_walkzone(xjoyx, xjoyy, 1)) walk_zone = 1;
if (is_past_deadzone(xjoyx, xjoyy, 1)) {
stickAngle = point_direction(0, 0, xjoyx, xjoyy)
if ((ctrl_Left == 0) && (ctrl_Right == 0) && (xjoyx < -(global.opxjoydz / 200))) && stickAngle > 112.5 && stickAngle < 247.5 {
stickAngle = point_direction(0, 0, xjoyx, xjoyy);
if ((ctrl_Left == 0) && (ctrl_Right == 0) && (xjoyx < -(global.opxjoydz / 200))) && (stickAngle > 112.5 && stickAngle < 247.5) {
ctrl_Left = -xjoyx;
global.controltype = 2;
}
@ -172,12 +173,12 @@ if (gamepad_is_supported()) {
global.controltype = 2;
}
if ((ctrl_Up == 0) && (ctrl_Down == 0) && (xjoyy < -(global.opxjoydz / 200))) && stickAngle <= 157.5 && stickAngle >= 22.5 {
if ((ctrl_Up == 0) && (ctrl_Down == 0) && (xjoyy < -(global.opxjoydz / 200))) && (stickAngle <= 157.5 && stickAngle >= 22.5) {
ctrl_Up = 1;
global.controltype = 2;
}
if ((ctrl_Up == 0) && (ctrl_Down == 0) && (xjoyy > (global.opxjoydz / 200))) && stickAngle > 202.5 && stickAngle < 337.5 {
if ((ctrl_Up == 0) && (ctrl_Down == 0) && (xjoyy > (global.opxjoydz / 200))) && (stickAngle > 202.5 && stickAngle < 337.5) {
ctrl_Down = 1;
global.controltype = 2;
}

Loading…
Cancel
Save