All entities now have GID
This commit is contained in:
parent
eb097588ba
commit
2be2e9f5e3
9 changed files with 59 additions and 11 deletions
|
|
@ -1,8 +1,10 @@
|
|||
#include "dpoint_entity.h"
|
||||
|
||||
|
||||
entity_id dpoint_entity::__global_id = 0;
|
||||
|
||||
dpoint_entity::dpoint_entity() {
|
||||
this->_id += QRandomGenerator().generate64();
|
||||
this->_id = ++dpoint_entity::__global_id + QRandomGenerator().generate64();
|
||||
}
|
||||
|
||||
dpoint_entity::dpoint_entity(entity_id dispatcher_id, const QString &title) : _dispatcher_id(dispatcher_id), _title(title) {
|
||||
|
|
@ -83,3 +85,11 @@ void dpoint_entity::deserialize(QDataStream &input) {
|
|||
this->_storages[i].deserialize(input);
|
||||
}
|
||||
}
|
||||
|
||||
void dpoint_entity::preloadGlobalId(entity_id gid) {
|
||||
dpoint_entity::__global_id = gid;
|
||||
}
|
||||
|
||||
entity_id dpoint_entity::GID() {
|
||||
return dpoint_entity::__global_id;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue