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

API update SK #1. #699

Closed
wants to merge 13 commits into from
Closed

Conversation

StevenKal
Copy link
Contributor

@StevenKal StevenKal commented Oct 28, 2021

Adjust a few things in the API, then fix issue #498, then this issue.
Check comments in the commits ("..." at the right of each) for detailled explanations.

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).
@StevenKal StevenKal changed the title API adjustments SK #1. API update SK #1. Oct 29, 2021
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.)..
@StevenKal
Copy link
Contributor Author

3 months have past. Come on! Merge please!

@Vaqtincha
Copy link
Contributor

3 months have past. Come on! Merge please!

Pr turned out to be very big. You can't do everything in one. + you don't answer my questions about changes.

@StevenKal
Copy link
Contributor Author

Pr turned out to be very big. You can't do everything in one. + you don't answer my questions about changes.

Haha! Stop grabbing other's people answerS!

@Vaqtincha
Copy link
Contributor

Clown

@StevenKal
Copy link
Contributor Author

StevenKal commented Feb 20, 2022

Your sentences are likes the ones the RGCS's approver(s) could say (& already said before), my reply was about that, as you seem to "mock" of them (or talk for) by writting this here.

But your thumbs down & "clown" is very confusing...

So, if you did not said that for such, what the fuck did you mean except "bullshits"?
"Pr turned out to be very big." -> Is this the definition of "big" when you look that PR? Not for me.
"You can't do everything in one." -> It's only about API changes, I did not modified other things.
"You don't answer my questions about changes." -> What fucking questions? Besides files are deeply commented/explained when you go on "Commits" & click on the "..." at the right of a commit!
Hum, crétin !

What did you said last time, before you remove your post? "Trash", like if all PRs are not merged, so better trash "PR concept over here" huh! That's it?! Could be.

@Vaqtincha
Copy link
Contributor

Ты просто идиот. Некоторые изменения просто тупые. Выше например при IsFreezePeriod() добавляешь флаг PLAYER_FREEZE_TIME_OVER. Какого хрена? И нафиг все в кучу запихнуть? Сделай отдельно все это.

@StevenKal
Copy link
Contributor Author

StevenKal commented Feb 20, 2022

Ты просто идиот.

I think the same about you, with your trash & Russian talk when you lazy (or, more to voluntarily annoy others) to speak english... & your PRs you close too quickly & cie! Besides you boring at looking conflicts with people by specifying tiny/dumb reasons without importance, you are a specimen!
All you said above ("Pr turned out to be very big. You can't do everything in one. + you don't answer my questions about changes."), is just completly wrong (bullshits) & out of context. Then now topic start having some trash talk due to you!

Seriously, in overall, you just right about one thing, "better make our own fork of the project to have desired changes implemented quickly", & devs basically gave us that possibility, which I have thinked about from a while, and, probably gonna do my own "extended version" at a moment or another, for my own needs (addon I am working on) or/and maybe for people who will like "a more active continuity", but I do not care about "AMXX users", so...

However...
...Firstly, you should look (& even judge) the PR at its actual status (T instant) in the "Files changed" tab rather than looking & judging at through the whole history of commits (and especially knowing you "only answer from now, not from the first release or it"), which includes changes, because you are criticizing something that has been excluded from it... Would you think intelligent if, at T instant, I started to criticize a mistake you did at the first launch/draft on one of your PR, but you fixed later? Sounds like for you! Haha!
...Secondly, about the freeze time fix I changed then restored, the "PLAYER_FREEZE_TIME_OVER" means "over", so my fix to add "!" on the condition was correct, but I remember this did not compiled (no fucking idea why) so I did not bother & I dropped the fix (or I could have changed the condition & iuser3's bits for compil fix), but well, I am not using "iuser3" of a client on my scripts for now & maybe no one used it for their own yet. Also, I did not implemented it back since this wopox told me he prefered do not have too much separated things (despite I think this iuser3 is a bit linked to the "API", as this is more for third-party things, as modules or plugins).
...Thirdly, well, if I have to fucking create a PR for every single line of change I do, I am not gonna continue to do it again!
And the fact this "basic one" remains stagnant here from months just erased my wishes to continue at submitting new ones, I will just do otherwise.
Besides at the time I did that PR, I was "experimenting GitHub", & doing it with my small laptop which was a complete pain to work well with. Now I figured out GitHub's interface works fine under 360 Chrome with XP, so I can use it as workaround on my main PC, for dealing with GitHub, with ease.

PS: Might be better in the future to just ignore each other, if this is to have those kind of "you idiot" conversations, not interesting at all, & not productive neither.

@Vaqtincha
Copy link
Contributor

Знатно пригорел :)

Repository owner locked as too heated and limited conversation to collaborators Feb 21, 2022
@s1lentq s1lentq closed this Sep 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants