ID:112045
 
Resolved
After moving an atom in a new diagonal direction with a 4-directional icon, moving in a cardinal direction would sometimes show the icon facing the wrong way. (E.g., moving NE, NW, then S might have the atom's icon facing W even while the atom itself moved S.)
BYOND Version:481
Operating System:Windows 7 Home Premium 64-bit
Web Browser:Chrome 10.0.648.205
Applies to:Dream Seeker
Status: Resolved (482)

This issue has been resolved.
Descriptive Problem Summary:
When I was running around my game, I pressed SOUTHWEST and SOUTH at the same time. It moved me to the SOUTHWEST tile and turned me WEST. ...but then, I released SOUTHWEST and held down south, and slid south without my mob's direction changing. It works with South + Southeast as well, but in all of my attempts it would not work with North + Northwest or Northeast.

Also I guess I should mention that I have nowhere in this project modified Move().

Numbered Steps to Reproduce Problem:
1. Press and hold South and Southwest at the same time.

2. Release Southwest.

3. SLIDE.

Code Snippet (if applicable) to Reproduce Problem:
n/a


Expected Results:
The mob turns south as he moves south.

Actual Results:
He continues facing the wrong direction but moves south.

Does the problem occur:
Every time? Or how often? If I press the keys at the exact same time it happens almost every time.
In other games? So far I've only seen it in things compiled with 481.
In other user accounts? Not tested.
On other computers? Not tested.

When does the problem NOT occur?
If the keys are not pressed and held at the same time.

Did the problem NOT occur in any earlier versions? If so, what was the last version that worked?
It never occured in 480 or 479 for me.

Workarounds:
Don't press and hold both keys at the exact same time.
I don't fully follow your report, especially the first part because the directions don't sound right; if you can break the description down step by step in excruciating detail that should help. Gliding did not change in 481 except for a divide-by-zero fix that would be completely unrelated to this, so if there is an issue here it was present in older versions.

I can see how something like this could happen if you had animate_movement changed to SLIDE_STEPS, but with normal movement where it snaps to the destination tile, I'm not sure what the cause would be. I'm having trouble finding a game that has an 8-dir icon to test this on so I guess I'll have to try to work up a demo on that myself, but it would also help if you could supply something.

[edit]
I couldn't reproduce this. I'll need a demo.
Right, I... probably completely worded that wrong I am not very good at explaining things.

I've put together a small demo (though it seems to occur in any project I have compiled in 481).

I also recorded a video demonstrating what I mean. Whenever I press South + Southeast or South + Southwest at relatively the same time, then release Southwest/Southeast depending on which one I had held, I move like that. I move south, but the mob's direction doesn't change.
Interesting. After some exhaustive debugging I found out the problem behind this was that the server and client both had different ideas of how to handle 4-directional icons. With your demo I was usually able to trigger the bug by moving northeast, then southwest, then south; holding down keys wasn't necessary after all.

Since the server's check on this appears to be outmoded and was probably meant at best to save a miniscule amount of bandwidth, I've just disabled that and the 4-dir behavior is now correct.