Shared: Expose INPUT_BUTTON6 and INPUT_BUTTON7 so mods can define some extra movement/weapon inputs for clients.
This commit is contained in:
parent
46f6bfc1d3
commit
993c2a6ebc
3 changed files with 18 additions and 8 deletions
|
@ -286,6 +286,8 @@ struct
|
|||
int m_iInputReload;
|
||||
int m_iInputUse;
|
||||
int m_iInputDuck;
|
||||
int m_iInputExtra1;
|
||||
int m_iInputExtra2;
|
||||
float m_flInputBlockTime;
|
||||
|
||||
/* fading */
|
||||
|
|
|
@ -420,6 +420,14 @@ NSClientPlayer::ClientInputFrame(void)
|
|||
input_buttons |= INPUT_BUTTON8;
|
||||
}
|
||||
|
||||
if (pSeat->m_iInputExtra1 == TRUE) {
|
||||
input_buttons |= INPUT_BUTTON6;
|
||||
}
|
||||
|
||||
if (pSeat->m_iInputExtra2 == TRUE) {
|
||||
input_buttons |= INPUT_BUTTON7;
|
||||
}
|
||||
|
||||
/* The HUD needs more time */
|
||||
if (pSeat->m_iHUDWeaponSelected) {
|
||||
if ((input_buttons & INPUT_BUTTON0))
|
||||
|
|
|
@ -106,14 +106,14 @@ const vector VEC_CHULL_MIN = [-16,-16,-18];
|
|||
const vector VEC_CHULL_MAX = [16,16,18];
|
||||
|
||||
// Actually used by input_button etc.
|
||||
#define INPUT_BUTTON0 0x00000001
|
||||
#define INPUT_BUTTON2 0x00000002
|
||||
#define INPUT_BUTTON3 0x00000004
|
||||
#define INPUT_BUTTON4 0x00000008
|
||||
#define INPUT_BUTTON5 0x00000010
|
||||
#define INPUT_BUTTON6 0x00000020
|
||||
#define INPUT_BUTTON7 0x00000040
|
||||
#define INPUT_BUTTON8 0x00000080
|
||||
#define INPUT_BUTTON0 0x00000001 /* attack 1*/
|
||||
#define INPUT_BUTTON2 0x00000002 /* jumping */
|
||||
#define INPUT_BUTTON3 0x00000004 /* attack 2 */
|
||||
#define INPUT_BUTTON4 0x00000008 /* reload */
|
||||
#define INPUT_BUTTON5 0x00000010 /* use button */
|
||||
#define INPUT_BUTTON6 0x00000020 /* reserved */
|
||||
#define INPUT_BUTTON7 0x00000040 /* reserved */
|
||||
#define INPUT_BUTTON8 0x00000080 /* crouching */
|
||||
|
||||
/* sendflags */
|
||||
#define UPDATE_ALL 16777215
|
||||
|
|
Loading…
Reference in a new issue