-
Notifications
You must be signed in to change notification settings - Fork 38
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
is_cstrike_dir
is never set for checkpoint go to
#525
Comments
I would say that in general the game directory search code is poorly designed in terms of performance and this is definitely my fault (but at the time I did it I didn't really think about optimization at all), since at the moment every time the function is called to get the game directory, a large number of different operations take place (allocating and freeing of 1024 bytes for local variable [max game directory length in engine code is This means that we need initialize only once, store the result globally in memory, and simply return that for all subsequent calls to that function This also includes setting boolean variables that serve to identify some of the games; we can set them once in the same function in which we initialize the process of finding and processing the game directory and use this This is what I did in #516 request: Another question is that it is not particularly clear where exactly it is best to call in the game functions, because we prefer to call immediately after the game directory has already been initialized, preferably this should use the hooks we already have (it would great if it would be exported ones such as |
BunnymodXT/BunnymodXT/modules/HwDLL.cpp
Lines 3416 to 3418 in 76aefb2
The variable is only set when loading a TAS file, not upon starting the game or starting a map.
BunnymodXT/BunnymodXT/modules/HwDLL.cpp
Line 6795 in 76aefb2
Maybe we should have a way to know the current game dir as soon as the game starts so stuffs like this don't scatter around.
The text was updated successfully, but these errors were encountered: