diff --git a/src/playsim/p_effect.cpp b/src/playsim/p_effect.cpp index 0fd25f12389..ff99c7aa60f 100644 --- a/src/playsim/p_effect.cpp +++ b/src/playsim/p_effect.cpp @@ -34,7 +34,11 @@ ** more useful. */ -#include +#if __has_include() + + #include + +#endif #include "doomtype.h" #include "doomstat.h" @@ -58,7 +62,12 @@ CVAR (Bool, r_rail_smartspiral, false, CVAR_ARCHIVE); CVAR (Int, r_rail_spiralsparsity, 1, CVAR_ARCHIVE); CVAR (Int, r_rail_trailsparsity, 1, CVAR_ARCHIVE); CVAR (Bool, r_particles, true, 0); -CVAR (Bool, r_particles_multithreaded, true, CVAR_ARCHIVE); + +#if __has_include() + + CVAR (Bool, r_particles_multithreaded, true, CVAR_ARCHIVE); + +#endif EXTERN_CVAR(Int, r_maxparticles); FRandom pr_railtrail("RailTrail"); @@ -280,6 +289,7 @@ void P_ThinkParticles (FLevelLocals *Level) { uint64_t startNs = I_nsTime(); std::deque::iterator newEnd; +#if __has_include() if(r_particles_multithreaded) { newEnd = std::remove_if(std::execution::par_unseq, Level->Particles.begin(), Level->Particles.end(), [Level](particle_t &p) @@ -288,6 +298,7 @@ void P_ThinkParticles (FLevelLocals *Level) }); } else +#endif { newEnd = std::remove_if(Level->Particles.begin(), Level->Particles.end(), [Level](particle_t &p) {