1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2024-12-24 01:30:38 +01:00

revert wrong merge

This commit is contained in:
crabman77 2015-07-16 00:31:19 +02:00
parent 744ccb7bee
commit e4479b4343
2 changed files with 4 additions and 11 deletions

View File

@ -1418,13 +1418,13 @@ function entity_physics(pos, radius, self) --/MFF (Crabman|06/23/2015)add self t
for _, obj in pairs(objs) do
obj_pos = obj:getpos()
obj_vel = obj:getvelocity()
dist = math.max(1, vector.distance(pos, obj_pos))
--dist = math.max(1, vector.distance(pos, obj_pos))
if obj_vel ~= nil then
obj:setvelocity(calc_velocity(pos, obj_pos, obj_vel, radius * 10))
end
local damage = (4 / dist) * radius
--local damage = (4 / dist) * radius
obj:punch(self.object, 1.0,{full_punch_interval=1.0, damage_groups = {fleshy=self.damage} })--/MFF (Crabman|06/23/2015) use punch
obj:set_hp(obj:get_hp() - damage)
--obj:set_hp(obj:get_hp() - damage)
end
end

View File

@ -108,13 +108,6 @@ mobs:register_mob("mobs:npc", {
self.owner = clicker:get_player_name()
end
end
-- pick up npc
elseif item:get_name() == "mobs:magic_lasso"
and clicker:is_player()
and clicker:get_inventory()
and self.child == false
and clicker:get_inventory():room_for_item("main", "mobs:npc") then
else
-- if owner switch between follow and stand
if self.owner and self.owner == clicker:get_player_name() then
@ -134,4 +127,4 @@ mobs:register_mob("mobs:npc", {
-- spawning enable for now
mobs:register_spawn("mobs:npc", {"default:dirt_with_grass", "default:dirt", "default:junglegrass", "default:sand"}, 20, -1, 50000, 1, 31000)
-- register spawn egg
mobs:register_egg("mobs:npc", "Npc", "default_brick.png", 1)
mobs:register_egg("mobs:npc", "Npc", "default_brick.png", 1)