forked from Mineclonia/Mineclonia
add a burning animation fps setting
This commit is contained in:
parent
bfbc953b92
commit
0b7097cb28
|
@ -285,7 +285,7 @@ function mcl_burning.fire_entity_step(self, dtime)
|
|||
end
|
||||
|
||||
local animation_timer = self.animation_timer + dtime
|
||||
if animation_timer >= 0.015 then
|
||||
if animation_timer >= ( 1 / mcl_burning.animation_fps ) then
|
||||
animation_timer = 0
|
||||
local animation_frame = self.animation_frame + 1
|
||||
if animation_frame > mcl_burning.animation_frames - 1 then
|
||||
|
|
|
@ -2,7 +2,8 @@ local S = minetest.get_translator("mcl_burning")
|
|||
local modpath = minetest.get_modpath("mcl_burning")
|
||||
|
||||
mcl_burning = {
|
||||
animation_frames = tonumber(minetest.settings:get("fire_animation_frames")) or 8
|
||||
animation_frames = tonumber(minetest.settings:get("fire_animation_frames")) or 8,
|
||||
animation_fps = tonumber(minetest.settings:get("fire_animation_fps")) or 30
|
||||
}
|
||||
|
||||
dofile(modpath .. "/api.lua")
|
||||
|
|
|
@ -91,6 +91,11 @@ flame_sound (Flame sound) bool true
|
|||
# Form: Image height / Image width
|
||||
fire_animation_frames (Fire Animation Frames) int 8
|
||||
|
||||
# How long to wait between frames of the fire animation in frames per second.
|
||||
# A higher number means it looks better but also results in a lot of additional network traffic. A low single digit value is recommended for multiplayer.
|
||||
#(default: 30)
|
||||
fire_animation_fps (Fire Animation FPS) int 30 0 60
|
||||
|
||||
# Whether to animate chests when open / close
|
||||
animated_chests (Animated chests) bool true
|
||||
|
||||
|
|
Loading…
Reference in New Issue