nothing actually done

This commit is contained in:
MihailRis 2024-05-18 03:49:34 +03:00
parent 693f50eb87
commit d3c9911640
4 changed files with 2 additions and 9 deletions

View File

@ -72,6 +72,7 @@ void Lighting::buildSkyLight(int cx, int cz){
y--; y--;
} }
if (chunk->lightmap.getS(x, y, z) != 15) { if (chunk->lightmap.getS(x, y, z) != 15) {
solverS->add(gx,y+1,gz);
for (; y >= 0; y--){ for (; y >= 0; y--){
solverS->add(gx+1,y,gz); solverS->add(gx+1,y,gz);
solverS->add(gx-1,y,gz); solverS->add(gx-1,y,gz);

View File

@ -131,7 +131,7 @@ void BlocksController::randomTick(int tickid, int parts) {
int index = z * w + x; int index = z * w + x;
if ((index + tickid) % parts != 0) if ((index + tickid) % parts != 0)
continue; continue;
auto chunk = chunks->chunks[index]; auto& chunk = chunks->chunks[index];
if (chunk == nullptr || !chunk->isLighted()) if (chunk == nullptr || !chunk->isLighted())
continue; continue;
for (int s = 0; s < segments; s++) { for (int s = 0; s < segments; s++) {

View File

@ -375,13 +375,6 @@ void lua::LuaState::openlib(const std::string& name, const luaL_Reg* libfuncs) {
lua_setglobal(L, name.c_str()); lua_setglobal(L, name.c_str());
} }
const std::string lua::LuaState::storeAnonymous() {
auto funcId = uintptr_t(lua_topointer(L, lua_gettop(L)));
auto funcName = "F$"+util::mangleid(funcId);
lua_setglobal(L, funcName.c_str());
return funcName;
}
std::shared_ptr<std::string> lua::LuaState::createLambdaHandler() { std::shared_ptr<std::string> lua::LuaState::createLambdaHandler() {
auto ptr = reinterpret_cast<ptrdiff_t>(lua_topointer(L, -1)); auto ptr = reinterpret_cast<ptrdiff_t>(lua_topointer(L, -1));
auto name = util::mangleid(ptr); auto name = util::mangleid(ptr);

View File

@ -75,7 +75,6 @@ namespace lua {
int createEnvironment(int parent); int createEnvironment(int parent);
void removeEnvironment(int id); void removeEnvironment(int id);
const std::string storeAnonymous();
bool emit_event(const std::string& name, std::function<int(lua::LuaState*)> args=[](auto*){return 0;}); bool emit_event(const std::string& name, std::function<int(lua::LuaState*)> args=[](auto*){return 0;});
void dumpStack(); void dumpStack();
lua_State* getLua() const; lua_State* getLua() const;