Fix compatibility with other mob mods
This commit is contained in:
parent
26beddca61
commit
70bbdb4fa2
1 changed files with 6 additions and 6 deletions
12
shooter.lua
12
shooter.lua
|
@ -46,11 +46,6 @@ if singleplayer then
|
||||||
SHOOTER_ALLOW_PLAYERS = false
|
SHOOTER_ALLOW_PLAYERS = false
|
||||||
end
|
end
|
||||||
|
|
||||||
local allowed_entities = {}
|
|
||||||
for _,v in ipairs(SHOOTER_ENTITIES) do
|
|
||||||
allowed_entities[v] = 1
|
|
||||||
end
|
|
||||||
|
|
||||||
local modpath = minetest.get_modpath(minetest.get_current_modname())
|
local modpath = minetest.get_modpath(minetest.get_current_modname())
|
||||||
local input = io.open(modpath.."/shooter.conf", "r")
|
local input = io.open(modpath.."/shooter.conf", "r")
|
||||||
if input then
|
if input then
|
||||||
|
@ -59,6 +54,11 @@ if input then
|
||||||
input = nil
|
input = nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local allowed_entities = {}
|
||||||
|
for _,v in ipairs(SHOOTER_ENTITIES) do
|
||||||
|
allowed_entities[v] = 1
|
||||||
|
end
|
||||||
|
|
||||||
local function get_dot_product(v1, v2)
|
local function get_dot_product(v1, v2)
|
||||||
return v1.x * v2.x + v1.y * v2.y + v1.z * v2.z
|
return v1.x * v2.x + v1.y * v2.y + v1.z * v2.z
|
||||||
end
|
end
|
||||||
|
@ -319,7 +319,7 @@ function shooter:load_objects()
|
||||||
name = ref.name,
|
name = ref.name,
|
||||||
object = ref.object,
|
object = ref.object,
|
||||||
pos = pos,
|
pos = pos,
|
||||||
collisionbox = def.collisionbox,
|
collisionbox = def.collisionbox or {0,0,0, 0,0,0},
|
||||||
offset = SHOOTER_ENTITY_OFFSET,
|
offset = SHOOTER_ENTITY_OFFSET,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue