Slight adjustment

This commit is contained in:
TehRealSalt 2018-02-09 16:04:52 -05:00
parent 70f959815a
commit 9088e3dbab
3 changed files with 7 additions and 6 deletions

View File

@ -1139,7 +1139,7 @@ static INT32 Joy4Axis(axis_input_e axissel)
return retaxis; return retaxis;
} }
static boolean InputDown(INT32 gc, UINT8 p) boolean InputDown(INT32 gc, UINT8 p)
{ {
switch (p) switch (p)
{ {

View File

@ -92,6 +92,7 @@ ticcmd_t *G_MoveTiccmd(ticcmd_t* dest, const ticcmd_t* src, const size_t n);
INT16 G_ClipAimingPitch(INT32 *aiming); INT16 G_ClipAimingPitch(INT32 *aiming);
INT16 G_SoftwareClipAimingPitch(INT32 *aiming); INT16 G_SoftwareClipAimingPitch(INT32 *aiming);
boolean InputDown(INT32 gc, UINT8 p);
INT32 JoyAxis(axis_input_e axissel, UINT8 p); INT32 JoyAxis(axis_input_e axissel, UINT8 p);
extern angle_t localangle, localangle2, localangle3, localangle4; extern angle_t localangle, localangle2, localangle3, localangle4;

View File

@ -2290,7 +2290,7 @@ void Y_VoteTicker(void)
UINT8 tempvotes[MAXPLAYERS]; UINT8 tempvotes[MAXPLAYERS];
UINT8 numvotes = 0; UINT8 numvotes = 0;
if (votetic % (TICRATE/7) != 0) if (votetic % (TICRATE/3) != 0)
return; return;
for (i = 0; i < MAXPLAYERS; i++) for (i = 0; i < MAXPLAYERS; i++)
@ -2301,7 +2301,7 @@ void Y_VoteTicker(void)
numvotes++; numvotes++;
} }
randomanim = tempvotes[((pickedvote + ((voteendtic-votetic) / (TICRATE/7))) % numvotes)]; randomanim = tempvotes[((pickedvote + ((voteendtic-votetic) / (TICRATE/3))) % numvotes)];
S_StartSound(NULL, sfx_s3k5b); S_StartSound(NULL, sfx_s3k5b);
} }
else else
@ -2320,12 +2320,12 @@ void Y_VoteTicker(void)
D_ModifyClientVote(-1); D_ModifyClientVote(-1);
else if (pickedvote == -1 && votes[consoleplayer] == -1 && !voteclient.delay) else if (pickedvote == -1 && votes[consoleplayer] == -1 && !voteclient.delay)
{ {
if (PLAYER1INPUTDOWN(gc_aimforward) || JoyAxis(AXISMOVE, 1) < 0) if (InputDown(gc_aimforward, 1) || JoyAxis(AXISMOVE, 1) < 0)
{ {
voteclient.selection--; voteclient.selection--;
pressed = true; pressed = true;
} }
if ((PLAYER1INPUTDOWN(gc_aimbackward) || JoyAxis(AXISMOVE, 1) > 0) && !pressed) if ((InputDown(gc_aimbackward, 1) || JoyAxis(AXISMOVE, 1) > 0) && !pressed)
{ {
voteclient.selection++; voteclient.selection++;
pressed = true; pressed = true;
@ -2334,7 +2334,7 @@ void Y_VoteTicker(void)
voteclient.selection = 3; voteclient.selection = 3;
if (voteclient.selection > 3) if (voteclient.selection > 3)
voteclient.selection = 0; voteclient.selection = 0;
if (PLAYER1INPUTDOWN(gc_accelerate) && !pressed) if (InputDown(gc_accelerate, 1) && !pressed)
{ {
D_ModifyClientVote(voteclient.selection); D_ModifyClientVote(voteclient.selection);
pressed = true; pressed = true;