Merge branch 'brushbsp' of https://github.com/ericwa/ericw-tools into brushbsp

# Conflicts:
#	light/ltface.cc
This commit is contained in:
Jonathan 2023-06-19 04:12:11 -04:00
commit aeece2a730
3 changed files with 11 additions and 11 deletions

View File

@ -154,7 +154,7 @@ public:
[[nodiscard]] constexpr T &operator[](const size_t idx) { return at(idx); }
template<typename F>
[[nodiscard]] inline auto operator+(const qvec<F, N> &other) const
[[nodiscard]] constexpr inline auto operator+(const qvec<F, N> &other) const
{
qvec<decltype(T() + F()), N> v;
@ -166,7 +166,7 @@ public:
}
template<typename F>
[[nodiscard]] inline auto operator-(const qvec<F, N> &other) const
[[nodiscard]] constexpr inline auto operator-(const qvec<F, N> &other) const
{
qvec<decltype(T() - F()), N> v;
@ -178,7 +178,7 @@ public:
}
template<typename S>
[[nodiscard]] inline auto operator*(const S &scale) const
[[nodiscard]] constexpr inline auto operator*(const S &scale) const
{
qvec<decltype(T() * S()), N> v;
@ -190,7 +190,7 @@ public:
}
template<typename F>
[[nodiscard]] inline auto operator*(const qvec<F, N> &scale) const
[[nodiscard]] constexpr inline auto operator*(const qvec<F, N> &scale) const
{
qvec<decltype(T() * F()), N> v;
@ -202,7 +202,7 @@ public:
}
template<typename S>
[[nodiscard]] inline auto operator/(const S &scale) const
[[nodiscard]] constexpr inline auto operator/(const S &scale) const
{
qvec<decltype(T() / S()), N> v;
@ -214,7 +214,7 @@ public:
}
template<typename F>
[[nodiscard]] inline auto operator/(const qvec<F, N> &scale) const
[[nodiscard]] constexpr inline auto operator/(const qvec<F, N> &scale) const
{
qvec<decltype(T() / F()), N> v;
@ -225,7 +225,7 @@ public:
return v;
}
[[nodiscard]] inline auto operator-() const
[[nodiscard]] constexpr inline auto operator-() const
{
qvec<decltype(-T()), N> v;

View File

@ -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;

View File

@ -93,7 +93,7 @@ testresults_t QbspVisLight_Q2(
return QbspVisLight_Common(name, {"-q2bsp"}, extra_light_args, run_vis);
}
TEST_CASE("-world_units_per_luxel, -lightgrid")
TEST_CASE("-world_units_per_luxel, -lightgrid" * doctest::may_fail())
{
auto [bsp, bspx] = QbspVisLight_Q2("q2_lightmap_custom_scale.map", {"-lightgrid"});
@ -123,7 +123,7 @@ TEST_CASE("-world_units_per_luxel, -lightgrid")
{
INFO("sky gets an optimized lightmap");
// FIXME: this currently fails, see Face_IsLightmapped
auto *sky_face = BSP_FindFaceAtPoint(&bsp, &bsp.dmodels[0], {256, 240, 84}, {0, -1, 0});
CHECK(sky_face->styles[0] == 255);