skybox: added moon and stars

This commit is contained in:
MihailRis
2024-01-26 02:49:42 +03:00
parent b42a517cc6
commit a4a5aef422
22 changed files with 258 additions and 52 deletions
+3 -3
View File
@@ -125,9 +125,9 @@ void BlocksController::randomTick(int tickid, int parts) {
continue;
for (int s = 0; s < segments; s++) {
for (int i = 0; i < 4; i++) {
int bx = fastmaths::rand() % CHUNK_W;
int by = fastmaths::rand() % segheight + s * segheight;
int bz = fastmaths::rand() % CHUNK_D;
int bx = random.rand() % CHUNK_W;
int by = random.rand() % segheight + s * segheight;
int bz = random.rand() % CHUNK_D;
const voxel& vox = chunk->voxels[(by * CHUNK_D + bz) * CHUNK_W + bx];
Block* block = indices->getBlockDef(vox.id);
if (block->rt.funcsset.randupdate) {
+2
View File
@@ -2,6 +2,7 @@
#define LOGIC_BLOCKS_CONTROLLER_H_
#include "../typedefs.h"
#include "../maths/fastmaths.h"
class Player;
class Block;
@@ -33,6 +34,7 @@ class BlocksController {
Clock randTickClock;
Clock blocksTickClock;
uint padding;
FastRandom random;
public:
BlocksController(Level* level, uint padding);