![]() |
vkmEngine 1.0.15
A C++ game engine · vkmengine.com
|
What the server's slots name on this end, so a client can make entities of its own. More...
#include <names.h>
Public Member Functions | |
| void | adoptWorld (const Scene &scene) |
| The world as it was loaded, before anything ran: every live entity names its slot. | |
| EntityId | find (const Scene &scene, uint32_t slot) const |
What the server's slot names here, if this end has it. | |
| bool | names (const Scene &scene, EntityId entity) const |
Whether a slot of the server's names entity here: if not, it is this end's own. | |
| EntityId | claim (Scene &scene, uint32_t slot) |
What the server's slot names here, made if this end has nothing for it yet. | |
| void | forget (Scene &scene, uint32_t slot) |
The server says slot is gone: destroy what it named here, and its subtree. | |
| void | endSession () |
| Forget what this session named; the world as loaded is kept for the next. | |
| void | sweepEnded (Scene &scene) |
Destroy what the session last ended had made, and their subtrees, if scene is still the world they were made in; a world replaced since keeps nothing of them. | |
| void | clear () |
| Forget everything, the world as loaded too: it has been replaced. | |
What the server's slots name on this end, so a client can make entities of its own.
A slot is an entity's name on the wire: the server's slot, always. The world both ends loaded is the same entities at the same slots, which adoptWorld records as each naming itself. Whatever the server names that this end has not heard of yet is made where there is room - at that same slot when it is free here, which is the common case and keeps the ends' slot order alike, and anywhere else when an entity of this end's own is standing in it. So an effect, a menu or a marker a client makes for itself is never written over by the server.
| void Vkm::Engine::NetNames::adoptWorld | ( | const Scene & | scene | ) |
The world as it was loaded, before anything ran: every live entity names its slot.
| scene | The world both ends loaded from one file, or built alike. |
What the server's slot names here, if this end has it.
| scene | The world it is in. |
| slot | The server's slot. |
What the server's slot names here, made if this end has nothing for it yet.
| scene | The world it goes in. |
| slot | The server's slot. |
| void Vkm::Engine::NetNames::forget | ( | Scene & | scene, |
| uint32_t | slot ) |
The server says slot is gone: destroy what it named here, and its subtree.
| scene | The world it is in. |
| slot | The server's slot. |
| void Vkm::Engine::NetNames::endSession | ( | ) |
Forget what this session named; the world as loaded is kept for the next.
What the session made is kept for sweepEnded to destroy: a session's entities leave with it, or a client joining again would find them standing in its slots and build the server's a second time beside them.
| void Vkm::Engine::NetNames::sweepEnded | ( | Scene & | scene | ) |
Destroy what the session last ended had made, and their subtrees, if scene is still the world they were made in; a world replaced since keeps nothing of them.
| scene | The world. |