mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Run all Cbuf_Execute calls in the main thread. This should fix every problem related to (but not only): * Connecting to server while RUI dialogue is still open. * Connecting to server while in an active game. * Running 'weapon_reparse'.
24 lines
456 B
C++
24 lines
456 B
C++
#ifndef TIER0_IFRAMETASK_H
|
|
#define TIER0_IFRAMETASK_H
|
|
|
|
struct DelayedCall_s
|
|
{
|
|
int m_nDelayedFrames;
|
|
std::function<void()> m_rFunctor;
|
|
DelayedCall_s(int frames, std::function<void()> functor)
|
|
{
|
|
m_nDelayedFrames = frames;
|
|
m_rFunctor = functor;
|
|
}
|
|
};
|
|
|
|
abstract_class IFrameTask
|
|
{
|
|
public:
|
|
virtual ~IFrameTask() {}
|
|
virtual void RunFrame() = 0;
|
|
virtual bool IsFinished() const = 0;
|
|
};
|
|
|
|
#endif // TIER0_IFRAMETASK_H
|