Jump to content

Recommended Posts

Posted

is this a bug? Can someone explain what happened :D

When I press TAB I see my xp normally, but on the hud is reset

post-14299-0-89773800-1418327965_thumb.jpg

post-14299-0-12181900-1418327971_thumb.jpg

  • Leader
Posted

The ET authors probably didn't forsee xp-saving mods.  

Posted

Haha lst tome that happened to me was like 6years ago xD. Was banned from their servers after a while for another reason lol.

Posted

Not really a bug as much as a design feature. Can save memory by using a smaller container. The HUD exp is stored as a 16 bit integer. It'll reset every 216 or 65,535. If they would have used a 32 bit integer instead, it would reset at 232 or 4,294,967,295.

  • Leader
Posted

Not really a bug as much as a design feature. Can save memory by using a smaller container. The HUD exp is stored as a 16 bit integer. It'll reset every 216 or 65,535. If they would have used a 32 bit integer instead, it would reset at 232 or 4,294,967,295.

I figured something like that.  The mystery to me is why it shows negative numbers for a while after it overflows the 64k.  2s-complement won't explain it, else they would need 4 bytes to express the 64k.  I suspect that whatever operator they used to increment the number uses an intermediate variable of more than 2 bytes which it perhaps then reduces to 2 bytes BCD for display.  The overflow bit is taken to be a negative sign.  

  • Like 1

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.