Use mutex for proper synchronization
* Guard both hack and reader threads so that only one thread can interact with critical variables at a time. This fixes exception related to bone esp.
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
#include "../classes/vector.hpp"
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <mutex>
|
||||
|
||||
struct view_matrix_t {
|
||||
float* operator[ ](int index) {
|
||||
@@ -74,4 +75,6 @@ private:
|
||||
uintptr_t localList_entry2;
|
||||
};
|
||||
|
||||
inline CGame g_game;
|
||||
inline CGame g_game;
|
||||
|
||||
inline std::mutex dataMutex;
|
||||
Reference in New Issue
Block a user