kbutton_t in_up, in_down;
// LordHavoc: added 6 new buttons
kbutton_t in_button3, in_button4, in_button5, in_button6, in_button7, in_button8;
+//even more
+kbutton_t in_button9, in_button10, in_button11, in_button12, in_button13, in_button14, in_button15, in_button16;
int in_impulse;
+extern cvar_t sys_ticrate;
+
void KeyDown (kbutton_t *b)
{
void IN_Button8Down(void) {KeyDown(&in_button8);}
void IN_Button8Up(void) {KeyUp(&in_button8);}
+void IN_Button9Down(void) {KeyDown(&in_button9);}
+void IN_Button9Up(void) {KeyUp(&in_button9);}
+void IN_Button10Down(void) {KeyDown(&in_button10);}
+void IN_Button10Up(void) {KeyUp(&in_button10);}
+void IN_Button11Down(void) {KeyDown(&in_button11);}
+void IN_Button11Up(void) {KeyUp(&in_button11);}
+void IN_Button12Down(void) {KeyDown(&in_button12);}
+void IN_Button12Up(void) {KeyUp(&in_button12);}
+void IN_Button13Down(void) {KeyDown(&in_button13);}
+void IN_Button13Up(void) {KeyUp(&in_button13);}
+void IN_Button14Down(void) {KeyDown(&in_button14);}
+void IN_Button14Up(void) {KeyUp(&in_button14);}
+void IN_Button15Down(void) {KeyDown(&in_button15);}
+void IN_Button15Up(void) {KeyUp(&in_button15);}
+void IN_Button16Down(void) {KeyDown(&in_button16);}
+void IN_Button16Up(void) {KeyUp(&in_button16);}
+
void IN_JumpDown (void) {KeyDown(&in_jump);}
void IN_JumpUp (void) {KeyUp(&in_jump);}
if (in_use.state & 3) bits |= 256;in_use.state &= ~2;
if (key_dest != key_game || key_consoleactive) bits |= 512;
if (cl_prydoncursor.integer) bits |= 1024;
- // button bits 11-31 unused currently
+ if (in_button9.state & 3) bits |= 2048;in_button9.state &= ~2;
+ if (in_button10.state & 3) bits |= 4096;in_button10.state &= ~2;
+ if (in_button11.state & 3) bits |= 8192;in_button11.state &= ~2;
+ if (in_button12.state & 3) bits |= 16384;in_button12.state &= ~2;
+ if (in_button13.state & 3) bits |= 32768;in_button13.state &= ~2;
+ if (in_button14.state & 3) bits |= 65536;in_button14.state &= ~2;
+ if (in_button15.state & 3) bits |= 131072;in_button15.state &= ~2;
+ if (in_button16.state & 3) bits |= 262144;in_button16.state &= ~2;
+ // button bits 19-31 unused currently
// rotate/zoom view serverside if PRYDON_CLIENTCURSOR cursor is at edge of screen
if (cl.cmd.cursor_screen[0] <= -1) bits |= 8;
if (cl.cmd.cursor_screen[0] >= 1) bits |= 16;
Cmd_AddCommand ("-button7", IN_Button7Up);
Cmd_AddCommand ("+button8", IN_Button8Down);
Cmd_AddCommand ("-button8", IN_Button8Up);
+ Cmd_AddCommand ("+button9", IN_Button9Down);
+ Cmd_AddCommand ("-button9", IN_Button9Up);
+ Cmd_AddCommand ("+button10", IN_Button10Down);
+ Cmd_AddCommand ("-button10", IN_Button10Up);
+ Cmd_AddCommand ("+button11", IN_Button11Down);
+ Cmd_AddCommand ("-button11", IN_Button11Up);
+ Cmd_AddCommand ("+button12", IN_Button12Down);
+ Cmd_AddCommand ("-button12", IN_Button12Up);
+ Cmd_AddCommand ("+button13", IN_Button13Down);
+ Cmd_AddCommand ("-button13", IN_Button13Up);
+ Cmd_AddCommand ("+button14", IN_Button14Down);
+ Cmd_AddCommand ("-button14", IN_Button14Up);
+ Cmd_AddCommand ("+button15", IN_Button15Down);
+ Cmd_AddCommand ("-button15", IN_Button15Up);
+ Cmd_AddCommand ("+button16", IN_Button16Down);
+ Cmd_AddCommand ("-button16", IN_Button16Up);
Cvar_RegisterVariable(&cl_movement);
Cvar_RegisterVariable(&cl_movement_latency);
if ((val = PRVM_GETEDICTFIELDVALUE(ent, eval_punchvector)))
VectorCopy(val->vector, punchvector);
- // FIXME: cache weapon model name and index in client struct to save time
+ // cache weapon model name and index in client struct to save time
// (this search can be almost 1% of cpu time!)
s = PRVM_GetString(ent->fields.server->weaponmodel);
if (strcmp(s, client->weaponmodel))
int eval_button6;
int eval_button7;
int eval_button8;
+int eval_button9;
+int eval_button10;
+int eval_button11;
+int eval_button12;
+int eval_button13;
+int eval_button14;
+int eval_button15;
+int eval_button16;
int eval_buttonuse;
int eval_buttonchat;
int eval_glow_size;
eval_button6 = PRVM_ED_FindFieldOffset("button6");
eval_button7 = PRVM_ED_FindFieldOffset("button7");
eval_button8 = PRVM_ED_FindFieldOffset("button8");
+ eval_button9 = PRVM_ED_FindFieldOffset("button9");
+ eval_button10 = PRVM_ED_FindFieldOffset("button10");
+ eval_button11 = PRVM_ED_FindFieldOffset("button11");
+ eval_button12 = PRVM_ED_FindFieldOffset("button12");
+ eval_button13 = PRVM_ED_FindFieldOffset("button13");
+ eval_button14 = PRVM_ED_FindFieldOffset("button14");
+ eval_button15 = PRVM_ED_FindFieldOffset("button15");
+ eval_button16 = PRVM_ED_FindFieldOffset("button16");
eval_buttonuse = PRVM_ED_FindFieldOffset("buttonuse");
eval_buttonchat = PRVM_ED_FindFieldOffset("buttonchat");
eval_glow_size = PRVM_ED_FindFieldOffset("glow_size");
{ev_float, "button6"},
{ev_float, "button7"},
{ev_float, "button8"},
+ {ev_float, "button9"},
+ {ev_float, "button10"},
+ {ev_float, "button11"},
+ {ev_float, "button12"},
+ {ev_float, "button13"},
+ {ev_float, "button14"},
+ {ev_float, "button15"},
+ {ev_float, "button16"},
{ev_float, "buttonchat"},
{ev_float, "buttonuse"},
{ev_float, "clientcolors"},
if ((val = PRVM_GETEDICTFIELDVALUE(host_client->edict, eval_button6))) val->_float = ((move->buttons >> 5) & 1);
if ((val = PRVM_GETEDICTFIELDVALUE(host_client->edict, eval_button7))) val->_float = ((move->buttons >> 6) & 1);
if ((val = PRVM_GETEDICTFIELDVALUE(host_client->edict, eval_button8))) val->_float = ((move->buttons >> 7) & 1);
+ if ((val = PRVM_GETEDICTFIELDVALUE(host_client->edict, eval_button9))) val->_float = ((move->buttons >> 11) & 1);
+ if ((val = PRVM_GETEDICTFIELDVALUE(host_client->edict, eval_button10))) val->_float = ((move->buttons >> 12) & 1);
+ if ((val = PRVM_GETEDICTFIELDVALUE(host_client->edict, eval_button11))) val->_float = ((move->buttons >> 13) & 1);
+ if ((val = PRVM_GETEDICTFIELDVALUE(host_client->edict, eval_button12))) val->_float = ((move->buttons >> 14) & 1);
+ if ((val = PRVM_GETEDICTFIELDVALUE(host_client->edict, eval_button13))) val->_float = ((move->buttons >> 15) & 1);
+ if ((val = PRVM_GETEDICTFIELDVALUE(host_client->edict, eval_button14))) val->_float = ((move->buttons >> 16) & 1);
+ if ((val = PRVM_GETEDICTFIELDVALUE(host_client->edict, eval_button15))) val->_float = ((move->buttons >> 17) & 1);
+ if ((val = PRVM_GETEDICTFIELDVALUE(host_client->edict, eval_button16))) val->_float = ((move->buttons >> 18) & 1);
if ((val = PRVM_GETEDICTFIELDVALUE(host_client->edict, eval_buttonuse))) val->_float = ((move->buttons >> 8) & 1);
if ((val = PRVM_GETEDICTFIELDVALUE(host_client->edict, eval_buttonchat))) val->_float = ((move->buttons >> 9) & 1);
if ((val = PRVM_GETEDICTFIELDVALUE(host_client->edict, eval_cursor_active))) val->_float = ((move->buttons >> 10) & 1);