Skip to content

Fix client side debugscript level filtering (#3498) #4323

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

MohabCodeX
Copy link
Contributor

Fixes #3498

you can test using this script which has a lot of test options
dbgtest.zip

MohabCodeX and others added 3 commits July 31, 2025 02:09
• Add CheckForSufficientDebugLevel method for proper level checking
• Implement console output filtering based on player debug level
• Add debug level enums with legacy numeric level support
• Align client-side behavior with server-side debug filtering
Copy link
Member

@Nico8340 Nico8340 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@@ -33,13 +33,13 @@ CScriptDebugging::~CScriptDebugging()
fprintf(m_pLogFile, "INFO: Logging to this file ended\n");

// if we have a flush timer
if (m_flushTimerHandle != NULL)
if (m_flushTimerHandle != nullptr)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can be reduced: if (m_flushTimerHandle)

@@ -52,7 +52,7 @@ void CScriptDebugging::LogBadLevel(lua_State* luaVM, unsigned int uiRequiredLeve
void CALLBACK TimerProc(void* lpParametar, BOOLEAN TimerOrWaitFired)
{
// Got a logfile?
if (CScriptDebugging::m_pLogFile != NULL)
if (CScriptDebugging::m_pLogFile != nullptr)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can be reduced: if (CScriptDebugging::m_pLogFile)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

debugscript behavior needs tweaking
4 participants