linkage: remove renderer flags, as world model isn't available when flags are shown
This commit is contained in:
parent
43d524f464
commit
835c9fc4ed
2 changed files with 6 additions and 22 deletions
|
|
@ -46,9 +46,7 @@ CR_DECLARE_SCOPED_ENUM (GameFlags,
|
||||||
ReGameDLL = cr::bit (9), // server dll is a regamedll
|
ReGameDLL = cr::bit (9), // server dll is a regamedll
|
||||||
HasFakePings = cr::bit (10), // on that game version we can fake bots pings
|
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
|
HasBotVoice = cr::bit (11), // on that game version we can use chatter
|
||||||
SwRenderer = cr::bit (12), // game runs with software renderer
|
AnniversaryHL25 = cr::bit (12) // half-life 25th anniversary engine
|
||||||
HwRenderer = cr::bit (13), // games runs with hardware renderer
|
|
||||||
AnniversaryHL25 = cr::bit (14) // half-life 25th anniversary engine
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// defines map type
|
// defines map type
|
||||||
|
|
|
||||||
|
|
@ -520,7 +520,6 @@ void Game::prepareBotArgs (edict_t *ent, String str) {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Game::isSoftwareRenderer () {
|
bool Game::isSoftwareRenderer () {
|
||||||
|
|
||||||
// xash always use "hw" structures
|
// xash always use "hw" structures
|
||||||
if (is (GameFlags::Xash3D)) {
|
if (is (GameFlags::Xash3D)) {
|
||||||
return false;
|
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
|
// is 25th anniversary
|
||||||
if (game.is25thAnniversaryUpdate ()) {
|
if (game.is25thAnniversaryUpdate ()) {
|
||||||
m_gameFlags |= GameFlags::AnniversaryHL25;
|
m_gameFlags |= GameFlags::AnniversaryHL25;
|
||||||
|
|
@ -1065,14 +1056,6 @@ void Game::printBotVersion () {
|
||||||
botRuntimeFlags.push ("HL25");
|
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
|
// print if we're using sse 4.x instructions
|
||||||
if (cpuflags.sse41 || cpuflags.sse42 || cpuflags.neon) {
|
if (cpuflags.sse41 || cpuflags.sse42 || cpuflags.neon) {
|
||||||
Array <String> simdLevels {};
|
Array <String> simdLevels {};
|
||||||
|
|
@ -1255,10 +1238,13 @@ float LightMeasure::getLightLevel (const Vector &point) {
|
||||||
Vector endPoint (point);
|
Vector endPoint (point);
|
||||||
endPoint.z -= 2048.0f;
|
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
|
// it's depends if we're are on dedicated or on listenserver
|
||||||
auto recursiveCheck = [&] () -> bool {
|
auto recursiveCheck = [&] () -> bool {
|
||||||
if (!game.is (GameFlags::SwRenderer)) {
|
if (!isSoftRenderer) {
|
||||||
if (game.is (GameFlags::AnniversaryHL25)) {
|
if (is25Anniversary) {
|
||||||
return recursiveLightPoint <msurface_hw_25anniversary_t, mnode_hw_t> (reinterpret_cast <mnode_hw_t *> (m_worldModel->nodes), point, endPoint);
|
return recursiveLightPoint <msurface_hw_25anniversary_t, mnode_hw_t> (reinterpret_cast <mnode_hw_t *> (m_worldModel->nodes), point, endPoint);
|
||||||
}
|
}
|
||||||
return recursiveLightPoint <msurface_hw_t, mnode_hw_t> (reinterpret_cast <mnode_hw_t *> (m_worldModel->nodes), point, endPoint);
|
return recursiveLightPoint <msurface_hw_t, mnode_hw_t> (reinterpret_cast <mnode_hw_t *> (m_worldModel->nodes), point, endPoint);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue