@@ -180,6 +180,7 @@ void CScriptDebugging::LogString (const char* szPrePend, const SLuaDebugInfo& lu
180
180
}
181
181
182
182
// Check whether on(Client)DebugMessage is currently being triggered
183
+ bool notCancelled = false ;
183
184
if (!m_bTriggeringMessageEvent)
184
185
{
185
186
// Make sure the state of on(Client)DebugMessage being triggered can be retrieved later
@@ -209,16 +210,17 @@ void CScriptDebugging::LogString (const char* szPrePend, const SLuaDebugInfo& lu
209
210
210
211
// Call on(Client)DebugMessage
211
212
#ifdef MTA_CLIENT
212
- g_pClientGame->GetRootEntity ()->CallEvent (" onClientDebugMessage" , Arguments, false );
213
+ notCancelled = g_pClientGame->GetRootEntity ()->CallEvent (" onClientDebugMessage" , Arguments, false );
213
214
#else
214
- g_pGame->GetMapManager ()->GetRootElement ()->CallEvent (" onDebugMessage" , Arguments);
215
+ notCancelled = g_pGame->GetMapManager ()->GetRootElement ()->CallEvent (" onDebugMessage" , Arguments);
215
216
#endif
216
217
217
218
// Reset trigger state, so onDebugMessage can be called again at a later moment
218
219
m_bTriggeringMessageEvent = false ;
219
220
}
220
221
221
- m_DuplicateLineFilter.AddLine ({ strText, uiMinimumDebugLevel, ucRed, ucGreen, ucBlue });
222
+ if (notCancelled)
223
+ m_DuplicateLineFilter.AddLine ({ strText, uiMinimumDebugLevel, ucRed, ucGreen, ucBlue });
222
224
223
225
#ifdef MTA_CLIENT
224
226
if (g_pCore->GetCVars ()->GetValue < bool > (" filter_duplicate_log_lines" ) == false )
0 commit comments