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
483 B
C++
24 lines
483 B
C++
#ifndef TIER0_FRAMETASK_H
|
|
#define TIER0_FRAMETASK_H
|
|
|
|
#include "public/iframetask.h"
|
|
|
|
class CFrameTask : public IFrameTask
|
|
{
|
|
public:
|
|
virtual ~CFrameTask() {}
|
|
virtual void RunFrame();
|
|
virtual bool IsFinished() const;
|
|
|
|
void AddFunc(std::function<void()> functor, int frames);
|
|
|
|
private:
|
|
std::mutex m_Mutex;
|
|
std::list<DelayedCall_s> m_DelayedCalls;
|
|
};
|
|
|
|
extern std::list<IFrameTask*> g_FrameTasks;
|
|
extern CFrameTask* g_DelayedCallTask;
|
|
|
|
#endif // TIER0_FRAMETASK_H
|