mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
add 'entity.despawn' command
This commit is contained in:
parent
c9958c9718
commit
41a22938d6
8 changed files with 41 additions and 5 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue