Quote:
Originally Posted by Arkshine
Bot without "player" classname is now supported by Ham in git3805+.
This can't be enabled by default considering existing workaround used by plugins and to avoid unexpected behavior.
A new "specialbot" param has been added to RegisterHam. On false by default.
A stock has been added as well named "RegisterHamPlayer" where you don't need provide "player" classname and specialbot is set to true already. Just to make code more intuitive.
|
Arkshine how to see the full changes log on current dev build? it seems the web page is updated, last time it easy to see changes log.
**Edited**
Typo detected:
Code:
/**
* Hooks the virtual table for the player class.
* An example would be: RegisterHam(Ham_TakeDamage, "player_hurt");
* Look at the Ham enum for parameter lists.
*
* @param function The function to hook.
* @param callback The forward to call.
* @param post Whether or not to forward this in post.
* @return Returns a handle to the forward. Use EnableHamForward/DisableHamForward to toggle the forward on or off.
*/
stock HamHook:RegisterHamPlayer(Ham:function, const Callback[], Post=0)
{
return RegisterHam(function, "player", Callback, Post, .specialbot = true);
}
Error:
Code:
* An example would be: RegisterHam(Ham_TakeDamage, "player_hurt");
Should be:
Code:
* An example would be: RegisterHamPlayer(Ham_TakeDamage, "player_hurt");
__________________