From 8254af1179db18e2a71c34ab9b7090cda16f0f07 Mon Sep 17 00:00:00 2001 From: Andy Belle-Isle Date: Sun, 13 Nov 2022 14:17:29 -0600 Subject: Added crouch key * This allows players to move 2D to test collision --- src/world.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/world.cpp') diff --git a/src/world.cpp b/src/world.cpp index 48e54e3..517c88e 100644 --- a/src/world.cpp +++ b/src/world.cpp @@ -69,7 +69,7 @@ World::getSize() void World::generateMesh() { for (auto &l : drawLayers) { - + // Preallocate size of vertexes float Z = l->drawLayer; @@ -89,9 +89,9 @@ void World::generateMesh() 0 , 0+h, Z, to.x , to.y , tr}; glBindBuffer(GL_ARRAY_BUFFER, l->layerVBO); - glBufferData(GL_ARRAY_BUFFER, - 36 * sizeof(GLfloat), - mesh, + glBufferData(GL_ARRAY_BUFFER, + 36 * sizeof(GLfloat), + mesh, GL_STATIC_DRAW); meshAdd.push_back(WorldMeshUpdateEvent(l->layerVBO, @@ -192,7 +192,7 @@ glm::vec3 World::collide(glm::vec3 &start, glm::vec3 &end, Physics &phys) if (i == 0.0f) { std::cout << inter.size() << std::endl; if (inter.size()) { - p.standing = true; + // p.standing = true; } } -- cgit v1.2.3