This pull request addresses issue #60 by implementing a temporary fix to prevent random crashes related to the ESP feature during gameplay. The main changes include updates to esp.cpp and modifications in the hNolanBehaviour_Update hook.
Changes Made:
hNolanBehaviour_Update Hook:
Added a check to ensure the ESP functionality does not execute in the menu, if in game, update the goat list, in this way we prevent the error by invalid memory addresses.
ESP.cpp Modifications:
Introduced a RefreshEntList function to manage entity lists and avoid accessing invalid memory. This function serves as an example and might be useful for future improvements.
Updated the RunAzazelESP function to refresh the Azazel entity list periodically, preventing crashes by ensuring the pointers are up-to-date.
Improved the RunItemsESP function to maintain a list of items and update it periodically, similar to the Azazel entity handling.
ESP.h Update:
Introduced the follow variables to the namespace:
inline app::GameObject__Array* ents_azazel = NULL; // OLD AZAZEL
inline app::Object_1__Array* ents_item; // OLD ITEM LIST
inline app::Object_1__Array* ents_goat; // REAL TIME GOAT FROM HOOK
inline int time_refresh = 100;
inline int time_counter = 0;
Summary:
These changes aim to stabilize the ESP feature by managing entity lists more effectively and avoiding invalid memory accesses. The temporary fixes implemented will mitigate random crashes, especially during non-menu gameplay scenarios.
Please review these changes and let me know if there are any adjustments needed. Thank you!
This pull request addresses issue #60 by implementing a temporary fix to prevent random crashes related to the ESP feature during gameplay. The main changes include updates to esp.cpp and modifications in the hNolanBehaviour_Update hook.
Changes Made:
hNolanBehaviour_Update Hook:
ESP.cpp Modifications:
ESP.h Update:
Introduced the follow variables to the namespace:
Summary:
These changes aim to stabilize the ESP feature by managing entity lists more effectively and avoiding invalid memory accesses. The temporary fixes implemented will mitigate random crashes, especially during non-menu gameplay scenarios.
Please review these changes and let me know if there are any adjustments needed. Thank you!