minor refact
This commit is contained in:
@@ -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--){
|
||||||
|
|||||||
Reference in New Issue
Block a user