plugins/include/sdktools_hooks.inc
author David Anderson <dvander@alliedmods.net>
Mon Aug 12 00:24:02 2013 +0100 (2013-08-12)
changeset 3993 d06d6dacfa18
parent 3619 0249ba510bfe
permissions -rw-r--r--
Remove InfoVars, reassign DAT from EBP to ESI to preserve C++ stacktraces in JIT code (bug 5844 part 10, r=ds).
     1 /**
     2  * vim: set ts=4 :
     3  * =============================================================================
     4  * SourceMod (C)2004-2009 AlliedModders LLC.  All rights reserved.
     5  * =============================================================================
     6  *
     7  * This file is part of the SourceMod/SourcePawn SDK.
     8  *
     9  * This program is free software; you can redistribute it and/or modify it under
    10  * the terms of the GNU General Public License, version 3.0, as published by the
    11  * Free Software Foundation.
    12  * 
    13  * This program is distributed in the hope that it will be useful, but WITHOUT
    14  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
    15  * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
    16  * details.
    17  *
    18  * You should have received a copy of the GNU General Public License along with
    19  * this program.  If not, see <http://www.gnu.org/licenses/>.
    20  *
    21  * As a special exception, AlliedModders LLC gives you permission to link the
    22  * code of this program (as well as its derivative works) to "Half-Life 2," the
    23  * "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
    24  * by the Valve Corporation.  You must obey the GNU General Public License in
    25  * all respects for all other code used.  Additionally, AlliedModders LLC grants
    26  * this exception to all derivative works.  AlliedModders LLC defines further
    27  * exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
    28  * or <http://www.sourcemod.net/license.php>.
    29  *
    30  * Version: $Id$
    31  */
    32 
    33 #if defined _sdktools_hooks_included
    34   #endinput
    35 #endif
    36 #define _sdktools_hooks_included
    37 
    38 #define FEATURECAP_PLAYERRUNCMD_11PARAMS	"SDKTools PlayerRunCmd 11Params"
    39 
    40 /**
    41  * @brief Called when a clients movement buttons are being processed
    42  *
    43  * @param client	Index of the client.
    44  * @param buttons	Copyback buffer containing the current commands (as bitflags - see entity_prop_stocks.inc).
    45  * @param impulse	Copyback buffer containing the current impulse command.
    46  * @param vel		Players desired velocity.
    47  * @param angles	Players desired view angles.
    48  * @param weapon	Entity index of the new weapon if player switches weapon, 0 otherwise.
    49  * @param subtype	Weapon subtype when selected from a menu.
    50  * @param cmdnum	Command number. Increments from the first command sent.
    51  * @param tickcount	Tick count. A client's prediction based on the server's GetGameTickCount value.
    52  * @param seed		Random seed. Used to determine weapon recoil, spread, and other predicted elements.
    53  * @param mouse		Mouse direction (x, y).
    54  * @return 			Plugin_Handled to block the commands from being processed, Plugin_Continue otherwise.
    55  *
    56  * @note			To see if all 11 params are avaliable, use FeatureType_Capability and
    57  *					FEATURECAP_PLAYERRUNCMD_11PARAMS.
    58  */
    59 forward Action:OnPlayerRunCmd(client, &buttons, &impulse, Float:vel[3], Float:angles[3], &weapon, &subtype, &cmdnum, &tickcount, &seed, mouse[2]);