mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2025-01-06 08:37:30 +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
|
||||
|
||||
-- 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")
|
||||
self.object:remove()
|
||||
self._removed = true
|
||||
|
Loading…
Reference in New Issue
Block a user