From 49975d56081abb3a6d6641d4fd50d62903010217 Mon Sep 17 00:00:00 2001 From: tenplus1 Date: Mon, 29 Jun 2015 17:45:13 +0100 Subject: [PATCH] Fixed ability to take animal owned by another player bug --- api.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/api.lua b/api.lua index 2a37ef7..58eda45 100644 --- a/api.lua +++ b/api.lua @@ -1,4 +1,4 @@ --- Mobs Api (28th June 2015) +-- Mobs Api (29th June 2015) mobs = {} mobs.mod = "redo" @@ -1328,9 +1328,11 @@ function mobs:capture_mob(self, clicker, chance_hand, chance_net, chance_lasso, local name = clicker:get_player_name() if self.owner == "" and force_take == false then minetest.chat_send_player(name, "Not tamed!") + return -- cannot pick up if not owner elseif self.owner ~= name and force_take == false then minetest.chat_send_player(name, "Not owner!") + return end if clicker:get_inventory():room_for_item("main", mobname) then