summaryrefslogtreecommitdiffstats
path: root/src/RendererEntity.cpp
diff options
context:
space:
mode:
authorLaG1924 <12997935+LaG1924@users.noreply.github.com>2019-01-27 07:25:45 +0100
committerLaG1924 <12997935+LaG1924@users.noreply.github.com>2019-01-27 07:25:45 +0100
commit5f010b71415a7dc0337c67cac4666eacdf472751 (patch)
tree03b71ee15e3e2a98d94c236f03361846c28d2d9b /src/RendererEntity.cpp
parentGameState double-buffering (diff)
downloadAltCraft-5f010b71415a7dc0337c67cac4666eacdf472751.tar
AltCraft-5f010b71415a7dc0337c67cac4666eacdf472751.tar.gz
AltCraft-5f010b71415a7dc0337c67cac4666eacdf472751.tar.bz2
AltCraft-5f010b71415a7dc0337c67cac4666eacdf472751.tar.lz
AltCraft-5f010b71415a7dc0337c67cac4666eacdf472751.tar.xz
AltCraft-5f010b71415a7dc0337c67cac4666eacdf472751.tar.zst
AltCraft-5f010b71415a7dc0337c67cac4666eacdf472751.zip
Diffstat (limited to 'src/RendererEntity.cpp')
-rw-r--r--src/RendererEntity.cpp4
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));