From b5876bdd331b78be695530c5828ce41c1fc8829c Mon Sep 17 00:00:00 2001 From: Nicholas Hastings Date: Tue, 26 Apr 2016 23:18:00 -0400 Subject: [PATCH] Allow Plugin_Changed return on event PreHooks to not block. (#503) This avoids issues from confusion that users have, returning Plugin_Changed after altering event data, when Plugin_Changed isn't required and wasn't supported in that scenario, and instead acted like Plugin_Handled. --- core/EventManager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/EventManager.cpp b/core/EventManager.cpp index 80e20a5d..d6d4eec6 100644 --- a/core/EventManager.cpp +++ b/core/EventManager.cpp @@ -424,7 +424,7 @@ bool EventManager::OnFireEvent(IGameEvent *pEvent, bool bDontBroadcast) m_EventCopies.push(gameevents->DuplicateEvent(pEvent)); } - if (res) + if (res >= Pl_Handled) { gameevents->FreeEvent(pEvent); RETURN_META_VALUE(MRES_SUPERCEDE, false);