mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Merge branch 'voting-after-the-vote-ended' into 'master'
Double vote picking and modifying vote after vote ended See merge request KartKrew/Kart!195
This commit is contained in:
commit
ebb3471124
1 changed files with 59 additions and 46 deletions
|
|
@ -156,6 +156,7 @@ static y_votelvlinfo levelinfo[5];
|
||||||
static y_voteclient voteclient;
|
static y_voteclient voteclient;
|
||||||
static INT32 votetic;
|
static INT32 votetic;
|
||||||
static INT32 voteendtic = -1;
|
static INT32 voteendtic = -1;
|
||||||
|
static boolean votenotyetpicked;
|
||||||
static patch_t *cursor = NULL;
|
static patch_t *cursor = NULL;
|
||||||
static patch_t *cursor1 = NULL;
|
static patch_t *cursor1 = NULL;
|
||||||
static patch_t *cursor2 = NULL;
|
static patch_t *cursor2 = NULL;
|
||||||
|
|
@ -1604,11 +1605,17 @@ void Y_VoteTicker(void)
|
||||||
else
|
else
|
||||||
voteclient.ranim = pickedvote;
|
voteclient.ranim = pickedvote;
|
||||||
}
|
}
|
||||||
else
|
else if (votenotyetpicked)
|
||||||
{
|
{
|
||||||
if (votetic < 3*(NEWTICRATE/7)) // give it some time before letting you control it :V
|
if (votetic < 3*(NEWTICRATE/7)) // give it some time before letting you control it :V
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
/*
|
||||||
|
The vote ended, but it will take at least a tic for that to reach us from
|
||||||
|
the server. Don't let me change the vote now, it won't matter anyway!
|
||||||
|
*/
|
||||||
|
if (timer)
|
||||||
|
{
|
||||||
for (i = 0; i <= splitscreen; i++)
|
for (i = 0; i <= splitscreen; i++)
|
||||||
{
|
{
|
||||||
UINT8 p;
|
UINT8 p;
|
||||||
|
|
@ -1667,6 +1674,7 @@ void Y_VoteTicker(void)
|
||||||
voteclient.playerinfo[i].delay = NEWTICRATE/7;
|
voteclient.playerinfo[i].delay = NEWTICRATE/7;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (server)
|
if (server)
|
||||||
{
|
{
|
||||||
|
|
@ -1689,9 +1697,12 @@ void Y_VoteTicker(void)
|
||||||
|
|
||||||
timer = 0;
|
timer = 0;
|
||||||
if (voteendtic == -1)
|
if (voteendtic == -1)
|
||||||
|
{
|
||||||
|
votenotyetpicked = false;/* don't pick vote twice */
|
||||||
D_PickVote();
|
D_PickVote();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
@ -1723,6 +1734,8 @@ void Y_StartVote(void)
|
||||||
timer = cv_votetime.value*TICRATE;
|
timer = cv_votetime.value*TICRATE;
|
||||||
pickedvote = -1;
|
pickedvote = -1;
|
||||||
|
|
||||||
|
votenotyetpicked = true;
|
||||||
|
|
||||||
for (i = 0; i < 3; i++)
|
for (i = 0; i < 3; i++)
|
||||||
{
|
{
|
||||||
voteclient.playerinfo[i].selection = 0;
|
voteclient.playerinfo[i].selection = 0;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue