Add OnPlayerRunCmdPost forward (#591)

* Add OnPlayerRunCmdPost forward

Allow plugins to catch the values that are actually used by the game
after some eventual changes by other plugins.

* Add |const| qualifier to arrays in OnPlayerRunCmdPost forward
This commit is contained in:
peace-maker
2017-05-09 15:16:05 +01:00
committed by Asher Baker
parent ed42d2feea
commit 1351df4260
3 changed files with 126 additions and 17 deletions
+17
View File
@@ -58,6 +58,23 @@
*/
forward Action OnPlayerRunCmd(int client, int &buttons, int &impulse, float vel[3], float angles[3], int &weapon, int &subtype, int &cmdnum, int &tickcount, int &seed, int mouse[2]);
/**
* @brief Called after a clients movement buttons were processed.
*
* @param client Index of the client.
* @param buttons The current commands (as bitflags - see entity_prop_stocks.inc).
* @param impulse The current impulse command.
* @param vel Players desired velocity.
* @param angles Players desired view angles.
* @param weapon Entity index of the new weapon if player switches weapon, 0 otherwise.
* @param subtype Weapon subtype when selected from a menu.
* @param cmdnum Command number. Increments from the first command sent.
* @param tickcount Tick count. A client's prediction based on the server's GetGameTickCount value.
* @param seed Random seed. Used to determine weapon recoil, spread, and other predicted elements.
* @param mouse Mouse direction (x, y).
*/
forward void OnPlayerRunCmdPost(int client, int buttons, int impulse, const float vel[3], const float angles[3], int weapon, int subtype, int cmdnum, int tickcount, int seed, const int mouse[2]);
/**
* @brief Called when a client requests a file from the server.
*