X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fworld%2FEntity.cpp;h=49ad34bf07ef51c8eaaa5f99c64d89e6ab430827;hb=aefc5482b27e3d259b6c9f3f1e4cdd9ef2e6a8d2;hp=844f74bf5f7be7da0cb7d9545beb157bd9d1f1fe;hpb=c04ea5a6f67d446ea29aa2e88dc4c666956d7732;p=blank.git diff --git a/src/world/Entity.cpp b/src/world/Entity.cpp index 844f74b..49ad34b 100644 --- a/src/world/Entity.cpp +++ b/src/world/Entity.cpp @@ -7,7 +7,7 @@ namespace { -blank::Model::Buffer model_buffer; +blank::EntityModel::Buffer model_buffer; } @@ -23,7 +23,8 @@ Entity::Entity() noexcept , chunk(0, 0, 0) , angular_velocity(1.0f, 0.0f, 0.0f, 0.0f) , rotation(1.0f) -, world_collision(false) { +, world_collision(false) +, remove(false) { } @@ -45,6 +46,11 @@ void Entity::Velocity(const glm::vec3 &vel) noexcept { velocity = vel; } +void Entity::Position(const Chunk::Pos &c, const Block::Pos &pos) noexcept { + chunk = c; + position = pos; +} + void Entity::Position(const Block::Pos &pos) noexcept { position = pos; while (position.x >= Chunk::width) {