Fix global variable warnings; push to 0.4.2

This commit is contained in:
Duane Robertson 2015-11-12 16:58:19 +01:00 committed by BlockMen
parent 44e66d661a
commit b8c8a2eb55
3 changed files with 8 additions and 8 deletions

View File

@ -1,6 +1,6 @@
Minetest mod "Pyramids"
=======================
version: 0.4.1 Beta
version: 0.4.2 Beta
License of source code and textures: WTFPL
------------------------------------------

View File

@ -134,7 +134,7 @@ minetest.register_on_generated(function(minp, maxp, seed)
if noise1 > 0.25 or noise1 < -0.26 then
local mpos = {x=math.random(minp.x,maxp.x), y=math.random(minp.y,maxp.y), z=math.random(minp.z,maxp.z)}
p2 = minetest.find_node_near(mpos, 25, {"default:desert_sand"})
local p2 = minetest.find_node_near(mpos, 25, {"default:desert_sand"})
while p2 == nil and cnt < 5 do
cnt = cnt+1
mpos = {x=math.random(minp.x,maxp.x), y=math.random(minp.y,maxp.y), z=math.random(minp.z,maxp.z)}

View File

@ -47,23 +47,23 @@ local ANIM_WALK_MINE = 5
local ANIM_MINE = 6
function hit(self)
prop = {
local prop = {
mesh = mummy_mesh,
textures = {"pyramids_mummy.png^pyramids_hit.png"},
}
self.object:set_properties(prop)
minetest.after(0.4, function()
prop = {textures = mummy_texture,}
local prop = {textures = mummy_texture,}
self.object:set_properties(prop)
end)
end
function mummy_update_visuals_def(self)
--local name = get_player_name()
visual = default_model_def
--visual = default_model_def
npc_anim = 0 -- Animation will be set further below immediately
--npc_sneak[name] = false
prop = {
local prop = {
mesh = mummy_mesh,
textures = mummy_texture,
--visual_size = {x=1, y=1, z=1},
@ -257,8 +257,8 @@ MUMMY_DEF.on_step = function(self, dtime)
for _,object in ipairs(minetest.env:get_objects_inside_radius(self.object:getpos(), 4)) do
if object:is_player() then
self.yawwer = false
NPC = self.object:getpos()
PLAYER = object:getpos()
local NPC = self.object:getpos()
local PLAYER = object:getpos()
self.vec = {x=PLAYER.x-NPC.x, y=PLAYER.y-NPC.y, z=PLAYER.z-NPC.z}
self.yaw = math.atan(self.vec.z/self.vec.x)+math.pi^2
if PLAYER.x > NPC.x then