minor refact

This commit is contained in:
Onran 2024-02-25 14:05:48 +09:00 committed by GitHub
parent cce5bd59b4
commit d56c0be9bd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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){
Block* block = content->getIndices()->getBlockDef(id);
solverR->remove(x,y,z);
solverG->remove(x,y,z);
solverB->remove(x,y,z);
if (id == 0){
solverR->remove(x,y,z);
solverG->remove(x,y,z);
solverB->remove(x,y,z);
solverR->solve();
solverG->solve();
solverB->solve();
@ -178,9 +179,6 @@ void Lighting::onBlockSet(int x, int y, int z, blockid_t id){
solverB->solve();
solverS->solve();
} else {
solverR->remove(x,y,z);
solverG->remove(x,y,z);
solverB->remove(x,y,z);
if (!block->skyLightPassing){
solverS->remove(x,y,z);
for (int i = y-1; i >= 0; i--){