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