mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-12-25 10:52:25 +01:00
Fix several "undeclared global" errors
This commit is contained in:
parent
fb3db5077c
commit
a7d429a017
@ -395,7 +395,7 @@ This function registers a arrow for mobs with the attack type shoot.
|
||||
(self, player)
|
||||
'hit_mob' a function that is called when the arrow hits a mob;
|
||||
this function should hurt the mob, the parameters are
|
||||
(self, player)
|
||||
(self, mob)
|
||||
'hit_node' a function that is called when the arrow hits a node, the
|
||||
parameters are (self, pos, node)
|
||||
'tail' when set to 1 adds a trail or tail to mob arrows
|
||||
|
@ -132,7 +132,7 @@ mobs:register_arrow(":mobs_mc:fireball", {
|
||||
|
||||
-- direct hit, no fire... just plenty of pain
|
||||
hit_player = function(self, player)
|
||||
minetest.sound_play("tnt_explode", {pos = pos, gain = 1.5, max_hear_distance = 16})
|
||||
minetest.sound_play("tnt_explode", {pos = player:get_pos(), gain = 1.5, max_hear_distance = 16})
|
||||
player:punch(self.object, 1.0, {
|
||||
full_punch_interval = 0.5,
|
||||
damage_groups = {fleshy = 8},
|
||||
@ -140,8 +140,8 @@ mobs:register_arrow(":mobs_mc:fireball", {
|
||||
|
||||
end,
|
||||
|
||||
hit_mob = function(self, player)
|
||||
minetest.sound_play("tnt_explode", {pos = pos, gain = 1.5,max_hear_distance = 16})
|
||||
hit_mob = function(self, mob)
|
||||
minetest.sound_play("tnt_explode", {pos = mob:get_pos(), gain = 1.5,max_hear_distance = 16})
|
||||
player:punch(self.object, 1.0, {
|
||||
full_punch_interval = 0.5,
|
||||
damage_groups = {fleshy = 8},
|
||||
|
@ -398,14 +398,13 @@ minetest.register_node("mcl_flowers:waterlily", {
|
||||
local idef = itemstack:get_definition()
|
||||
|
||||
if idef.sounds and idef.sounds.place then
|
||||
minetest.sound_play(idef.sounds.place, {pos=above, gain=1})
|
||||
minetest.sound_play(idef.sounds.place, {pos=pointed_thing.above, gain=1})
|
||||
end
|
||||
|
||||
if not minetest.settings:get_bool("creative_mode") then
|
||||
itemstack:take_item()
|
||||
end
|
||||
else
|
||||
minetest.chat_send_player(player_name, "Node is protected")
|
||||
minetest.record_protection_violation(pos, player_name)
|
||||
end
|
||||
end
|
||||
|
@ -1,5 +1,7 @@
|
||||
mcl_spawn = {}
|
||||
|
||||
local mg_name = minetest.get_mapgen_setting("mg_name")
|
||||
|
||||
-- Returns current spawn position of player.
|
||||
-- If player is nil or not a player, the default spawn point is returned.
|
||||
-- The second return value is true if spawn point is player-chosen,
|
||||
|
Loading…
Reference in New Issue
Block a user