Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/hzqst/MetaHookSv
Browse files Browse the repository at this point in the history
  • Loading branch information
hzqst committed Feb 11, 2025
2 parents 1bf04fd + a1e4a18 commit 3a10019
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Plugins/Renderer/gl_rmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4138,6 +4138,12 @@ void R_SetupFlashlights()
dlight_t* dl = cl_dlights;
float curtime = (*cl_time);

if (gEngfuncs.GetMaxClients() <= 1)
{
//Do nothing for singleplayer
return;
}

if (g_iEngineType == ENGINE_SVENGINE)
{
//SvEngine done a good job here we don't need to setup our own flashlights.
Expand All @@ -4154,7 +4160,7 @@ void R_SetupFlashlights()
}
}

for (int i = 0; i < MAX_CLIENTS; ++i)
for (int i = 0; i < gEngfuncs.GetMaxClients(); ++i)
{
auto state = R_GetPlayerState(i);

Expand Down

0 comments on commit 3a10019

Please sign in to comment.