mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 12:31:54 +00:00
Seperate out K_SendCallMidVote from Command_CallVote
This commit is contained in:
parent
15ff670a48
commit
8a4cca8518
1 changed files with 22 additions and 9 deletions
|
|
@ -151,9 +151,6 @@ static boolean K_MidVoteTypeUsesVictim(midVoteType_e voteType)
|
||||||
--------------------------------------------------*/
|
--------------------------------------------------*/
|
||||||
static void Command_CallVote(void)
|
static void Command_CallVote(void)
|
||||||
{
|
{
|
||||||
UINT8 buf[MAXTEXTCMD];
|
|
||||||
UINT8 *buf_p = buf;
|
|
||||||
|
|
||||||
size_t numArgs = 0;
|
size_t numArgs = 0;
|
||||||
|
|
||||||
const char *voteTypeStr = NULL;
|
const char *voteTypeStr = NULL;
|
||||||
|
|
@ -162,8 +159,6 @@ static void Command_CallVote(void)
|
||||||
const char *voteVariableStr = NULL;
|
const char *voteVariableStr = NULL;
|
||||||
INT32 voteVariable = 0;
|
INT32 voteVariable = 0;
|
||||||
|
|
||||||
player_t *victim = NULL;
|
|
||||||
|
|
||||||
INT32 i = INT32_MAX;
|
INT32 i = INT32_MAX;
|
||||||
|
|
||||||
if (netgame == false)
|
if (netgame == false)
|
||||||
|
|
@ -210,11 +205,26 @@ static void Command_CallVote(void)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (voteVariable >= 0 && voteVariable < MAXPLAYERS)
|
K_SendCallMidVote(voteType, voteVariable);
|
||||||
{
|
}
|
||||||
victim = &players[voteVariable];
|
|
||||||
}
|
/*--------------------------------------------------
|
||||||
|
void K_SendCallMidVote(midVoteType_e voteType, INT32 voteVariable)
|
||||||
|
|
||||||
|
See header file for description.
|
||||||
|
--------------------------------------------------*/
|
||||||
|
void K_SendCallMidVote(midVoteType_e voteType, INT32 voteVariable)
|
||||||
|
{
|
||||||
|
player_t *victim = NULL;
|
||||||
|
|
||||||
|
if (K_MidVoteTypeUsesVictim(voteType) == true)
|
||||||
|
{
|
||||||
|
if (voteVariable >= 0 && voteVariable < MAXPLAYERS)
|
||||||
|
{
|
||||||
|
victim = &players[voteVariable];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -224,6 +234,9 @@ static void Command_CallVote(void)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
UINT8 buf[MAXTEXTCMD];
|
||||||
|
UINT8 *buf_p = buf;
|
||||||
|
|
||||||
WRITEUINT8(buf_p, voteType);
|
WRITEUINT8(buf_p, voteType);
|
||||||
WRITEINT32(buf_p, voteVariable);
|
WRITEINT32(buf_p, voteVariable);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue