blurite / rsprot

RSProt is an all-in-one networking package for RuneScape Private Servers, primarily targeted at the OldSchool scene.
MIT License
28 stars 7 forks source link

Info Object Pooling #24

Closed Z-Kris closed 1 month ago

Z-Kris commented 2 months ago

Right now, when an exception is thrown in any of the three info objects (player, npc, worldentity), the info object will be destroyed - meaning it should not be placed back into the pool. Right now, as it stands, servers can return these objects back into the pool and it is rather cumbersome to try and prevent it, although doable. As such, we should add a 'destroyed' property on all the info packets and ignore any requests to return it to the pool if the object has been marked as destroyed. The destruction must be propagated further to all the sub-components too, such as the avatars.