Fix #395 backward compatibility issue by adding SetParamEntity2 native (#463)

This commit is contained in:
Vincent Herbet
2017-10-05 11:46:05 +02:00
committed by GitHub
parent 97df408d51
commit 779a4d9e59
3 changed files with 39 additions and 12 deletions

View File

@ -265,11 +265,25 @@ native SetHamParamVector(which, const Float:value[3]);
* Sets a parameter on the fly of the current hook. This has no effect in post hooks.
* Use this on parameters that are entities.
*
* @note Due to a historical bug, the changes made by this native are not reflected in the corresponding post forward
* for backward compatibility reasons. Use SetHamParamEntity2 if this is required.
*
* @param which Which parameter to change. Starts at 1, and works up from the left to right. 1 is always "this".
* @param value The value to change it to.
*/
native SetHamParamEntity(which, value);
/**
* Sets a parameter on the fly of the current hook. This has no effect in post hooks.
* Use this on parameters that are entities.
*
* @note Same as SetHamParamEntity except the changes made by this native are reflected in the corresponding post forward.
*
* @param which Which parameter to change. Starts at 1, and works up from the left to right. 1 is always "this".
* @param value The value to change it to.
*/
native SetHamParamEntity2(which, value);
/**
* Sets a parameter on the fly of the current hook. This has no effect in post hooks.
* Use this on parameters that are strings.