summaryrefslogtreecommitdiffstats
path: root/src/RendererEntity.cpp
diff options
context:
space:
mode:
authorLaG1924 <12997935+LaG1924@users.noreply.github.com>2019-01-27 06:10:33 +0100
committerLaG1924 <12997935+LaG1924@users.noreply.github.com>2019-01-27 06:10:33 +0100
commite2479261c56c8d1a64b51ad4f084ad3c18505359 (patch)
tree5256688eaec174cebdcf873f5247ece28ec45b9c /src/RendererEntity.cpp
parentAdded slow GameState sync (diff)
downloadAltCraft-e2479261c56c8d1a64b51ad4f084ad3c18505359.tar
AltCraft-e2479261c56c8d1a64b51ad4f084ad3c18505359.tar.gz
AltCraft-e2479261c56c8d1a64b51ad4f084ad3c18505359.tar.bz2
AltCraft-e2479261c56c8d1a64b51ad4f084ad3c18505359.tar.lz
AltCraft-e2479261c56c8d1a64b51ad4f084ad3c18505359.tar.xz
AltCraft-e2479261c56c8d1a64b51ad4f084ad3c18505359.tar.zst
AltCraft-e2479261c56c8d1a64b51ad4f084ad3c18505359.zip
Diffstat (limited to '')
-rw-r--r--src/RendererEntity.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/RendererEntity.cpp b/src/RendererEntity.cpp
index fef7dbd..698c934 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) {
+void RendererEntity::Render(RenderState& renderState, World *world) {
glm::mat4 model = glm::mat4(1.0);
- Entity entity = GlobalState::GetGameState()->GetWorld().GetEntity(entityId);
+ 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));