QuentinGruber / h1z1-server

Library used to emulate h1z1 game servers
https://h1emu.com
GNU General Public License v3.0
97 stars 56 forks source link

Clearing out treasure chest prop overtime #2236

Open Nikolassparrow opened 2 weeks ago

Nikolassparrow commented 2 weeks ago

Came back after a few months cause I heard skins were back. Something I noticed quickly though was that treasure chests were overfilled to the brim and caused extreme lag when using the chest at all, sometimes it was so laggy you couldn't even access the chest.

This PR is to fix that issue, was heavily tested to prevent items from being despawned unnecessarily. There's a 5 minute window for players to loot the treasure chest before it gets cleared. There's also checks to make sure no player is currently mounting during clearing and that worn letters to not be cleared (include crate rewards too?)

Nikolassparrow commented 7 hours ago

@QuentinGruber