mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Add rotation support for wallmounted nodes in 'ceiling' or 'floor' mode (#11073)
This commit is contained in:
parent
e7dd9737bd
commit
08ee6d8d4b
25 changed files with 375 additions and 33 deletions
|
@ -69,16 +69,22 @@ enum Direction6D {
|
|||
/// Direction in the wallmounted format.
|
||||
/// P is Positive, N is Negative.
|
||||
enum DirectionWallmounted {
|
||||
// The 6 wallmounted directions
|
||||
DWM_YP,
|
||||
DWM_YN,
|
||||
DWM_XP,
|
||||
DWM_XN,
|
||||
DWM_ZP,
|
||||
DWM_ZN,
|
||||
DWM_COUNT,
|
||||
// There are 6 wallmounted directions, but 8 possible states (3 bits).
|
||||
// So we have 2 additional states, which drawtypes might use for
|
||||
// special ("S") behavior.
|
||||
DWM_S1,
|
||||
DWM_S2,
|
||||
DWM_COUNT
|
||||
};
|
||||
|
||||
extern const v3s16 g_6dirs[DWM_COUNT];
|
||||
extern const v3s16 g_6dirs[6];
|
||||
|
||||
extern const v3s16 g_7dirs[7];
|
||||
|
||||
|
@ -87,9 +93,9 @@ extern const v3s16 g_26dirs[26];
|
|||
// 26th is (0,0,0)
|
||||
extern const v3s16 g_27dirs[27];
|
||||
|
||||
extern const u8 wallmounted_to_facedir[6];
|
||||
extern const u8 wallmounted_to_facedir[DWM_COUNT];
|
||||
|
||||
extern const v3s16 wallmounted_dirs[8];
|
||||
extern const v3s16 wallmounted_dirs[DWM_COUNT];
|
||||
|
||||
extern const v3s16 facedir_dirs[32];
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue