mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-13 06:51:51 +00:00
minor refact
This commit is contained in:
parent
cce5bd59b4
commit
d56c0be9bd
1 changed files with 4 additions and 6 deletions
|
|
@ -152,10 +152,11 @@ void Lighting::onChunkLoaded(int cx, int cz, bool expand){
|
||||||
|
|
||||||
void Lighting::onBlockSet(int x, int y, int z, blockid_t id){
|
void Lighting::onBlockSet(int x, int y, int z, blockid_t id){
|
||||||
Block* block = content->getIndices()->getBlockDef(id);
|
Block* block = content->getIndices()->getBlockDef(id);
|
||||||
|
solverR->remove(x,y,z);
|
||||||
|
solverG->remove(x,y,z);
|
||||||
|
solverB->remove(x,y,z);
|
||||||
|
|
||||||
if (id == 0){
|
if (id == 0){
|
||||||
solverR->remove(x,y,z);
|
|
||||||
solverG->remove(x,y,z);
|
|
||||||
solverB->remove(x,y,z);
|
|
||||||
solverR->solve();
|
solverR->solve();
|
||||||
solverG->solve();
|
solverG->solve();
|
||||||
solverB->solve();
|
solverB->solve();
|
||||||
|
|
@ -178,9 +179,6 @@ void Lighting::onBlockSet(int x, int y, int z, blockid_t id){
|
||||||
solverB->solve();
|
solverB->solve();
|
||||||
solverS->solve();
|
solverS->solve();
|
||||||
} else {
|
} else {
|
||||||
solverR->remove(x,y,z);
|
|
||||||
solverG->remove(x,y,z);
|
|
||||||
solverB->remove(x,y,z);
|
|
||||||
if (!block->skyLightPassing){
|
if (!block->skyLightPassing){
|
||||||
solverS->remove(x,y,z);
|
solverS->remove(x,y,z);
|
||||||
for (int i = y-1; i >= 0; i--){
|
for (int i = y-1; i >= 0; i--){
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue