ReGameDLL_CS
ReGameDLL_CS copied to clipboard
[Feature Requests] New hooks to `API`
Hello,
In this Issue topic, you can request any new hook you want to see implemented in the future releases.
Regards, Adi.
Hooks WIP:
- [x] PM_Jump
- [ ] PM_WaterJump
- [ ] PM_PlayWaterSounds
- [ ] PM_Duck ( Not needed, it's called per
PM_Movecall ) - [x] PM_UnDuck
- [ ] PM_WaterMove
- [ ] PM_PlayStepSound
- [ ] CBasePlayerWeapon::ItemPostFrame
- [ ] CBasePlayerWeapon::PlayEmptySound
- [ ] CWeaponBox::BombThink
- [ ] CWeaponBox::Touch
- [ ] CArmoury::ArmouryTouch
- [ ] PM_SpectatorMove @Nord1cWarr1or
- [ ] PM_CheckStuck
- [ ] CREATE_NAMED_ENTITY
- [ ] REMOVE_ENTITY
- [ ] DispatchTouch
- [ ] DispatchUse
- [ ] CBaseEntity::FVisible
- [ ] CBasePlayer::HasWeapons
- [ ] CWeaponBox::PackWeapon
- [ ] CWeaponBox::PackAmmo
- [ ] CWeaponBox::Kill
- [ ] CBasePlayer::IsArmored
- [ ] CBasePlayer::ReloadWeapons
- [ ] CBasePlayer::UpdateLocation
- [ ] CBasePlayer::ThrowWeapon
- [ ] PM_AirAccelerate @igorkelvin
- [ ] CBasePlayer::CheckTimeBasedDamage @RauliTop
Event on exit and enter from box. For example there is touch events, but not exit. Exit and enter usually implemented in plugins using think event or tasks. Not that I need it so hard, already have those in plugins. Just a good suggestion i guess.
Event on exit and enter from box. For example there is touch events, but not exit. Exit and enter usually implemented in plugins using think event or tasks. Not that I need it so hard, already have those in plugins. Just a good suggestion i guess.
I think you mean to a think function. It is already implemented SetThink.
can you also add PM_SpectatorMove hookchain?
can you also add
PM_SpectatorMovehookchain?
Added, thank you!
Could this be useful in any way? https://github.com/s1lentq/ReGameDLL_CS/blob/master/regamedll/pm_shared/pm_shared.cpp#L1496
Event on exit and enter from box. For example there is touch events, but not exit. Exit and enter usually implemented in plugins using think event or tasks. Not that I need it so hard, already have those in plugins. Just a good suggestion i guess.
I think you mean to a
thinkfunction. It is already implementedSetThink.
I think he was refering to "when we get out from a touch", like, we are in a buyzone, we permanently "Touch" it, but he wants a hook to detect when we stop touching it (like once we move outside from it). But that's out of "default hooks we already have", as there is no "pfnUnTouch"!
PS: Despite this is not a problem for that (about compatibility), please keep the order of the "typedef *" in the .h files same as for the virtual, by adding them in the end (I think wopox will ask you to do it if he saw it, so). "PM_PlayerMove" not needed, there is already "PM_Move". And I am not sure this really worth to add "virtual functions already hookable via a known virtual module" ("ItemPostFrame" & "PlayEmptySound"), maybe except for custom/new modules using ReGameDLL_CS's API hooks, or, tiny performance gain. But adding more hooks is not complicated, neither long, so not much a problem after all, but I just think it is better to mainly focus on hooks we can not already have "easily" (without memory hooking).
Added new hooks to list
PS: Despite this is not a problem for that (about compatibility), please keep the order of the "typedef *" in the .h files same as for the virtual, by adding them in the end (I think wopox will ask you to do it if he saw it, so). "PM_PlayerMove" not needed, there is already "PM_Move". And I am not sure this really worth to add "virtual functions already hookable via a known virtual module" ("ItemPostFrame" & "PlayEmptySound"), maybe except for custom/new modules using ReGameDLL_CS's API hooks, or, tiny performance gain. But adding more hooks is not complicated, neither long, so not much a problem after all, but I just think it is better to mainly focus on hooks we can not already have "easily" (without memory hooking).
Agree with PM_PlayerMove, but ItemPostFrame and PlayEmptySound could help for directly calling into memory of the chain.
DispatchTouch & DispatchUse: No need. CREATE_NAMED_ENTITY: Maybe except for hashtable thing detection... & "only detect pure game calls", but not much needed, we can already hook the normal "pfnCreateNamedEntity" engine function used internally by this last. REMOVE_ENTITY: Game DLL function just points to the engine function, & we can already hook it, also, on ReHLDS, there is "ED_Free" which is able to catch "any entity removal call", so either from "pfnRemoveEntity", either when "FL_KILLME" set. I think you should add a "line" & move your "Hooks in WIP" in your first topic, & remove your old post, will be more visible for people (just suggestion).
DispatchTouch & DispatchUse
Why are these hooks unnecessarily? Also, you can contribute with new hook ideas tho.
About Dispatch*, I slightly mistaken, they can be useful only to detect a call from "dllfunc(DLLFunc_<Touch|Use>, ...)" or the other standalone natives (fake_touch, entity_use, force_use), since the Metamod's hooks (usable via AMX's VexdUM or AMXX's Engine/Fakemeta) will not be triggerred. But we can "bypass" that by memhacking pfnTouch & pfnUse (people using AMXX can do it via Orpheu), or, by hooking the standalone virtual functions ("CBase*::Touch" & "CBase*::Use") the internal code of those Dispatch* is pointing (on AMXX, via Ham..), which is more "reliable", since it is the end function. So you can still add them if you wish, but they are not really needed, even useless, knowing we can use the virtual functions, which, most of the "modern plugins" do.
About new hooks, I basically like to see new ones, more to upgrade my own module ReAPI since I have not more power for now on "that I am working", and also for distracting. But, to be honest, and, regarding that I am coding & my further plans, I do not care to see new hooks added, except when a hook is not "memhackable properly" (case for ReHLDS), but ReGameDLL_CS does not have such issue for almost all so. And I basically started to work on my "own ReGameDLL_CS" version, a few days ago, so I am probably not gonna contribute anymore here (submitting PRs), when I see my last PR stuck from months, no. I just like to come sometimes & contribute/suggest/help if I can, because I am usually nice & devoted, but that's all.
Maybe "CBasePlayer::IsArmored", more to be able to modify (remove) the "arms armor" to be realistic (CS has armor protection on arms while bullets-proof vests do not have). But a CVar with flags (abcdefg) for each bodypart could do the job too.
Edited new hooks list.
Could you add
PM_AirAcceleratehookchain? pm_shared.cppThanks in advance
Added on the list, thank you!
@ShadowsAdi I suggest you to reorder list by alphabetical order.
Also, you can add CBasePlayer::CheckTimeBasedDamage https://github.com/s1lentq/ReGameDLL_CS/issues/749
CBasePlayer::CheckTimeBasedDamage
Added on list, thank you!
CBasePlayer::ThrowWeapon: Kind of duplicate of "CBasePlayer::DropPlayerItem", & never used too, you can remove it from your list, the code itself could even be removed from the DLL.
- [ ] PM_Duck ( Not needed, it's called per
PM_Movecall )
@ShadowsAdi It will be more easy to port an existing plugin to ReAPI with PM_Duck hook.
Some examples:
Fast Duck Prone Position Zombie Class: Charger Counter-Strike 1.3 Fly mode