fullbright

This commit is contained in:
Skull Merlin 2022-05-05 15:23:50 +03:00
parent 74f52f94da
commit c1bdbe8526
2 changed files with 13 additions and 6 deletions

View File

@ -14,7 +14,15 @@ namespace renderer
int get_fullbright_technique()
{
return game::TECHNIQUE_UNLIT;
switch (dvars::r_fullbright->current.integer)
{
case 3:
return 13;
case 2:
return 25;
default:
return game::TECHNIQUE_UNLIT;
}
}
void gfxdrawmethod()
@ -35,7 +43,7 @@ namespace renderer
{
if (dvars::r_fullbright->modified)
{
//game::Dvar_ClearModified(dvars::r_fullbright);
game::Dvar_ClearModified(dvars::r_fullbright);
game::R_SyncRenderThread();
gfxdrawmethod();
@ -50,7 +58,7 @@ namespace renderer
public:
void post_unpack() override
{
if (game::environment::is_dedi() || !game::environment::is_mp())
if (game::environment::is_dedi())
{
return;
}
@ -72,6 +80,4 @@ namespace renderer
};
}
#ifdef DEBUG
REGISTER_COMPONENT(renderer::component)
#endif
REGISTER_COMPONENT(renderer::component)

View File

@ -53,6 +53,7 @@ namespace game
WEAK symbol<void(int hash, const char* name, const char* buffer)> Dvar_SetCommand{0x1403C72B0, 0x1404FD0A0};
WEAK symbol<dvar_t*(const char* name)> Dvar_FindVar{0x1403C5D50, 0x1404FBB00};
WEAK symbol<void(const dvar_t* dvar)> Dvar_ClearModified{0x1403C5C20, 0x1404FB930};
WEAK symbol<void(char* buffer, int index)> Dvar_GetCombinedString{0x140354DF0, 0x14041D830};
WEAK symbol<const char*(dvar_t* dvar, dvar_value value)> Dvar_ValueToString{0x1403C8560, 0x1404FE660};
WEAK symbol<void(dvar_t* dvar, DvarSetSource source)> Dvar_Reset{0, 0x1404FCC40};