Commit Graph

7 Commits

Author SHA1 Message Date
sfan5 bc4ab8b99e General code refactoring/improvements in server, treegen and connection 2024-03-20 16:37:32 +01:00
DS 1e316a9704
Don't use a reference for RaycastState::m_pointabilities (#14376) 2024-02-17 18:36:20 +01:00
cx384 5958714309
Tool specific pointing and blocking pointable type (#13992) 2024-01-22 18:27:08 +01:00
Lars Müller 077627181e
Allow rotating entity selectionboxes (#12379) 2022-10-30 16:53:14 +01:00
Loïc Blot 921151d97a C++ modernize: Pragma once (#6264)
* Migrate cpp headers to pragma once
2017-08-17 22:19:39 +02:00
Dániel Juhász 3caad3f3c9 Expose getPointedThing to Lua
This commit introduces Raycast, a Lua user object, which can be
used to perform a raycast on the map. The ray is continuable, so one can
also get hidden nodes (for example to see trough glass).
2017-07-07 22:28:23 +01:00
Dániel Juhász 3f8261830e Improve getPointedThing() (#4346)
* Improved getPointedThing()

The new algorithm checks every node exactly once.
Now the point and normal vector of the collision is also returned in the
PointedThing (currently they are not used outside of the function).
Now the CNodeDefManager keeps the union of all possible nodeboxes, so
the raycast won't miss any nodes. Also if there are only small
nodeboxes, getPointedThing() is exceptionally fast.
Also adds unit test for VoxelLineIterator.

* Cleanup, code move

This commit moves getPointedThing() and
Client::getSelectedActiveObject() to ClientEnvironment.
The map nodes now can decide which neighbors they are connecting to
(MapNode::getNeighbors()).
2017-01-04 19:18:40 +01:00