[Maps] Added dvar 'r_specularCustomMaps'
+ dvar 'r_specularCustomMaps' (Allows shaders to use phong specular lighting on custom maps)
This commit is contained in:
parent
e8a9dc56b4
commit
7a85eb9c9c
@ -682,13 +682,17 @@ namespace Components
|
|||||||
Game::dvar_t* Maps::GetSpecularDvar()
|
Game::dvar_t* Maps::GetSpecularDvar()
|
||||||
{
|
{
|
||||||
Game::dvar_t*& r_specular = *reinterpret_cast<Game::dvar_t**>(0x69F0D94);
|
Game::dvar_t*& r_specular = *reinterpret_cast<Game::dvar_t**>(0x69F0D94);
|
||||||
|
static Game::dvar_t* r_specularCustomMaps = Game::Dvar_RegisterBool("r_specularCustomMaps", true, Game::DVAR_FLAG_SAVED, "Allows shaders to use phong specular lighting on custom maps");
|
||||||
|
|
||||||
if (Maps::IsCustomMap())
|
if (Maps::IsCustomMap())
|
||||||
|
{
|
||||||
|
if (!r_specularCustomMaps->current.enabled)
|
||||||
{
|
{
|
||||||
static Game::dvar_t noSpecular;
|
static Game::dvar_t noSpecular;
|
||||||
ZeroMemory(&noSpecular, sizeof noSpecular);
|
ZeroMemory(&noSpecular, sizeof noSpecular);
|
||||||
return &noSpecular;
|
return &noSpecular;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return r_specular;
|
return r_specular;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user