forked from mtcontrib/spears
Deprecate completely defaults.lua
This commit is contained in:
parent
ee21ce3826
commit
dd5c92c0bc
@ -3,9 +3,9 @@
|
||||
-- minetest.settings:set("spears_throw_speed", 13)
|
||||
--end
|
||||
|
||||
if minetest.settings:get("spears_drag_coeff") == nil then
|
||||
--[[ if minetest.settings:get("spears_drag_coeff") == nil then
|
||||
minetest.settings:set("spears_drag_coeff", 0.1)
|
||||
end
|
||||
end ]]
|
||||
|
||||
-- if minetest.settings:get("spears_node_cracky_limit") == nil then
|
||||
-- minetest.settings:set("spears_node_cracky_limit", 3)
|
||||
|
@ -131,7 +131,7 @@ function spears_set_entity(spear_type, base_damage, toughness)
|
||||
end
|
||||
else -- Get drag
|
||||
local viscosity = minetest.registered_nodes[node.name].liquid_viscosity
|
||||
local drag_coeff = tonumber(minetest.settings:get("spears_drag_coeff"))
|
||||
local drag_coeff = tonumber(minetest.settings:get("spears_drag_coeff") or 0.1)
|
||||
local drag = math.max(viscosity, drag_coeff)
|
||||
local acceleration = vector.multiply(velocity, -drag)
|
||||
acceleration.y = acceleration.y - 10 * ((7 - drag) / 7)
|
||||
|
Loading…
Reference in New Issue
Block a user