move a line to correct behavior

This commit is contained in:
orwell96 2016-11-03 09:03:23 +01:00
parent 20a1171144
commit 31b579bc5c
2 changed files with 1 additions and 1 deletions

Binary file not shown.

View File

@ -100,7 +100,6 @@ function wagon:init_new_instance(train_id, properties)
self[k]=v self[k]=v
end end
end end
minetest.after(1, function() self:reattach_all() end)
self.initialized=true self.initialized=true
print("init_new_instance "..self.unique_id.." ("..self.train_id..")") print("init_new_instance "..self.unique_id.." ("..self.train_id..")")
return self.unique_id return self.unique_id
@ -121,6 +120,7 @@ function wagon:init_from_wagon_save(uid)
return return
end end
self.initialized=true self.initialized=true
minetest.after(1, function() self:reattach_all() end)
print("init_from_wagon_save "..self.unique_id.." ("..self.train_id..")") print("init_from_wagon_save "..self.unique_id.." ("..self.train_id..")")
advtrains.update_trainpart_properties(self.train_id) advtrains.update_trainpart_properties(self.train_id)
end end