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: Implement *_Precache_*, ClientPrintf, CheckUserInfo and AddResource hooks #903

Merged
merged 49 commits into from
Sep 19, 2022

Conversation

ShadowsAdi
Copy link
Contributor

@ShadowsAdi ShadowsAdi commented Mar 5, 2022

  • PF_precache_generic_I
  • PF_precache_model_I
  • PF_precache_sound_I
  • SV_CheckUserInfo
  • SV_AddResource
  • EV_Precache
  • SV_ClientPrintf

Resource hooks related to #248
SV_CheckUserInfo #238
SV_ClientPrintf #903

@ShadowsAdi

This comment was marked as resolved.

@StevenKal
Copy link
Contributor

StevenKal commented Mar 5, 2022

I remember tried memhack hook those functions, & one of them was "fucked up under ReHLDS", as usual with it, unfortunately...
So it is a safe & welcomed PR.

Well, the fact you implemented "SV_CheckUserInfo" inside this PR, and the other fact this PR contains multiple hooks, I think you can close your other one for simplicity. But add you added it too, in the description.
Also, in order to have something "almost complete about precaching stuff", it will be nice if you could also add "EV_Precache" (precache_event) & "SV_AddResource" to your PR. Thanks in advance!

EDIT: Also, think to update "API minor" (+1) in the two files ("version.h" & "rehlds_api.h").

@ShadowsAdi ShadowsAdi changed the title Implemented PF_Precache_* hooks Implemented PF_Precache_* and SV_CheckUserInfo hooks Mar 5, 2022
and update API minor version
@ShadowsAdi ShadowsAdi changed the title Implemented PF_Precache_* and SV_CheckUserInfo hooks Implemented Precache_*, SV_AddResource and SV_CheckUserInfo hooks Mar 5, 2022
@StevenKal
Copy link
Contributor

StevenKal commented Mar 5, 2022

Nice! Now I think we could submit other hooks requests to it! Hehehe!
Let's hope approvers will not be in panic! Even if I think it is simpler to have all-in-one.

Without abusing, I am thinking of "SV_ClientPrintf" (similar to "Con_Printf", but send to client [like when you type in-game some commands as "status", this uses this one], so very useful, you can put it in top of the list below "its friend"!), "Sys_Error" & "Host_Error" too (useful to prevent server crash on an error which may not be "critical for it", or, if we use an internal code to fix, as example I have a map where I have a "Bad surface extents ..." error shit, so I could not run it, then I blocked the function, map runs fine & I did not constated third-party troubles!).
There are other functions, but as I said, I do not want to abuse with your time & devotion!

I guess you could rename the PR into "Implemented more hooks"! With such listing!

PS: I do not recommend to make the functions from the structure "RehldsFuncs_t" (g_RehldsApiFuncs) point to another "redirected function" (like now "SV_AddResource_api"), except if there is a conflit somewhere while compiling, or, if you add additionnal code inside that famous "_api" function. Mainly due to the fact we loose the possibility to get the address of the "real function", via this structure (& by using "g_RehldsApiFuncs" as base address).

@SergeyShorokhov
Copy link
Member

remove all refactoring from this PR please

@ShadowsAdi
Copy link
Contributor Author

Everything should be alright now, @wopox1337

@UnrealKaraulov
Copy link

Any news ? 👀

Nice feature, please merge it! :)

@StevenKal
Copy link
Contributor

StevenKal commented Jul 26, 2022

Any news ? 👀

Nice feature, please merge it! :)

Yes, nice feature. But corpses everywhere nowadays! All fucking dead! Disappointing huh!
Population in the world keeps increasing, but it seems Aliens have kidnapped a lot of people to bring them "we do not know where"!

@RauliTop
Copy link
Contributor

Yes, nice feature. But corpses everywhere nowadays! All fucking dead! Disappointing huh! Population in the world keeps increasing, but it seems Aliens have kidnapped a lot of people to bring them "we do not know where"!

Where place did you escape from?

@StevenKal
Copy link
Contributor

I am one of the aliens (other group of aliens), I can not reveal secret defense information about possible location of others aliens lab!

@SergeyShorokhov SergeyShorokhov merged commit d6ebe82 into rehlds:master Sep 19, 2022
@SergeyShorokhov SergeyShorokhov added Engine: 📀 reHLDS Case refers to reHLDS engine. Priority: 🕒 low Low priority tasks that can be postponed for the future. Type: 🚀 enhancement Improvement or addition of a new feature. Status: ✅ done The issue done and closed. labels Sep 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Engine: 📀 reHLDS Case refers to reHLDS engine. Priority: 🕒 low Low priority tasks that can be postponed for the future. Status: ✅ done The issue done and closed. Type: 🚀 enhancement Improvement or addition of a new feature.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants