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
667e130c
Commit
667e130c
authored
6 years ago
by
sofar
Committed by
Paramat
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Prevent crash if some mod inadvertently allowed doors to rotate
parent
1fa8180e
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/doors/init.lua
+8
-0
8 additions, 0 deletions
mods/doors/init.lua
with
8 additions
and
0 deletions
mods/doors/init.lua
+
8
−
0
View file @
667e130c
...
@@ -162,6 +162,14 @@ function _doors.door_toggle(pos, node, clicker)
...
@@ -162,6 +162,14 @@ function _doors.door_toggle(pos, node, clicker)
end
end
local
dir
=
node
.
param2
local
dir
=
node
.
param2
-- It's possible param2 is messed up, so, validate before using
-- the input data. This indicates something may have rotated
-- the door, even though that is not supported.
if
not
transform
[
state
+
1
]
or
not
transform
[
state
+
1
][
dir
+
1
]
then
return
false
end
if
state
%
2
==
0
then
if
state
%
2
==
0
then
minetest
.
sound_play
(
def
.
door
.
sounds
[
1
],
minetest
.
sound_play
(
def
.
door
.
sounds
[
1
],
{
pos
=
pos
,
gain
=
0
.
3
,
max_hear_distance
=
10
})
{
pos
=
pos
,
gain
=
0
.
3
,
max_hear_distance
=
10
})
...
...
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