1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Fix crash on handling wallmounted nodes with invalid param2 (#13487)

This commit is contained in:
savilli 2023-05-18 20:31:04 +02:00 committed by GitHub
parent 35112f2453
commit 5ba70cf5ef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 26 additions and 23 deletions

View file

@ -22,23 +22,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "irrlichttypes.h"
#include "irr_v3d.h"
extern const v3s16 g_6dirs[6];
extern const v3s16 g_7dirs[7];
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 v3s16 wallmounted_dirs[8];
extern const v3s16 facedir_dirs[32];
extern const v3s16 fourdir_dirs[4];
/// Direction in the 6D format. g_27dirs contains corresponding vectors.
/// Here P means Positive, N stands for Negative.
enum Direction6D {
@ -92,4 +75,22 @@ enum DirectionWallmounted {
DWM_XN,
DWM_ZP,
DWM_ZN,
DWM_COUNT,
};
extern const v3s16 g_6dirs[DWM_COUNT];
extern const v3s16 g_7dirs[7];
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 v3s16 wallmounted_dirs[8];
extern const v3s16 facedir_dirs[32];
extern const v3s16 fourdir_dirs[4];