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
@@ -68,6 +68,9 @@ void CGame::close() {
}
void CGame::loop() {
std::lock_guard<std::mutex> lock(dataMutex);
inGame = false;
isC4Planted = false;