Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
illuna-minetest
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
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
illuna-minetest
Commits
56b9377c
Commit
56b9377c
authored
11 years ago
by
PilzAdam
Browse files
Options
Downloads
Patches
Plain Diff
Dont crash if facedir > 23
parent
0d60bc55
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/mapblock_mesh.cpp
+5
-4
5 additions, 4 deletions
src/mapblock_mesh.cpp
with
5 additions
and
4 deletions
src/mapblock_mesh.cpp
+
5
−
4
View file @
56b9377c
...
@@ -711,7 +711,8 @@ TileSpec getNodeTile(MapNode mn, v3s16 p, v3s16 dir, MeshMakeData *data)
...
@@ -711,7 +711,8 @@ TileSpec getNodeTile(MapNode mn, v3s16 p, v3s16 dir, MeshMakeData *data)
// Get rotation for things like chests
// Get rotation for things like chests
u8
facedir
=
mn
.
getFaceDir
(
ndef
);
u8
facedir
=
mn
.
getFaceDir
(
ndef
);
assert
(
facedir
<=
23
);
if
(
facedir
>
23
)
facedir
=
0
;
static
const
u16
dir_to_tile
[
24
*
16
]
=
static
const
u16
dir_to_tile
[
24
*
16
]
=
{
{
// 0 +X +Y +Z -Z -Y -X -> value=tile,rotation
// 0 +X +Y +Z -Z -Y -X -> value=tile,rotation
...
@@ -734,17 +735,17 @@ TileSpec getNodeTile(MapNode mn, v3s16 p, v3s16 dir, MeshMakeData *data)
...
@@ -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
2
,
0
,
2
,
2
,
2
,
// rotate around y- 20 - 23
0
,
0
,
3
,
2
,
1
,
2
,
4
,
2
,
0
,
0
,
5
,
2
,
0
,
2
,
2
,
2
,
// rotate around y- 20 - 23
0
,
0
,
5
,
2
,
1
,
3
,
3
,
2
,
0
,
0
,
2
,
2
,
0
,
1
,
4
,
2
,
0
,
0
,
5
,
2
,
1
,
3
,
3
,
2
,
0
,
0
,
2
,
2
,
0
,
1
,
4
,
2
,
0
,
0
,
2
,
2
,
1
,
0
,
5
,
2
,
0
,
0
,
4
,
2
,
0
,
0
,
3
,
2
,
0
,
0
,
2
,
2
,
1
,
0
,
5
,
2
,
0
,
0
,
4
,
2
,
0
,
0
,
3
,
2
,
0
,
0
,
4
,
2
,
1
,
1
,
2
,
2
,
0
,
0
,
3
,
2
,
0
,
3
,
5
,
2
0
,
0
,
4
,
2
,
1
,
1
,
2
,
2
,
0
,
0
,
3
,
2
,
0
,
3
,
5
,
2
};
};
u16
tile_index
=
facedir
*
16
+
dir_i
;
u16
tile_index
=
facedir
*
16
+
dir_i
;
TileSpec
spec
=
getNodeTileN
(
mn
,
p
,
dir_to_tile
[
tile_index
],
data
);
TileSpec
spec
=
getNodeTileN
(
mn
,
p
,
dir_to_tile
[
tile_index
],
data
);
...
...
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