Reported as bug on Alliedmodders discord by user magnat2645, if a plugin clones the entity factory handle with sourcemod's CloneHandle native and then deletes the original handle. Calling CEntityFactory.GetFactoryOfEntity will end up returning the now deleted and therefore invalid factory handle.
Rather than allowing the cloning of handles for entity factories, as it's still not clear how we want cross-plugin interaction to work, and because it would require a significant rewrite of the internal code base to allow us. I opt to fully restrict handle cloning for entity factories. Instead the constructor for entity factories has been edited like so
Reported as bug on Alliedmodders discord by user
magnat2645
, if a plugin clones the entity factory handle with sourcemod'sCloneHandle
native and then deletes the original handle. CallingCEntityFactory.GetFactoryOfEntity
will end up returning the now deleted and therefore invalid factory handle.Rather than allowing the cloning of handles for entity factories, as it's still not clear how we want cross-plugin interaction to work, and because it would require a significant rewrite of the internal code base to allow us. I opt to fully restrict handle cloning for entity factories. Instead the constructor for entity factories has been edited like so
This will allow plugins to allocate entity factories for other plugins.