Commit 3e9a039e authored by Humr Druhý's avatar Humr Druhý

Add a nil check for data at init.lua:237

parent d4013280
......@@ -234,10 +234,12 @@ function bike.on_activate(self, staticdata, dtime_s)
self.object:set_armor_groups({immortal = 1})
if staticdata ~= "" then
local data = minetest.deserialize(staticdata)
if data ~= nil then
self.v = data.v
self.color = data.color
self.alpha = data.alpha
self.object:set_properties({textures=default_tex(self.color, self.alpha)})
self.last_v = self.v
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment