libblock.raycast: Add argument to specify blocks to ignore during ray casting
libentity.raycast: Add argument to specify blocks to ignore during ray casting Chunk::rayCast: Add argument to specify blocks to ignore during ray casting. On lua side filter blocks are passed as list of strings in form of "MOD:BLOCK_NAME" On C++ size filter blocks are std::set of blockid_t
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
|
||||
#include <glm/glm.hpp>
|
||||
#include <memory>
|
||||
#include <set>
|
||||
#include <vector>
|
||||
|
||||
#include "typedefs.hpp"
|
||||
@@ -93,7 +94,8 @@ public:
|
||||
float maxLength,
|
||||
glm::vec3& end,
|
||||
glm::ivec3& norm,
|
||||
glm::ivec3& iend
|
||||
glm::ivec3& iend,
|
||||
std::set<blockid_t> filter = {}
|
||||
);
|
||||
|
||||
glm::vec3 rayCastToObstacle(glm::vec3 start, glm::vec3 dir, float maxDist);
|
||||
|
||||
Reference in New Issue
Block a user