diff options
Diffstat (limited to '')
-rw-r--r-- | src/RendererEntity.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/RendererEntity.cpp b/src/RendererEntity.cpp index 698c934..25403be 100644 --- a/src/RendererEntity.cpp +++ b/src/RendererEntity.cpp @@ -123,9 +123,9 @@ RendererEntity::RendererEntity(unsigned int id) RendererEntity::~RendererEntity() { } -void RendererEntity::Render(RenderState& renderState, World *world) { +void RendererEntity::Render(RenderState& renderState, const World *world) { glm::mat4 model = glm::mat4(1.0); - Entity &entity = world->GetEntity(entityId); + const Entity &entity = world->GetEntity(entityId); model = glm::translate(model, entity.pos.glm()); model = glm::translate(model, glm::vec3(0, entity.height / 2.0, 0)); model = glm::scale(model, glm::vec3(entity.width, entity.height, entity.width)); |