mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-28 04:51:42 +00:00
Merge branch 'master' of git.magicalgirl.moe:KartKrew/Kart into v2-master
This commit is contained in:
commit
e9f184f95f
3 changed files with 64 additions and 48 deletions
|
|
@ -717,8 +717,7 @@ static void COM_Exec_f(void)
|
||||||
CONS_Printf(M_GetText("executing %s\n"), COM_Argv(1));
|
CONS_Printf(M_GetText("executing %s\n"), COM_Argv(1));
|
||||||
|
|
||||||
// insert text file into the command buffer
|
// insert text file into the command buffer
|
||||||
COM_BufAddText((char *)buf);
|
COM_ImmedExecute((char *)buf);
|
||||||
COM_BufAddText("\n");
|
|
||||||
|
|
||||||
// free buffer
|
// free buffer
|
||||||
Z_Free(buf);
|
Z_Free(buf);
|
||||||
|
|
|
||||||
|
|
@ -2130,6 +2130,7 @@ static void P_RingZMovement(mobj_t *mo)
|
||||||
if (mo->eflags & MFE_APPLYPMOMZ && !P_IsObjectOnGround(mo))
|
if (mo->eflags & MFE_APPLYPMOMZ && !P_IsObjectOnGround(mo))
|
||||||
{
|
{
|
||||||
mo->momz += mo->pmomz;
|
mo->momz += mo->pmomz;
|
||||||
|
mo->pmomz = 0;
|
||||||
mo->eflags &= ~MFE_APPLYPMOMZ;
|
mo->eflags &= ~MFE_APPLYPMOMZ;
|
||||||
}
|
}
|
||||||
mo->z += mo->momz;
|
mo->z += mo->momz;
|
||||||
|
|
@ -2207,6 +2208,7 @@ static boolean P_ZMovement(mobj_t *mo)
|
||||||
if (mo->eflags & MFE_APPLYPMOMZ && !P_IsObjectOnGround(mo))
|
if (mo->eflags & MFE_APPLYPMOMZ && !P_IsObjectOnGround(mo))
|
||||||
{
|
{
|
||||||
mo->momz += mo->pmomz;
|
mo->momz += mo->pmomz;
|
||||||
|
mo->pmomz = 0;
|
||||||
mo->eflags &= ~MFE_APPLYPMOMZ;
|
mo->eflags &= ~MFE_APPLYPMOMZ;
|
||||||
}
|
}
|
||||||
mo->z += mo->momz;
|
mo->z += mo->momz;
|
||||||
|
|
@ -2691,6 +2693,7 @@ static void P_PlayerZMovement(mobj_t *mo)
|
||||||
if (mo->eflags & MFE_APPLYPMOMZ && !P_IsObjectOnGround(mo))
|
if (mo->eflags & MFE_APPLYPMOMZ && !P_IsObjectOnGround(mo))
|
||||||
{
|
{
|
||||||
mo->momz += mo->pmomz;
|
mo->momz += mo->pmomz;
|
||||||
|
mo->pmomz = 0;
|
||||||
mo->eflags &= ~MFE_APPLYPMOMZ;
|
mo->eflags &= ~MFE_APPLYPMOMZ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2984,6 +2987,7 @@ static boolean P_SceneryZMovement(mobj_t *mo)
|
||||||
if (mo->eflags & MFE_APPLYPMOMZ && !P_IsObjectOnGround(mo))
|
if (mo->eflags & MFE_APPLYPMOMZ && !P_IsObjectOnGround(mo))
|
||||||
{
|
{
|
||||||
mo->momz += mo->pmomz;
|
mo->momz += mo->pmomz;
|
||||||
|
mo->pmomz = 0;
|
||||||
mo->eflags &= ~MFE_APPLYPMOMZ;
|
mo->eflags &= ~MFE_APPLYPMOMZ;
|
||||||
}
|
}
|
||||||
mo->z += mo->momz;
|
mo->z += mo->momz;
|
||||||
|
|
|
||||||
105
src/y_inter.c
105
src/y_inter.c
|
|
@ -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,68 +1605,75 @@ 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;
|
||||||
|
|
||||||
for (i = 0; i <= splitscreen; i++)
|
/*
|
||||||
|
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)
|
||||||
{
|
{
|
||||||
UINT8 p;
|
for (i = 0; i <= splitscreen; i++)
|
||||||
boolean pressed = false;
|
|
||||||
|
|
||||||
switch (i)
|
|
||||||
{
|
{
|
||||||
case 1:
|
UINT8 p;
|
||||||
p = g_localplayers[1];
|
boolean pressed = false;
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
p = g_localplayers[2];
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
p = g_localplayers[3];
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
p = consoleplayer;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (voteclient.playerinfo[i].delay)
|
switch (i)
|
||||||
voteclient.playerinfo[i].delay--;
|
|
||||||
|
|
||||||
if ((playeringame[p] && !players[p].spectator)
|
|
||||||
&& !voteclient.playerinfo[i].delay
|
|
||||||
&& pickedvote == -1 && votes[p] == -1)
|
|
||||||
{
|
|
||||||
if (InputDown(gc_aimforward, i+1) || JoyAxis(AXISAIM, i+1) < 0)
|
|
||||||
{
|
{
|
||||||
voteclient.playerinfo[i].selection--;
|
case 1:
|
||||||
pressed = true;
|
p = g_localplayers[1];
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
p = g_localplayers[2];
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
p = g_localplayers[3];
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
p = consoleplayer;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((InputDown(gc_aimbackward, i+1) || JoyAxis(AXISAIM, i+1) > 0) && !pressed)
|
if (voteclient.playerinfo[i].delay)
|
||||||
|
voteclient.playerinfo[i].delay--;
|
||||||
|
|
||||||
|
if ((playeringame[p] && !players[p].spectator)
|
||||||
|
&& !voteclient.playerinfo[i].delay
|
||||||
|
&& pickedvote == -1 && votes[p] == -1)
|
||||||
{
|
{
|
||||||
voteclient.playerinfo[i].selection++;
|
if (InputDown(gc_aimforward, i+1) || JoyAxis(AXISAIM, i+1) < 0)
|
||||||
pressed = true;
|
{
|
||||||
|
voteclient.playerinfo[i].selection--;
|
||||||
|
pressed = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((InputDown(gc_aimbackward, i+1) || JoyAxis(AXISAIM, i+1) > 0) && !pressed)
|
||||||
|
{
|
||||||
|
voteclient.playerinfo[i].selection++;
|
||||||
|
pressed = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (voteclient.playerinfo[i].selection < 0)
|
||||||
|
voteclient.playerinfo[i].selection = 3;
|
||||||
|
if (voteclient.playerinfo[i].selection > 3)
|
||||||
|
voteclient.playerinfo[i].selection = 0;
|
||||||
|
|
||||||
|
if ((InputDown(gc_accelerate, i+1) || JoyAxis(AXISMOVE, i+1) > 0) && !pressed)
|
||||||
|
{
|
||||||
|
D_ModifyClientVote(voteclient.playerinfo[i].selection, i);
|
||||||
|
pressed = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (voteclient.playerinfo[i].selection < 0)
|
if (pressed)
|
||||||
voteclient.playerinfo[i].selection = 3;
|
|
||||||
if (voteclient.playerinfo[i].selection > 3)
|
|
||||||
voteclient.playerinfo[i].selection = 0;
|
|
||||||
|
|
||||||
if ((InputDown(gc_accelerate, i+1) || JoyAxis(AXISMOVE, i+1) > 0) && !pressed)
|
|
||||||
{
|
{
|
||||||
D_ModifyClientVote(voteclient.playerinfo[i].selection, i);
|
S_StartSound(NULL, sfx_kc4a);
|
||||||
pressed = true;
|
voteclient.playerinfo[i].delay = NEWTICRATE/7;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pressed)
|
|
||||||
{
|
|
||||||
S_StartSound(NULL, sfx_kc4a);
|
|
||||||
voteclient.playerinfo[i].delay = NEWTICRATE/7;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (server)
|
if (server)
|
||||||
|
|
@ -1689,7 +1697,10 @@ 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