Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Default item spawn bug #292

Open
hallowatcher opened this issue Apr 13, 2021 · 2 comments
Open

[BUG] Default item spawn bug #292

hallowatcher opened this issue Apr 13, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@hallowatcher
Copy link
Contributor

hallowatcher commented Apr 13, 2021

Describe the bug
If you move far enough away from a default item spawn, it will throw the following out of range exception:
image

To Reproduce
Steps to reproduce the behavior:

  1. Go to the wilderness
  2. Log out
  3. Log back in
  4. See error

Expected behavior
No error should be thrown

Desktop (please complete the following information):

  • OS: Windows 10

Here's a video of it happening, right on the chunk where it breaks:
Video

From what I dug up, it seems to be this calculation that is generating an out of range X and Y (outbound-packets.ts)
image

Maybe such items shouldn't spawn for the player instance when they are so far away?

@hallowatcher hallowatcher added the bug Something isn't working label Apr 13, 2021
@Jameskmonger
Copy link
Collaborator

Can confirm this is still an issue

@gruckion
Copy link
Contributor

gruckion commented Sep 7, 2022

In case anyone else is searching for this issue

[2] [2022-09-07T15:02:25.898Z] ERROR (5468 on Sigexs-MBP.broadband): The value of "value" is out of range. It must be >= 0 and <= 255. Received 583
[2]     RangeError: The value of "value" is out of range. It must be >= 0 and <= 255. Received 583
[2]         at new NodeError (node:internal/errors:371:5)
[2]         at writeU_Int8 (node:internal/buffer:738:11)
[2]         at Packet.writeUInt8 (node:internal/buffer:748:10)
[2]         at Packet.put (/Users/sigex/workdir/rsps/server/node_modules/@runejs/src/buffer/byte-buffer.ts:158:40)
[2]         at OutboundPacketHandler.updateReferencePosition (/Users/sigex/workdir/rsps/server/src/engine/net/outbound-packet-handler.ts:228:16)
[2]         at OutboundPacketHandler.setWorldItem (/Users/sigex/workdir/rsps/server/src/engine/net/outbound-packet-handler.ts:181:14)
[2]         at WorldInstance.spawnWorldItem (/Users/sigex/workdir/rsps/server/src/engine/world/instances.ts:132:39)
[2]         at forEach (/Users/sigex/workdir/rsps/server/src/engine/world/world.ts:370:30)
[2]         at Array.forEach (<anonymous>)
[2]         at World.spawnWorldItems (/Users/sigex/workdir/rsps/server/src/engine/world/world.ts:367:14)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants