summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/RendererWorld.cpp9
-rw-r--r--src/World.cpp2
2 files changed, 9 insertions, 2 deletions
diff --git a/src/RendererWorld.cpp b/src/RendererWorld.cpp
index ebb049d..b433609 100644
--- a/src/RendererWorld.cpp
+++ b/src/RendererWorld.cpp
@@ -293,7 +293,9 @@ void RendererWorld::Render(RenderState & renderState) {
glm::mat4 projView = projection * view;
//Render Entities
+#ifndef __APPLE__
glLineWidth(3.0);
+#endif
Shader *entityShader = AssetManager::GetAsset<AssetShader>("/altcraft/shaders/entity")->shader.get();
entityShader->Activate();
entityShader->SetUniform("projection", projection);
@@ -308,7 +310,9 @@ void RendererWorld::Render(RenderState & renderState) {
//Render selected block
Vector selectedBlock = GetGameState()->GetSelectionStatus().selectedBlock;
if (selectedBlock != Vector()) {
+#ifndef __APPLE__
glLineWidth(2.0f);
+#endif
{
glm::mat4 model = glm::mat4(1.0);
model = glm::translate(model, selectedBlock.glm());
@@ -325,7 +329,9 @@ void RendererWorld::Render(RenderState & renderState) {
const bool renderHit = false;
if (renderHit) {
VectorF hit = GetGameState()->GetSelectionStatus().raycastHit;
+#ifndef __APPLE__
glLineWidth(2.0f);
+#endif
{
glm::mat4 model;
model = glm::translate(model, hit.glm());
@@ -339,8 +345,9 @@ void RendererWorld::Render(RenderState & renderState) {
glDrawArrays(GL_LINE_STRIP, 0, 36);
}
}
-
+#ifndef __APPLE__
glLineWidth(1.0);
+#endif
glCheckError();
//Render sky
diff --git a/src/World.cpp b/src/World.cpp
index c3246dc..e5e3fe8 100644
--- a/src/World.cpp
+++ b/src/World.cpp
@@ -201,7 +201,7 @@ void World::UpdatePhysics(float delta) {
BlockId block = this->GetBlockId(Vector(x, y, z));
if (block.id == 0 || !GetBlockInfo(block).collides)
continue;
- AABB blockColl{ x,y,z,1.0,1.0,1.0 };
+ AABB blockColl{ (double)x,(double)y,(double)z,1.0,1.0,1.0 };
if (TestCollision(entityCollBox, blockColl)) {
return { true };
}