mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 16:45:20 +02:00
Dont crash if facedir > 23
This commit is contained in:
@@ -711,7 +711,8 @@ TileSpec getNodeTile(MapNode mn, v3s16 p, v3s16 dir, MeshMakeData *data)
|
|||||||
|
|
||||||
// Get rotation for things like chests
|
// Get rotation for things like chests
|
||||||
u8 facedir = mn.getFaceDir(ndef);
|
u8 facedir = mn.getFaceDir(ndef);
|
||||||
assert(facedir <= 23);
|
if (facedir > 23)
|
||||||
|
facedir = 0;
|
||||||
static const u16 dir_to_tile[24 * 16] =
|
static const u16 dir_to_tile[24 * 16] =
|
||||||
{
|
{
|
||||||
// 0 +X +Y +Z -Z -Y -X -> value=tile,rotation
|
// 0 +X +Y +Z -Z -Y -X -> value=tile,rotation
|
||||||
|
Reference in New Issue
Block a user