mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
fix extra lights-related work in world.set_chunk_data
This commit is contained in:
parent
b12982655d
commit
9c8e4e813c
2 changed files with 7 additions and 3 deletions
|
|
@ -4,6 +4,7 @@
|
|||
#include "typedefs.hpp"
|
||||
|
||||
#include <memory>
|
||||
#include <cstring>
|
||||
|
||||
inline constexpr int LIGHTMAP_DATA_LEN = CHUNK_VOL/2;
|
||||
|
||||
|
|
@ -17,6 +18,10 @@ public:
|
|||
|
||||
void set(const light_t* map);
|
||||
|
||||
void clear() {
|
||||
std::memset(map, 0, sizeof(map));
|
||||
}
|
||||
|
||||
inline unsigned short get(int x, int y, int z) const {
|
||||
return (map[y*CHUNK_D*CHUNK_W+z*CHUNK_W+x]);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue