Fix crash after entering a minecart not on rails

This commit is contained in:
teknomunk 2024-04-16 20:06:08 +00:00
parent 16199ea6e5
commit 4cfd60b7bb
1 changed files with 1 additions and 1 deletions

View File

@ -248,7 +248,7 @@ function DEFAULT_CART_DEF:on_step(dtime)
end
-- Give achievement when player reached a distance of 1000 nodes from the start position
if vector.distance(self._start_pos, pos) >= 1000 then
if pos and vector.distance(self._start_pos, pos) >= 1000 then
awards.unlock(self._driver, "mcl:onARail")
end
end