diff --git a/inc/engine.h b/inc/engine.h index 0550b59..17cae5f 100644 --- a/inc/engine.h +++ b/inc/engine.h @@ -46,9 +46,7 @@ CR_DECLARE_SCOPED_ENUM (GameFlags, ReGameDLL = cr::bit (9), // server dll is a regamedll HasFakePings = cr::bit (10), // on that game version we can fake bots pings HasBotVoice = cr::bit (11), // on that game version we can use chatter - SwRenderer = cr::bit (12), // game runs with software renderer - HwRenderer = cr::bit (13), // games runs with hardware renderer - AnniversaryHL25 = cr::bit (14) // half-life 25th anniversary engine + AnniversaryHL25 = cr::bit (12) // half-life 25th anniversary engine ) // defines map type diff --git a/src/engine.cpp b/src/engine.cpp index 09050c4..bfd37f7 100644 --- a/src/engine.cpp +++ b/src/engine.cpp @@ -520,7 +520,6 @@ void Game::prepareBotArgs (edict_t *ent, String str) { } bool Game::isSoftwareRenderer () { - // xash always use "hw" structures if (is (GameFlags::Xash3D)) { return false; @@ -848,14 +847,6 @@ bool Game::postload () { }); } - // setup flags - if (game.isSoftwareRenderer ()) { - m_gameFlags |= GameFlags::SwRenderer; - } - else { - m_gameFlags |= GameFlags::SwRenderer; - } - // is 25th anniversary if (game.is25thAnniversaryUpdate ()) { m_gameFlags |= GameFlags::AnniversaryHL25; @@ -1065,14 +1056,6 @@ void Game::printBotVersion () { botRuntimeFlags.push ("HL25"); } - if (is (GameFlags::SwRenderer)) { - botRuntimeFlags.push ("SWR"); - } - - if (is (GameFlags::HwRenderer)) { - botRuntimeFlags.push ("HWR"); - } - // print if we're using sse 4.x instructions if (cpuflags.sse41 || cpuflags.sse42 || cpuflags.neon) { Array simdLevels {}; @@ -1255,10 +1238,13 @@ float LightMeasure::getLightLevel (const Vector &point) { Vector endPoint (point); endPoint.z -= 2048.0f; + static bool isSoftRenderer = game.isSoftwareRenderer (); + static bool is25Anniversary = game.is25thAnniversaryUpdate (); + // it's depends if we're are on dedicated or on listenserver auto recursiveCheck = [&] () -> bool { - if (!game.is (GameFlags::SwRenderer)) { - if (game.is (GameFlags::AnniversaryHL25)) { + if (!isSoftRenderer) { + if (is25Anniversary) { return recursiveLightPoint (reinterpret_cast (m_worldModel->nodes), point, endPoint); } return recursiveLightPoint (reinterpret_cast (m_worldModel->nodes), point, endPoint);