diff --git a/core/systems/ForwardSys.cpp b/core/systems/ForwardSys.cpp index 95fd06c6..70536027 100644 --- a/core/systems/ForwardSys.cpp +++ b/core/systems/ForwardSys.cpp @@ -391,15 +391,20 @@ int CForward::Execute(cell_t *result, IForwardFilter *filter) } } - if (m_ExecType == ET_Event || m_ExecType == ET_Hook) + if (success) { - cur_result = high_result; - } else if (m_ExecType == ET_Ignore) { - cur_result = 0; + if (m_ExecType == ET_Event || m_ExecType == ET_Hook) + { + cur_result = high_result; + } else if (m_ExecType == ET_Ignore) { + cur_result = 0; + } + if (result) + { + *result = cur_result; + } } - *result = cur_result; - if (filter) { filter->OnExecuteEnd(&cur_result, success, failed); diff --git a/public/IForwardSys.h b/public/IForwardSys.h index 4fddf472..63e8c5db 100644 --- a/public/IForwardSys.h +++ b/public/IForwardSys.h @@ -165,7 +165,7 @@ namespace SourceMod /** * @brief Executes the forward. * - * @param result Pointer to store result in. + * @param result Optional pointer to store result in. * @param filter Optional pointer to an IForwardFilter. * @return Error code, if any. */