mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2025-01-07 17:17:31 +01:00
Add guard to prevent crash and log when this happens
This commit is contained in:
parent
3cc8a8474d
commit
8118495c80
@ -294,7 +294,10 @@ function DEFAULT_CART_DEF:on_step(dtime)
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- Remove superceded entities
|
-- Remove superceded entities
|
||||||
if staticdata.seq and self._seq < staticdata.seq then
|
if staticdata.seq and (self._seq or -1) < staticdata.seq then
|
||||||
|
if not self._seq then
|
||||||
|
core.log("warning", "Removing minecart entity missing sequence number")
|
||||||
|
end
|
||||||
--print("removing cart #"..staticdata.uuid.." with sequence number mismatch")
|
--print("removing cart #"..staticdata.uuid.." with sequence number mismatch")
|
||||||
self.object:remove()
|
self.object:remove()
|
||||||
self._removed = true
|
self._removed = true
|
||||||
|
Loading…
Reference in New Issue
Block a user