Putting aside for a second that you need to define your own protocol and that Enet just takes care of pushing packages around:

Your AddEntity() method does not what you think it does, the pointer will not be transferred out of the function. You assign it a new value, but that's not visible to the caller. Either go with pointer to pointer, or better, return it as a return value.


Shitlord by trade and passion. Graphics programmer at Laminar Research.
I write blog posts at feresignum.com