mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 02:51:49 +00:00
world-wide commit to ruin everything
This commit is contained in:
parent
fbce36a05c
commit
8a073e4e8a
57 changed files with 1433 additions and 958 deletions
|
|
@ -2,8 +2,7 @@
|
|||
#include "voxel.h"
|
||||
#include "../lighting/Lightmap.h"
|
||||
|
||||
|
||||
Chunk::Chunk(int xpos, int ypos, int zpos) : x(xpos), y(ypos), z(zpos){
|
||||
Chunk::Chunk(int xpos, int zpos) : x(xpos), z(zpos){
|
||||
voxels = new voxel[CHUNK_VOL];
|
||||
for (unsigned int i = 0; i < CHUNK_VOL; i++)
|
||||
voxels[i].id = 1;
|
||||
|
|
@ -30,7 +29,7 @@ bool Chunk::isEmpty(){
|
|||
}
|
||||
|
||||
Chunk* Chunk::clone() const {
|
||||
Chunk* other = new Chunk(x,y,z);
|
||||
Chunk* other = new Chunk(x,z);
|
||||
for (int i = 0; i < CHUNK_VOL; i++)
|
||||
other->voxels[i] = voxels[i];
|
||||
other->lightmap->set(lightmap);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue