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

Destroyed baseobject is handled incorrectly in raw emits #277

Open
1 task done
xxshady opened this issue Jun 19, 2023 · 2 comments
Open
1 task done

Destroyed baseobject is handled incorrectly in raw emits #277

xxshady opened this issue Jun 19, 2023 · 2 comments
Labels
type: bug Something isn't working

Comments

@xxshady
Copy link
Contributor

xxshady commented Jun 19, 2023

Description of the problem

Destroyed baseobject is passed incorrectly to listener of any script event when using raw emits. When using normal events destroyed baseobject is passed as null

Reproduction steps

  1. Execute this code on serverside when at least one player is connected:
alt.on('test', (obj) => {
    alt.log('obj:', obj, obj instanceof alt.Player, obj instanceof alt.Vehicle)
})

const veh = new alt.Vehicle("sultan2", 10000, 0, 0, 0, 0, 0)
alt.emitRaw('test', veh)
veh.destroy()

Server console output: obj: Player {} true false

Expected behaviour

/

Additional context

No response

Operating system

Windows 11

Version

15.0-dev266

Scope

server

Reproduction tested

  • I confirm that I have made sure that this issue is also present on the newest dev version
@xxshady xxshady added the type: bug Something isn't working label Jun 19, 2023
@LeonMrBonnie
Copy link
Contributor

With the rework of the entity ID system in v15 this won't happen anymore, so no point in fixing it

@LeonMrBonnie
Copy link
Contributor

Nvm, the opposite is true actually, the reworked ID system broke it. But it's an easy fix, the raw emit buffer just needs to send ID and type of the sent object instead of only the ID as previously done.

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

No branches or pull requests

2 participants