forked from Mineclonia/Mineclonia
Merge branch 'master' into mod.conf
This commit is contained in:
commit
c1bed0a826
|
@ -0,0 +1,38 @@
|
|||
---
|
||||
|
||||
name: "Bug Report"
|
||||
about: "Use this for when something's broken."
|
||||
labels:
|
||||
- bug
|
||||
- unconfirmed
|
||||
|
||||
---
|
||||
|
||||
##### What happened?
|
||||
|
||||
<!-- Describe what's wrong. -->
|
||||
|
||||
##### What did I expect?
|
||||
|
||||
<!-- Describe what should be happening instead -->
|
||||
|
||||
##### How to get it to happen
|
||||
|
||||
<!--
|
||||
Write down exactly what you did to get the bug to happen
|
||||
If you need more steps, just keep adding numbers. If you
|
||||
don't need them all, delete the empty numbers.
|
||||
-->
|
||||
1.
|
||||
2.
|
||||
3.
|
||||
|
||||
##### Environment
|
||||
|
||||
Mineclonia Version: <!-- Paste the version of Mineclonia here, if you know it. -->
|
||||
|
||||
<!--
|
||||
Please refer to https://git.minetest.land/Mineclonia/Mineclonia/wiki/Reporting-Bugs
|
||||
if you need help finding your Minetest version.
|
||||
-->
|
||||
Minetest Version:
|
|
@ -0,0 +1,22 @@
|
|||
---
|
||||
|
||||
name: "Feature Request"
|
||||
about: "Mineclonia doesn't do something you need it to"
|
||||
labels:
|
||||
- "feature request"
|
||||
|
||||
---
|
||||
|
||||
##### Problem
|
||||
|
||||
<!--
|
||||
Describe what's wrong.
|
||||
|
||||
If you're reporting a missing feature from Minecraft,
|
||||
please include a link to the Minetest wiki or Mojang bug
|
||||
tracker entry describing that feature.
|
||||
-->
|
||||
|
||||
##### Solution
|
||||
|
||||
<!-- Write down an example of what you'd like to happen. -->
|
|
@ -0,0 +1,51 @@
|
|||
<!--
|
||||
Please include the main mod this PR affects in the title, including
|
||||
the leading directory. For example, if you have added a new
|
||||
type of banner to mcl_banners, the title should look like:
|
||||
|
||||
items/mcl_banners: add new banner type
|
||||
|
||||
-->
|
||||
##### Problem
|
||||
TRACKING ISSUE: #<!-- Tracking issue number -->
|
||||
|
||||
<!--
|
||||
Describe WHAT problem this pull request solves.
|
||||
If the tracking issue includes all the needed
|
||||
information, you can leave this section empty.
|
||||
-->
|
||||
|
||||
##### Solution
|
||||
|
||||
<!-- Describe HOW this pull request solves its problem. -->
|
||||
|
||||
##### Details
|
||||
|
||||
<!-- Include any additional information here. -->
|
||||
|
||||
##### Testing Steps
|
||||
|
||||
<!--
|
||||
Write how we can verify this patch addresses its problem.
|
||||
If you need more steps, just keep adding numbers. If you
|
||||
don't need them all, delete the empty numbers.
|
||||
-->
|
||||
1.
|
||||
2.
|
||||
3.
|
||||
|
||||
<!--
|
||||
If your pull request still needs work, uncomment the
|
||||
following section and include a list of things that
|
||||
need to be done before it's ready for us to look at.
|
||||
|
||||
Please remember to put WIP: in front of the title as well.
|
||||
-->
|
||||
|
||||
<!--
|
||||
##### To do
|
||||
|
||||
- [ ] Item 1
|
||||
- [ ] Item 2
|
||||
- [ ] Item 3
|
||||
-->
|
|
@ -57,46 +57,44 @@ local function compute_sphere_rays(radius)
|
|||
local rays = {}
|
||||
local sphere = {}
|
||||
|
||||
for i=1, 2 do
|
||||
local function add_ray(pos)
|
||||
sphere[minetest.hash_node_position(pos)] = pos
|
||||
end
|
||||
|
||||
for y = -radius, radius do
|
||||
for z = -radius, radius do
|
||||
for x = -radius, 0 do
|
||||
local d = x * x + y * y + z * z
|
||||
if d <= radius * radius then
|
||||
add_ray(vector.new(x, y, z))
|
||||
add_ray(vector.new(-x, y, z))
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
for x = -radius, radius do
|
||||
for z = -radius, radius do
|
||||
for y = -radius, 0 do
|
||||
local d = x * x + y * y + z * z
|
||||
if d <= radius * radius then
|
||||
add_ray(vector.new(x, y, z))
|
||||
add_ray(vector.new(x, -y, z))
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
for x = -radius, radius do
|
||||
for y = -radius, radius do
|
||||
for z = -radius, radius do
|
||||
for x = -radius, 0, 1 do
|
||||
local d = x * x + y * y + z * z
|
||||
if d <= radius * radius then
|
||||
local pos = { x = x, y = y, z = z }
|
||||
sphere[minetest.hash_node_position(pos)] = pos
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
for i=1,2 do
|
||||
for x = -radius, radius do
|
||||
for z = -radius, radius do
|
||||
for y = -radius, 0, 1 do
|
||||
local d = x * x + y * y + z * z
|
||||
if d <= radius * radius then
|
||||
local pos = { x = x, y = y, z = z }
|
||||
sphere[minetest.hash_node_position(pos)] = pos
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
for i=1,2 do
|
||||
for x = -radius, radius do
|
||||
for y = -radius, radius do
|
||||
for z = -radius, 0, 1 do
|
||||
local d = x * x + y * y + z * z
|
||||
if d <= radius * radius then
|
||||
local pos = { x = x, y = y, z = z }
|
||||
sphere[minetest.hash_node_position(pos)] = pos
|
||||
break
|
||||
end
|
||||
for z = -radius, 0 do
|
||||
local d = x * x + y * y + z * z
|
||||
if d <= radius * radius then
|
||||
add_ray(vector.new(x, y, z))
|
||||
add_ray(vector.new(x, y, -z))
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -253,12 +251,12 @@ local function trace_explode(pos, strength, raydirs, radius, info, puncher)
|
|||
|
||||
if collisionbox then
|
||||
-- Create rays from random points in the collision box
|
||||
local x1 = collisionbox[1] * 2
|
||||
local y1 = collisionbox[2] * 2
|
||||
local z1 = collisionbox[3] * 2
|
||||
local x2 = collisionbox[4] * 2
|
||||
local y2 = collisionbox[5] * 2
|
||||
local z2 = collisionbox[6] * 2
|
||||
local x1 = collisionbox[1]
|
||||
local y1 = collisionbox[2]
|
||||
local z1 = collisionbox[3]
|
||||
local x2 = collisionbox[4]
|
||||
local y2 = collisionbox[5]
|
||||
local z2 = collisionbox[6]
|
||||
local x_len = math.abs(x2 - x1)
|
||||
local y_len = math.abs(y2 - y1)
|
||||
local z_len = math.abs(z2 - z1)
|
||||
|
|
Loading…
Reference in New Issue