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
6b598f61
Commit
6b598f61
authored
12 years ago
by
Perttu Ahola
Browse files
Options
Downloads
Patches
Plain Diff
Add desynchronize_mapblock_texture_animation setting and improve minetest.conf.example a bit
parent
9e21204f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
minetest.conf.example
+7
-3
7 additions, 3 deletions
minetest.conf.example
src/defaultsettings.cpp
+1
-0
1 addition, 0 deletions
src/defaultsettings.cpp
src/mapblock_mesh.cpp
+10
-4
10 additions, 4 deletions
src/mapblock_mesh.cpp
with
18 additions
and
7 deletions
minetest.conf.example
+
7
−
3
View file @
6b598f61
...
...
@@ -52,7 +52,8 @@
# Some (temporary) keys for debugging
#keymap_print_debug_stacks = KEY_KEY_P
# The desired FPS
# Minimum FPS
# The amount of rendered stuff is dynamically set according to this
#wanted_fps = 30
# If FPS would go higher than this, limit it by sleeping
# (to not waste CPU power for no benefit)
...
...
@@ -117,6 +118,8 @@
# Sound settings
#enable_sound = true
#sound_volume = 0.7
# Whether node texture animations should be desynchronized per MapBlock
#desynchronize_mapblock_texture_animation = true
#
# Server stuff
...
...
@@ -144,8 +147,9 @@
#give_initial_stuff = false
# New users need to input this password
#default_password =
# Available privileges: build, teleport, settime, privs, shout
#default_privs = build, shout
# Available privileges: interact, shout, teleport, settime, privs, ...
# See /privs in game for a full list on your server and mod configuration.
#default_privs = interact, shout
# Whether players are shown to clients without any range limit
#unlimited_player_transfer_distance = true
# Whether to enable players killing each other
...
...
This diff is collapsed.
Click to expand it.
src/defaultsettings.cpp
+
1
−
0
View file @
6b598f61
...
...
@@ -103,6 +103,7 @@ void set_default_settings(Settings *settings)
settings
->
setDefault
(
"console_alpha"
,
"200"
);
settings
->
setDefault
(
"enable_sound"
,
"true"
);
settings
->
setDefault
(
"sound_volume"
,
"0.8"
);
settings
->
setDefault
(
"desynchronize_mapblock_texture_animation"
,
"true"
);
// Server stuff
// "map-dir" doesn't exist by default.
...
...
This diff is collapsed.
Click to expand it.
src/mapblock_mesh.cpp
+
10
−
4
View file @
6b598f61
...
...
@@ -28,6 +28,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include
"mesh.h"
#include
"content_mapblock.h"
#include
"noise.h"
#include
"settings.h"
/*
MeshMakeData
...
...
@@ -996,10 +997,15 @@ MapBlockMesh::MapBlockMesh(MeshMakeData *data):
// Add to MapBlockMesh in order to animate these tiles
m_animation_tiles
[
i
]
=
p
.
tile
;
m_animation_frames
[
i
]
=
0
;
// Get starting position from noise
m_animation_frame_offsets
[
i
]
=
100000
*
(
2.0
+
noise3d
(
data
->
m_blockpos
.
X
,
data
->
m_blockpos
.
Y
,
data
->
m_blockpos
.
Z
,
0
));
if
(
g_settings
->
getBool
(
"desynchronize_mapblock_texture_animation"
)){
// Get starting position from noise
m_animation_frame_offsets
[
i
]
=
100000
*
(
2.0
+
noise3d
(
data
->
m_blockpos
.
X
,
data
->
m_blockpos
.
Y
,
data
->
m_blockpos
.
Z
,
0
));
}
else
{
// Play all synchronized
m_animation_frame_offsets
[
i
]
=
0
;
}
// Replace tile texture with the first animation frame
std
::
ostringstream
os
(
std
::
ios
::
binary
);
os
<<
tsrc
->
getTextureName
(
p
.
tile
.
texture
.
id
);
...
...
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