summaryrefslogtreecommitdiffstats
path: root/src/World.hpp
diff options
context:
space:
mode:
authorLaG1924 <12997935+LaG1924@users.noreply.github.com>2018-02-06 12:47:21 +0100
committerLaG1924 <12997935+LaG1924@users.noreply.github.com>2018-02-06 17:35:33 +0100
commit695e3db5f9b24ad46d236a28f9896dc9e5a619f6 (patch)
tree40061610b81a88c17ae812f23967d00cf9b78a26 /src/World.hpp
parentAdded visualisation of selected block (diff)
downloadAltCraft-695e3db5f9b24ad46d236a28f9896dc9e5a619f6.tar
AltCraft-695e3db5f9b24ad46d236a28f9896dc9e5a619f6.tar.gz
AltCraft-695e3db5f9b24ad46d236a28f9896dc9e5a619f6.tar.bz2
AltCraft-695e3db5f9b24ad46d236a28f9896dc9e5a619f6.tar.lz
AltCraft-695e3db5f9b24ad46d236a28f9896dc9e5a619f6.tar.xz
AltCraft-695e3db5f9b24ad46d236a28f9896dc9e5a619f6.tar.zst
AltCraft-695e3db5f9b24ad46d236a28f9896dc9e5a619f6.zip
Diffstat (limited to 'src/World.hpp')
-rw-r--r--src/World.hpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/World.hpp b/src/World.hpp
index 50dfa31..2c80b31 100644
--- a/src/World.hpp
+++ b/src/World.hpp
@@ -19,6 +19,12 @@ class PacketMultiBlockChange;
class PacketUnloadChunk;
class StreamInput;
+struct RaycastResult {
+ bool isHit;
+ Vector hitBlock;
+ VectorF hitPos;
+};
+
class World {
int dimension = 0;
@@ -55,7 +61,7 @@ public:
const Section &GetSection(Vector sectionPos);
- Vector Raycast(glm::vec3 position, glm::vec3 direction, float &distance);
+ RaycastResult Raycast(glm::vec3 position, glm::vec3 direction);
void UpdatePhysics(float delta);