Remove redundant code.
This commit is contained in:
parent
1daf629a42
commit
fe485836f1
@ -122,12 +122,9 @@ void HolidayManager::UnhookIfNecessary()
|
||||
if (m_isHolidayForward->GetFunctionCount() > 0)
|
||||
return;
|
||||
|
||||
if (m_iHookID)
|
||||
{
|
||||
SH_REMOVE_HOOK_ID(m_iHookID);
|
||||
m_iHookID = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void HolidayManager::OnPluginLoaded(IPlugin *plugin)
|
||||
{
|
||||
@ -141,14 +138,8 @@ void HolidayManager::OnPluginUnloaded(IPlugin *plugin)
|
||||
|
||||
bool HolidayManager::Hook_IsHolidayActive(int holiday)
|
||||
{
|
||||
void *pGameRules = NULL;
|
||||
if (g_pSDKTools)
|
||||
{
|
||||
pGameRules = g_pSDKTools->GetGameRules();
|
||||
}
|
||||
void *pGameRules = META_IFACEPTR(void *);
|
||||
|
||||
if (pGameRules)
|
||||
{
|
||||
bool actualres = SH_MCALL(pGameRules, IsHolidayActive)(holiday);
|
||||
if (!m_isHolidayForward)
|
||||
{
|
||||
@ -167,7 +158,6 @@ bool HolidayManager::Hook_IsHolidayActive(int holiday)
|
||||
{
|
||||
RETURN_META_VALUE(MRES_SUPERCEDE, (newres == 0) ? false : true);
|
||||
}
|
||||
}
|
||||
|
||||
RETURN_META_VALUE(MRES_IGNORED, true);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user