Entities improvement
This commit is contained in:
parent
19f223b474
commit
76ac624519
11 changed files with 39 additions and 27 deletions
|
|
@ -1,13 +1,13 @@
|
|||
#include "vessel_entity.h"
|
||||
|
||||
|
||||
unsigned long long vessel_entity::__global_id = 0;
|
||||
entity_id vessel_entity::__global_id = 0;
|
||||
|
||||
vessel_entity::vessel_entity(const dpoint_entity &harbor, unsigned int capacity) : _harbor(harbor), _capacity(capacity) {
|
||||
this->_id = ++vessel_entity::__global_id;
|
||||
}
|
||||
|
||||
unsigned long long vessel_entity::id() {
|
||||
entity_id vessel_entity::id() {
|
||||
return this->_id;
|
||||
}
|
||||
|
||||
|
|
@ -42,3 +42,7 @@ void vessel_entity::deserialize(QDataStream &input) {
|
|||
this->_cargo[i].deserialize(input);
|
||||
}
|
||||
}
|
||||
|
||||
void vessel_entity::preloadGlobalId(entity_id gid) {
|
||||
vessel_entity::__global_id = gid;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue