altv-js-module icon indicating copy to clipboard operation
altv-js-module copied to clipboard

`alt.LocalObject.all` contains nulls after resource restart

Open xxshady opened this issue 2 years ago • 2 comments

Description of the problem

alt.LocalObject.all getter returns array with nulls (non-destroyed objects before resource was stopped) after resource restart

изображение

old image, alt.LocalObject was named alt.Object before

Reproduction steps

  1. Execute this code
new alt.LocalObject(
  'stt_prop_stunt_soccer_ball',
  new alt.Vector3(0, 7, 72),
  alt.Vector3.zero,
)
alt.log('alt.LocalObject.all:', alt.LocalObject.all)
  1. Restart resource

Expected behaviour

Objects should be removed from alt.LocalObject.all array after resource restart

Additional context

No response

Operating system

Windows 11

Version

15.0-dev291

Scope

client

Reproduction tested

  • [X] I confirm that I have made sure that this issue is also present on the newest dev version

xxshady avatar Jul 01 '23 22:07 xxshady

can't reproduce on latest dev using the following code:

new alt.Object('stt_prop_stunt_soccer_ball', new alt.Vector3(0, 7, 72), alt.Vector3.zero)
alt.log('alt.Object.all:', alt.Object.all.map((o) => o instanceof alt.Object))

xLuxy avatar Dec 30 '23 10:12 xLuxy

before release of v15 alt.LocalObject was named alt.Object

xxshady avatar Dec 30 '23 15:12 xxshady

@xLuxy is it fixed?

xxshady avatar Jul 30 '24 14:07 xxshady

Read my message above.

xshady @.***> schrieb am Di., 30. Juli 2024, 16:49:

@xLuxy https://github.com/xLuxy is it fixed?

— Reply to this email directly, view it on GitHub https://github.com/altmp/altv-js-module/issues/281#issuecomment-2258541177, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQAFNNPXGNYHY7INFX3HAYLZO6RWJAVCNFSM6AAAAABLWI6DCSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENJYGU2DCMJXG4 . You are receiving this because you were mentioned.Message ID: @.***>

xLuxy avatar Jul 30 '24 15:07 xLuxy

@xLuxy did you read my message that followed yours? xd

xxshady avatar Jul 30 '24 18:07 xxshady

before release of v15 alt.LocalObject was named alt.Object

on your screenshot its alt.Object, this issue is about alt.LocalObject

xxshady avatar Jul 30 '24 18:07 xxshady