diff options
| author | untodesu <kirill@untode.su> | 2025-12-26 14:50:33 +0500 |
|---|---|---|
| committer | untodesu <kirill@untode.su> | 2025-12-26 14:50:33 +0500 |
| commit | 6c2abde5c99a236453b795abaa6d7d70105e31f7 (patch) | |
| tree | f085049b9615a7d03cca5de40adb6529d6c13e11 /src/game/client/world/voxel_anims.cc | |
| parent | f40d09cb8f712e87691af4912f3630d92d692779 (diff) | |
| download | voxelius-6c2abde5c99a236453b795abaa6d7d70105e31f7.tar.bz2 voxelius-6c2abde5c99a236453b795abaa6d7d70105e31f7.zip | |
Just a big Ctrl+H refactoring
Diffstat (limited to 'src/game/client/world/voxel_anims.cc')
| -rw-r--r-- | src/game/client/world/voxel_anims.cc | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/src/game/client/world/voxel_anims.cc b/src/game/client/world/voxel_anims.cc index 3d7cfd4..2286027 100644 --- a/src/game/client/world/voxel_anims.cc +++ b/src/game/client/world/voxel_anims.cc @@ -12,22 +12,21 @@ static config::Unsigned base_framerate(16U, 1U, 16U); -std::uint64_t world::voxel_anims::nextframe = 0U; -std::uint32_t world::voxel_anims::frame = 0U; +std::uint64_t voxel_anims::nextframe = 0U; +std::uint32_t voxel_anims::frame = 0U; -void world::voxel_anims::init(void) +void voxel_anims::init(void) { globals::client_config.add_value("voxel_anims.base_framerate", base_framerate); - world::voxel_anims::nextframe = 0U; - world::voxel_anims::frame = 0U; + voxel_anims::nextframe = 0U; + voxel_anims::frame = 0U; } -void world::voxel_anims::update(void) +void voxel_anims::update(void) { - if(globals::curtime >= world::voxel_anims::nextframe) { - world::voxel_anims::nextframe = globals::curtime - + static_cast<std::uint64_t>(1000000.0 / static_cast<float>(base_framerate.get_value())); - world::voxel_anims::frame += 1U; + if(globals::curtime >= voxel_anims::nextframe) { + voxel_anims::nextframe = globals::curtime + static_cast<std::uint64_t>(1000000.0 / static_cast<float>(base_framerate.get_value())); + voxel_anims::frame += 1U; } } |
