Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
minetest_game
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Illuna-Minetest
minetest_game
Commits
aff9c28e
Unverified
Commit
aff9c28e
authored
2 years ago
by
VitaliyShar
Committed by
GitHub
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Improve stair placement rotation for bridging (#2979)
Co-authored-by:
sfan5
<
sfan5@live.de
>
parent
e903b1f6
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
mods/stairs/init.lua
+7
-1
7 additions, 1 deletion
mods/stairs/init.lua
with
7 additions
and
1 deletion
mods/stairs/init.lua
+
7
−
1
View file @
aff9c28e
...
...
@@ -32,7 +32,13 @@ local function rotate_and_place(itemstack, placer, pointed_thing)
if
placer
then
local
placer_pos
=
placer
:
get_pos
()
if
placer_pos
then
param2
=
minetest
.
dir_to_facedir
(
vector
.
subtract
(
p1
,
placer_pos
))
local
diff
=
vector
.
subtract
(
p1
,
placer_pos
)
param2
=
minetest
.
dir_to_facedir
(
diff
)
-- The player places a node on the side face of the node he is standing on
if
p0
.
y
==
p1
.
y
and
math.abs
(
diff
.
x
)
<=
0
.
5
and
math.abs
(
diff
.
z
)
<=
0
.
5
and
diff
.
y
<
0
then
-- reverse node direction
param2
=
(
param2
+
2
)
%
4
end
end
local
finepos
=
minetest
.
pointed_thing_to_face_pos
(
placer
,
pointed_thing
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment