]> git.localhorst.tv Git - blank.git/blobdiff - src/world/Entity.cpp
randomly spawn entities around the player
[blank.git] / src / world / Entity.cpp
index 79a09ea771cb6e9fbcd653bb7ab3f416e032cd67..49ad34bf07ef51c8eaaa5f99c64d89e6ab430827 100644 (file)
@@ -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) {