adjust mob count when using /clear_mobs

This commit is contained in:
tenplus1 2022-07-04 11:00:52 +01:00
parent 08dcdf382a
commit ce7c4c1449
1 changed files with 2 additions and 2 deletions

View File

@ -4871,7 +4871,7 @@ function mobs:alias_mob(old_name, new_name)
end
-- admin command to remove all monsters around players
-- admin command to remove untamed mobs around players
minetest.register_chatcommand("clear_mobs", {
params = "<text>",
description = "Remove untamed mobs from around players.",
@ -4898,7 +4898,7 @@ minetest.register_chatcommand("clear_mobs", {
-- only remove mobs redo mobs that are not tamed
if ent and ent._cmi_is_mob and ent.tamed ~= true then
obj:remove()
remove_mob(ent, true)
count = count + 1
end