Merge pull request #67 from MoNTE48/patch-2

Fix Bullet and Ute crash
This commit is contained in:
D00Med 2023-01-02 08:22:59 +10:00 committed by GitHub
commit dc4fa70887
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -199,6 +199,7 @@ minetest.register_entity("vehicles:bullet", {
minetest.after(10, function()
self.object:remove()
end)
if not self.launcher then return end
local objs = missile_bullet_hit_check(self, obj, pos)
if objs then
for _, obj in ipairs(objs) do
@ -578,6 +579,7 @@ minetest.register_entity("vehicles:ute", {
physical = true,
collisionbox = {-1.4, 0, -1.4, 1.4, 1, 1.4},
on_rightclick = function(self, clicker)
if not clicker then return end
if self.driver and clicker == self.driver then
vehicles.object_detach(self, clicker, {x=1, y=0, z=1})
elseif self.driver and clicker ~= self.driver and not self.rider then