altmp / altv-issues

Issues and roadmap for alt:V project
93 stars 16 forks source link

Server-side objects filling pool #2032

Closed deluvas1911 closed 1 year ago

deluvas1911 commented 1 year ago

Description of the problem

Creating too many serverside objects at once flood the pool and crash the client

Reproduction steps

const {x, y, z} = player.pos;
for (let i = 0; i < 120; i++) {
   new alt.Object(3008087081, new alt.Vector3(x + 2, y, z - 0.9 + (i * 0.8)), alt.Vector3.zero);
}

Expected behaviour

Spawn only closest obj without killing the game

Additional context

No response

Operating system

Windows 11

Version

dev/15.0-dev691

Crashdump ID

05a38bb1-b566-4a89-abac-45ef15ef5833

Reproduction tested

deluvas1911 commented 1 year ago

Fixed with dev743