Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Temp fix for random crashes during the game while using ESP #64

Merged
merged 1 commit into from
Jul 17, 2024

Conversation

JozielBorges
Copy link

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:

  1. 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:

  1. 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.
  2. Updated the RunAzazelESP function to refresh the Azazel entity list periodically, preventing crashes by ensuring the pointers are up-to-date.
  3. Improved the RunItemsESP function to maintain a list of items and update it periodically, similar to the Azazel entity handling.

ESP.h Update:

  1. 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!

@ALittlePatate
Copy link
Owner

Everything seems to be good, thanks a lot for the contribution !

@ALittlePatate ALittlePatate merged commit cc88f08 into ALittlePatate:V2_recode Jul 17, 2024
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants