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:
prabhatKrMishra
2025-01-13 11:47:00 +05:30
parent 10de1f7393
commit 7b9b662f49
3 changed files with 10 additions and 1 deletions
+3
View File
@@ -26,6 +26,9 @@ namespace hack {
};
void loop() {
std::lock_guard<std::mutex> lock(dataMutex);
if (g_game.isC4Planted)
{
Vector3 c4Origin = g_game.c4.get_origin();