Engine: Add unregister_[touch|think|impulse]()

This commit is contained in:
Valentin Grünbacher
2015-05-10 23:40:22 +02:00
parent c531ad756d
commit 218fb9c794
2 changed files with 96 additions and 4 deletions

View File

@ -70,7 +70,7 @@ native traceresult(type, any:...);
* @param impulse Impulse to hook
* @param function Name of callback function
*
* @noreturn
* @return Impulse forward id
*/
native register_impulse(impulse, const function[]);
@ -96,7 +96,7 @@ native register_impulse(impulse, const function[]);
* @param Toucher Entity classname touching, "*" or "" for any class
* @param function Name of callback function
*
* @noreturn
* @return Touch forward id
*/
native register_touch(const Touched[], const Toucher[], const function[]);
@ -120,10 +120,37 @@ native register_touch(const Touched[], const Toucher[], const function[]);
* @param Touched Entity classname to hook
* @param function Name of callback function
*
* @noreturn
* @return Think forward id
*/
native register_think(const Classname[], const function[]);
/**
* Removes a previously registered impulse hook.
*
* @param registerid Impulse forward id
*
* @return 1 on success, 0 if nothing was removed
*/
native unregister_impulse(registerid);
/**
* Removes a previously registered touch hook.
*
* @param registerid Touch forward id
*
* @return 1 on success, 0 if nothing was removed
*/
native unregister_touch(registerid);
/**
* Removes a previously registered think hook.
*
* @param registerid Think forward id
*
* @return 1 on success, 0 if nothing was removed
*/
native unregister_think(registerid);
/**
* Precaches an event file.
*