ID:72507
 
Resolved
Fixed in 443
BYOND Version:442
Operating System:Windows XP Pro
Web Browser:Opera 9.64
Status: Resolved (443)

This issue has been resolved.
Descriptive Problem Summary:

When moving in the opposite direction of the pixel_x modified, if use 128, the last pixel offset will appear opposite of what it is.


Numbered Steps to Reproduce Problem:

Use code below, run move right (fine) then move left. The O will appear on the left side giving the appearence of O HELL instead of HELLO

Code Snippet (if applicable) to Reproduce Problem:

http://www.byond.com/members/Inuyashaisbest/files/ offset_src.zip

Expected Results:

....HELLO.. <begin moving left>
...HELLO...
..HELLO....
.HELLO.....<end moving>

Actual Results:

.O..HELL...<begin moving left>
O..HELL....
...HELL....
..HELL.....
.HELLO..... <end moving>


Does the problem occur:
Every time? Or how often? Everytime
In other games? Don't Know
In other user accounts?Don't Know
On other computers?Don't Know

When does the problem NOT occur?

When pixel_x is less than or equal to 105

Workarounds:
make the pixel difference smaller.
I don't think there's any bug here. The maximum positive value for pixel_x/y is 127 since it's a signed byte. A pixel offset set to 128 and appearing as -128 is actually expected behavior. If there's some issue happening to offsets in the -127 to 127 range, that I would consider a bug.

However I'm not sure I entirely follow your bug description. From what you said it sounds like you're seeing something that only happens while moving. If you're seeing erroneous behavior with pixel offsets in a valid range while moving, please clarify and I'll be happy to look into the problem. Otherwise if this is just a problem with the invalid +128 offset, then I can close this report.
It happens from 106-128, 105 is when it doesnt glitch., you can change the value and see
I can confirm this happens--even with 105 as an offset--while moving in certain cases. Apparently the code used to actually display the offsets is not properly accounting for this discrepancy. This is fixable.
The client will now use 2-byte pixel offsets internally so that large (but still valid) offsets will not be impacted by gliding, or by cases like an overlay with a pixel offset being tacked to an obj with a pixel offset. Note: The valid range of individual pixel_x/y values is still -128 to +127.