mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-11 17:51:04 +00:00
Dont crash if facedir > 23
This commit is contained in:
parent
0d60bc55e4
commit
56b9377c1c
1 changed files with 5 additions and 4 deletions
|
@ -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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue