diff --git a/light/ltface.cc b/light/ltface.cc index 3143498f..23d9a7d2 100644 --- a/light/ltface.cc +++ b/light/ltface.cc @@ -2843,11 +2843,10 @@ bool Face_IsLightmapped(const mbsp_t *bsp, const mface_t *face) // Very specific hack: the only reason to lightmap sky faces in Q2 is to light mdl's floating over sky. // If lightgrid is in use, this reason is no longer relevant, so skip lightmapping. - // TEMP DISABLED - /*if (light_options.lightgrid.value() && bsp->loadversion->game->id == GAME_QUAKE_II && + if (light_options.lightgrid.value() && bsp->loadversion->game->id == GAME_QUAKE_II && (texinfo->flags.native & Q2_SURF_SKY)) { return false; - }*/ + } return bsp->loadversion->game->surf_is_lightmapped(texinfo->flags); } diff --git a/light/surflight.cc b/light/surflight.cc index 6c8f4cf5..db849185 100644 --- a/light/surflight.cc +++ b/light/surflight.cc @@ -37,8 +37,7 @@ See file, 'COPYING', for details. using namespace std; using namespace polylib; -static mutex surfacelights_lock; -static size_t total_surflight_points = 0; +static std::atomic_size_t total_surflight_points; void ResetSurflight() { @@ -137,6 +136,7 @@ static void MakeSurfaceLight(const mbsp_t *bsp, const settings::worldspawn_keys } l->points.push_back(fixed_point); + ++total_surflight_points; }); l->minlight_scale = extended_flags.surflight_minlight_scale;