Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dosmike/tf2-regenthinkhook
Allows hooks into the clients RegenThink method by reimplementing it in SourcePawn
https://github.com/dosmike/tf2-regenthinkhook
Last synced: about 2 months ago
JSON representation
Allows hooks into the clients RegenThink method by reimplementing it in SourcePawn
- Host: GitHub
- URL: https://github.com/dosmike/tf2-regenthinkhook
- Owner: DosMike
- License: mit
- Created: 2022-11-03T14:48:56.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2024-06-14T15:04:12.000Z (7 months ago)
- Last Synced: 2024-06-14T16:34:39.317Z (7 months ago)
- Language: SourcePawn
- Size: 46.9 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# TF2 RegenThink Hook
The topic of hooking medics health regenration came up recently and I was kinda surprised nobody did a proper hook for this yet.
I think nosoop brought up RegenThink in relation to that on the SM Discord, so thank you nosoop.As I didn't want this to be a "stupid" OnRegenThink hook, I dug into the decompile and reversed the function to give the most control possible.
Since this plugin superceds the original function, I'm currently not sure how well this works with other RegenThink hooks, if at all.## Forward Summary
The forwards are documented in the include.
```c
Action TF2_OnRegenThinkPre(int client);
Action TF2_OnRegenThinkHealth(int client, float& regenHealthClass, float& regenHealthAttribs);
Action TF2_OnRegenThinkAmmo(int client, float& regenAmmoPercent, int& regenMetal);
void TF2_OnRegenThinkPost(int client, int regenHealth, float regenAmmo, int regenMetal);
```## Dependencies
Requires [TF2 Attributes](https://github.com/FlaminSarge/tf2attributes)
## Module Plugins
* [TF2 ClassRegenConfig](ClassRegenConfig.md)
Configure health, ammo and metal regeneration for every player class using a config or third party plugins## Credits
I want to thank nosoop for always having some insights or helpful reference code withing TF2 in their plugins.
Also thanks to who ever asked for this in the SM Discord, I actually needed this for a personal project, but was too lazy to properly do this until now.
Please open an issue if I forgot anyone :)