Item Entity: Add message to moveresult assertion (#9797)
authorrubenwardy <rw@rubenwardy.com>
Thu, 14 May 2020 15:54:17 +0000 (16:54 +0100)
committerGitHub <noreply@github.com>
Thu, 14 May 2020 15:54:17 +0000 (17:54 +0200)
builtin/game/item_entity.lua

index a85eba977b585608a0a30ce1c8a742b4435735ae..5d2cd7c76cce8762d59f5f722d711dc0eedafd8f 100644 (file)
@@ -200,7 +200,9 @@ core.register_entity(":__builtin:item", {
                        return -- Don't do anything
                end
 
-               assert(moveresult)
+               assert(moveresult,
+                       "Collision info missing, this is caused by an out-of-date/buggy mod or game")
+
                if not moveresult.collides then
                        -- future TODO: items should probably decelerate in air
                        return