forked from rehlds/ReGameDLL_CS
-
Notifications
You must be signed in to change notification settings - Fork 0
API update SK #1. #5
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
Open
StevenKal
wants to merge
13
commits into
master
Choose a base branch
from
API-adjustments-SK-v1
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Changes reasons: No need to have those "*_api" functions for standard functions which do not have a different code/format, this is useless. Besides, passing the "real function used internally by the game" into the list of the structure "ReGameFuncs_t" will allow to retrieve the "real function address". So, we could "memhack it" and make a hook of the "real function", which is the internal one we want on a hook, not the API one which will only be called when we trigger those API functions. To finish, this ensures reliability of the function address, and, no need to search it via symbol or signature of bytes where the last can easily be broken. -> void *pfnAddMultiDamage = (void *)g_pReGameDLLCSFunctions->AddMultiDamage;
Changes reasons: No need to have those "*_api" functions for standard functions which do not have a different code/format, this is useless. Besides, passing the "real function used internally by the game" into the list of the structure "ReGameFuncs_t" will allow to retrieve the "real function address". So, we could "memhack it" and make a hook of the "real function", which is the internal one we want on a hook, not the API one which will only be called when we trigger those API functions. To finish, this ensures reliability of the function address, and, no need to search it via symbol or signature of bytes where the last can easily be broken. -> void *pfnAddMultiDamage = (void *)g_pReGameDLLCSFunctions->AddMultiDamage;
Changes: Add new member "m_bPlantC4Anywhere" to the function "CCSPlayer::Reset". Update function "CCSPlayer::JoinTeam" in order to drop the C4 when we move a player to spectator (fix issue s1lentq#498). Update functions "CCSPlayer::DropShield" & "CCSPlayer::DropPlayerItem" by adding return value of the entity created, and provided by ReGameDLL_CS (not the case for the legit CS binary).
Changes: Update functions "CCSPlayer::DropShield" & "CCSPlayer::DropPlayerItem" by adding return value of the entity created, and provided by ReGameDLL_CS (not the case for the legit CS binary).
Fix condition validity for #define "PLAYER_FREEZE_TIME_OVER" (freeze time over means it is over so we can play, so "!" forgotten).
Changes reasons: No need to have those "*_api" functions for standard functions which do not have a different code/format, this is useless. Besides, passing the "real function used internally by the game" into the list of the structure "ReGameFuncs_t" will allow to retrieve the "real function address". So, we could "memhack it" and make a hook of the "real function", which is the internal one we want on a hook, not the API one which will only be called when we trigger those API functions. To finish, this ensures reliability of the function address, and, no need to search it via symbol or signature of bytes where the last can easily be broken. -> void *pfnAddMultiDamage = (void *)g_pReGameDLLCSFunctions->AddMultiDamage;
Changes: Add new member "m_bPlantC4Anywhere" to the function "CCSPlayer::Reset" (but I hope it will be changed later into an integer for better control). Update function "CCSPlayer::JoinTeam" in order to drop the C4 when we move a player to spectator (fix issue s1lentq#498). Update functions "CCSPlayer::DropShield" & "CCSPlayer::DropPlayerItem" by adding return value of the entity created, and provided by ReGameDLL_CS (not the case for the legit CS binary).
Specify this requires a higher version as info (new CCSPlayer's functions format + new member addition).
Export those famous global variables in order to allow an external memhack module to retrieve address and easily get the address of the functions list (but mainly useful for "g_ReGameApiFuncs" here).
Changes: Update function "CCSPlayer::RemovePlayerItemEx" in order to be "more logic", and support possible blocking of "CBasePlayer::RemovePlayerItem" via modules/plugins (just like they are sometimes used to block "AddPlayerItem", the reverse case should be supported properly...), then force BP ammo removal for exhaustible weapons (granadas), to avoid problems when buying (like the message "You can not carry anymore!" while you no longer have the item, etc.)..
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adjust a few things in the API, then fix issue rehlds#498, then this issue.
Check comments in the commits ("..." at the right of each) for detailled explanations.