ID:2633258
 
Not a bug
BYOND Version:513
Operating System:Windows 10 Home 64-bit
Web Browser:Chrome 86.0.4240.183
Applies to:Dream Seeker
Status: Not a bug

This is not a bug. It may be an incorrect use of syntax or a limitation in the software. For further discussion on the matter, please consult the BYOND forums.
Descriptive Problem Summary:
Using Gamepad, left analog takes priority over right. When both are used at once, right stops responding and left experiences input delay.

Code Snippet (if applicable) to Reproduce Problem:
mob/Login()
winset(src, "RightAnMACRO","parent=macro;name=GamepadRightAnalog;command=\"TestRight \[\[x]] \[\[y]]\"")
winset(src, "LeftAnMACRO","parent=macro;name=GamepadLeftAnalog;command=\"TestLeft \[\[x]] \[\[y]]\"")
..()


mob/verb/TestRight(x as num, y as num)
src<<"[x],[y]"

mob/verb/TestLeft(x as num, y as num)
var/ang = Angle(x,y)
var/sx=cos(ang)*8
var/sy=sin(ang)*8
if(sx>0)
step(src,EAST,sx)
else
step(src,WEST,sx)
if(sy>0)
step(src,NORTH,sy)
else
step(src,SOUTH,sy)

proc/Angle(x,y)
var/dist = sqrt(x*x + y*y)
var/angle = arccos(x/dist)
if(y<0)
angle = abs(angle-360)
return angle


Expected Results:
Player should have the ability to move around the map, while also receiving outputs from right analog stick.

Actual Results:
When both analog sticks are used, right stops working after ten outputs, then the left analog begins to experience input delay (whether or not the right is still being used). Once both analogs are released, input delay no longer effects left analog.

The gamepad being used is an Xbox 360; MadCatz brand. I've tested with other software and it does not seem to be faulty.

Does the problem occur:
Every time? Or how often?: Every time.

Did the problem NOT occur in any earlier versions? If so, what was the last version that worked?

This is the first time I've dealt with gamepad systems; so I haven't a clue if the issue existed in earlier versions.

Work Around(EDIT)
After toying with my scripts a little, I found that removing and re-applying the macros on use resolves the issue (provided it's reapplied after a delay of 1). While this does resolve the issue, it is not entirely idea because there is a constant input delay.

Your verbs don't have set instant=1. It's very possible you're seeing the input queue in action.
In response to Lummox JR
Lummox JR wrote:
Your verbs don't have set instant=1. It's very possible you're seeing the input queue in action.

That's exactly what it was. My apologies for wasting your time.
No worries. Glad to know there wasn't a bug.
Nadrew resolved issue (Not a bug)