add 'entity.despawn' command

This commit is contained in:
MihailRis
2024-07-17 07:35:02 +03:00
parent c9958c9718
commit 41a22938d6
8 changed files with 41 additions and 5 deletions
+8
View File
@@ -135,6 +135,10 @@ void Player::updateInput(PlayerInput& input, float delta) {
input.flight = false;
}
void Player::updateSelectedEntity() {
selectedEid = selection.entity;
}
void Player::postUpdate() {
auto entity = level->entities->get(eid);
if (!entity.has_value()) {
@@ -225,6 +229,10 @@ void Player::setEntity(entityid_t eid) {
this->eid = eid;
}
entityid_t Player::getSelectedEntity() const {
return selectedEid;
}
std::shared_ptr<Inventory> Player::getInventory() const {
return inventory;
}