MoeMod / smcppsdk

Code csgo sourcepawn with Modern C++

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

sourcemod_timers maybe not always Pl_Stop?

BoneTM opened this issue · comments

commented

problem when using TIMER_REPEAT (sourcemod_timers.h)

ResultType OnTimer(ITimer *pTimer, void *pData) override
{
    detail::CallTimerFunc(m_fn, *this);
    return Pl_Stop;
}

change into ->

ResultType OnTimer(ITimer *pTimer, void *pData) override
{
    return detail::CallTimerFunc(m_fn, *this);
}

(or other better way, i dont know)

我找个时间测试下
这学期忙疯了我现在也没那么多时间处理这个

按timer的设计来说这里只支持一次性的,毕竟如果想要repeat的可以在callback里面重复创建。