Workaround crash on clock rotation

This commit is contained in:
Serhiy Zahoriya 2019-12-24 06:01:02 +02:00
parent de915427ee
commit ee46d1a7d3
1 changed files with 3 additions and 0 deletions

View File

@ -114,6 +114,9 @@ local function get_orientation_values(node)
if ndef then
local paramtype2 = ndef.paramtype2
if paramtype2 == "wallmounted" or paramtype2 == "colorwallmounted" then
if (wallmounted_values[node.param2 % 8] == nil) then
return facedir_values[0]
end
return wallmounted_values[node.param2 % 8]
elseif paramtype2 == "facedir" or paramtype2 == "colorfacedir" then
return facedir_values[node.param2 % 32]