1
0
Fork 0

Merge pull request 'Improve crying obsidian visuals once more' (#2454) from crying_obby_particles_2 into master

Reviewed-on: MineClone2/MineClone2#2454
Reviewed-by: MysticTempest <mystictempest@noreply.git.minetest.land>
This commit is contained in:
cora 2022-07-18 20:24:26 +00:00
commit d45fc46d0e
1 changed files with 18 additions and 49 deletions

View File

@ -1702,41 +1702,14 @@ end
-- Obsidian crying
local crobby_psdef = {
amount = 1,
time = 0.9, --everything longer than 1 is a coord exploit
minvel = vector.new(0,-2,0),
maxvel = vector.new(0,-0.5,0),
minacc = vector.new(0,-10,0),
maxacc = vector.new(0,-8,0),
minexptime = 1,
maxexptime = 6,
minsize = 1.5,
maxsize = 2,
collisiondetection = true,
collision_removal = true,
object_collision = true,
vertical = true,
texture = "mcl_core_crying_obsidian_tear.png",
}
local crobby_psdef2 = {
amount = 1,
time = 0.9, --everything longer than 1 is a coord exploit
minvel = vector.new(0,-0.01,0),
maxvel = vector.new(0,-0.005,0),
minacc = vector.new(0,-0.1,0),
maxacc = vector.new(0,-0.01,0),
minexptime = 2,
maxexptime = 3,
minsize = 0.3,
maxsize = 0.6,
collisiondetection = true,
collision_removal = true,
object_collision = true,
vertical = true,
texture = "mcl_core_crying_obsidian_tear.png",
local crobby_particle = {
velocity = vector.new(0,0,0),
size = math.random(1.3,2.5),
texture = "mcl_core_crying_obsidian_tear.png",
collision_removal = false,
}
minetest.register_abm({
label = "Obsidian cries",
nodenames = {"mcl_core:crying_obsidian"},
@ -1744,22 +1717,18 @@ minetest.register_abm({
chance = 10,
action = function(pos, node)
minetest.after(math.random(0.1,1.5),function()
crobby_psdef.minpos = vector.offset(pos,-0.6,-0.51,-0.6)
crobby_psdef.maxpos = vector.offset(pos,0.6,0.51,0.6)
minetest.add_particlespawner(crobby_psdef)
crobby_psdef2.minpos = vector.offset(pos,-0.51,-0.51,-0.51)
crobby_psdef2.maxpos = vector.offset(pos,-0.5,0.51,-0.5)
minetest.add_particlespawner(crobby_psdef2)
crobby_psdef2.minpos = vector.offset(pos,0.51,-0.51,-0.51)
crobby_psdef2.maxpos = vector.offset(pos,0.5,0.51,-0.5)
minetest.add_particlespawner(crobby_psdef2)
crobby_psdef2.minpos = vector.offset(pos,0.51,-0.51,0.51)
crobby_psdef2.maxpos = vector.offset(pos,0.5,0.51,0.5)
minetest.add_particlespawner(crobby_psdef2)
crobby_psdef2.minpos = vector.offset(pos,-0.51,-0.51,0.51)
crobby_psdef2.maxpos = vector.offset(pos,-0.5,0.51,0.5)
minetest.add_particlespawner(crobby_psdef2)
local pt = table.copy(crobby_particle)
pt.acceleration = vector.new(0,0,0)
pt.collisiondetection = false
pt.expirationtime = math.random(0.5,1.5)
pt.pos = vector.offset(pos,math.random(-0.5,0.5),-0.51,math.random(-0.5,0.5))
minetest.add_particle(pt)
minetest.after(pt.expirationtime,function()
pt.acceleration = vector.new(0,-9,0)
pt.collisiondetection = true
pt.expirationtime = math.random(1.2,4.5)
minetest.add_particle(pt)
end)
end)
end
})