mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-09 04:51:49 +00:00
update world.raycast params & add blocks_exclusion parameter
This commit is contained in:
parent
00d6e28208
commit
605b0d63c3
3 changed files with 10 additions and 5 deletions
|
|
@ -287,7 +287,7 @@ static int l_world_raycast(lua::State* L) {
|
|||
entityRaycast.ignoredUid = lua::tointeger(L, -1);
|
||||
lua::pop(L);
|
||||
}
|
||||
if (lua::getfield(L, "ignore_entities")) {
|
||||
if (lua::getfield(L, "filter_entities")) {
|
||||
load_entities_filter(L, -1, filteredEntities);
|
||||
blocksRaycast.filter = &filteredEntities;
|
||||
lua::pop(L);
|
||||
|
|
@ -301,6 +301,10 @@ static int l_world_raycast(lua::State* L) {
|
|||
blocksRaycast.filter = &filteredBlocks;
|
||||
lua::pop(L);
|
||||
}
|
||||
if (lua::getfield(L, "blocks_exclusion")) {
|
||||
blocksRaycast.blocksFilterExcludeMode = lua::toboolean(L, -1);
|
||||
lua::pop(L);
|
||||
}
|
||||
if (lua::getfield(L, "nonselect_blocks", 1)) {
|
||||
blocksRaycast.includeNonSelectable = lua::toboolean(L, -1);
|
||||
lua::pop(L);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue