mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-28 05:11:34 +00:00
Merge branch 'master' into next
This commit is contained in:
commit
f0ffd691f4
2 changed files with 54 additions and 21 deletions
|
@ -2525,12 +2525,18 @@ static void Command_Nodes(void)
|
||||||
|
|
||||||
static void Command_Ban(void)
|
static void Command_Ban(void)
|
||||||
{
|
{
|
||||||
if (COM_Argc() == 1)
|
if (COM_Argc() < 2)
|
||||||
{
|
{
|
||||||
CONS_Printf(M_GetText("Ban <playername/playernum> <reason>: ban and kick a player\n"));
|
CONS_Printf(M_GetText("Ban <playername/playernum> <reason>: ban and kick a player\n"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!netgame) // Don't kick Tails in splitscreen!
|
||||||
|
{
|
||||||
|
CONS_Printf(M_GetText("This only works in a netgame.\n"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (server || adminplayer == consoleplayer)
|
if (server || adminplayer == consoleplayer)
|
||||||
{
|
{
|
||||||
XBOXSTATIC UINT8 buf[3 + MAX_REASONLENGTH];
|
XBOXSTATIC UINT8 buf[3 + MAX_REASONLENGTH];
|
||||||
|
@ -2540,8 +2546,9 @@ static void Command_Ban(void)
|
||||||
|
|
||||||
if (pn == -1 || pn == 0)
|
if (pn == -1 || pn == 0)
|
||||||
return;
|
return;
|
||||||
else
|
|
||||||
WRITEUINT8(p, pn);
|
WRITEUINT8(p, pn);
|
||||||
|
|
||||||
if (server && I_Ban && !I_Ban(node)) // only the server is allowed to do this right now
|
if (server && I_Ban && !I_Ban(node)) // only the server is allowed to do this right now
|
||||||
{
|
{
|
||||||
CONS_Alert(CONS_WARNING, M_GetText("Too many bans! Geez, that's a lot of people you're excluding...\n"));
|
CONS_Alert(CONS_WARNING, M_GetText("Too many bans! Geez, that's a lot of people you're excluding...\n"));
|
||||||
|
@ -2584,21 +2591,27 @@ static void Command_Ban(void)
|
||||||
|
|
||||||
static void Command_Kick(void)
|
static void Command_Kick(void)
|
||||||
{
|
{
|
||||||
XBOXSTATIC UINT8 buf[3 + MAX_REASONLENGTH];
|
if (COM_Argc() < 2)
|
||||||
UINT8 *p = buf;
|
|
||||||
|
|
||||||
if (COM_Argc() == 1)
|
|
||||||
{
|
{
|
||||||
CONS_Printf(M_GetText("kick <playername/playernum> <reason>: kick a player\n"));
|
CONS_Printf(M_GetText("kick <playername/playernum> <reason>: kick a player\n"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!netgame) // Don't kick Tails in splitscreen!
|
||||||
|
{
|
||||||
|
CONS_Printf(M_GetText("This only works in a netgame.\n"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (server || adminplayer == consoleplayer)
|
if (server || adminplayer == consoleplayer)
|
||||||
{
|
{
|
||||||
|
XBOXSTATIC UINT8 buf[3 + MAX_REASONLENGTH];
|
||||||
|
UINT8 *p = buf;
|
||||||
const SINT8 pn = nametonum(COM_Argv(1));
|
const SINT8 pn = nametonum(COM_Argv(1));
|
||||||
WRITESINT8(p, pn);
|
|
||||||
if (pn == -1 || pn == 0)
|
if (pn == -1 || pn == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Special case if we are trying to kick a player who is downloading the game state:
|
// Special case if we are trying to kick a player who is downloading the game state:
|
||||||
// trigger a timeout instead of kicking them, because a kick would only
|
// trigger a timeout instead of kicking them, because a kick would only
|
||||||
// take effect after they have finished downloading
|
// take effect after they have finished downloading
|
||||||
|
@ -2607,6 +2620,9 @@ static void Command_Kick(void)
|
||||||
Net_ConnectionTimeout(playernode[pn]);
|
Net_ConnectionTimeout(playernode[pn]);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
WRITESINT8(p, pn);
|
||||||
|
|
||||||
if (COM_Argc() == 2)
|
if (COM_Argc() == 2)
|
||||||
{
|
{
|
||||||
WRITEUINT8(p, KICK_MSG_GO_AWAY);
|
WRITEUINT8(p, KICK_MSG_GO_AWAY);
|
||||||
|
|
|
@ -159,6 +159,20 @@ static void Y_CalculateMatchWinners(void);
|
||||||
static void Y_FollowIntermission(void);
|
static void Y_FollowIntermission(void);
|
||||||
static void Y_UnloadData(void);
|
static void Y_UnloadData(void);
|
||||||
|
|
||||||
|
// Stuff copy+pasted from st_stuff.c
|
||||||
|
static INT32 SCX(INT32 x)
|
||||||
|
{
|
||||||
|
return FixedInt(FixedMul(x<<FRACBITS, vid.fdupx));
|
||||||
|
}
|
||||||
|
static INT32 SCY(INT32 z)
|
||||||
|
{
|
||||||
|
return FixedInt(FixedMul(z<<FRACBITS, vid.fdupy));
|
||||||
|
}
|
||||||
|
|
||||||
|
#define ST_DrawNumFromHud(h,n) V_DrawTallNum(SCX(hudinfo[h].x), SCY(hudinfo[h].y), V_NOSCALESTART, n)
|
||||||
|
#define ST_DrawPadNumFromHud(h,n,q) V_DrawPaddedTallNum(SCX(hudinfo[h].x), SCY(hudinfo[h].y), V_NOSCALESTART, n, q)
|
||||||
|
#define ST_DrawPatchFromHud(h,p) V_DrawScaledPatch(SCX(hudinfo[h].x), SCY(hudinfo[h].y), V_NOSCALESTART, p)
|
||||||
|
|
||||||
//
|
//
|
||||||
// Y_IntermissionDrawer
|
// Y_IntermissionDrawer
|
||||||
//
|
//
|
||||||
|
@ -204,28 +218,31 @@ void Y_IntermissionDrawer(void)
|
||||||
INT32 bonusy;
|
INT32 bonusy;
|
||||||
|
|
||||||
// draw score
|
// draw score
|
||||||
V_DrawScaledPatch(hudinfo[HUD_SCORE].x, hudinfo[HUD_SCORE].y, V_SNAPTOLEFT, sboscore);
|
ST_DrawPatchFromHud(HUD_SCORE, sboscore);
|
||||||
V_DrawTallNum(hudinfo[HUD_SCORENUM].x, hudinfo[HUD_SCORENUM].y, V_SNAPTOLEFT, data.coop.score);
|
ST_DrawNumFromHud(HUD_SCORENUM, data.coop.score);
|
||||||
|
|
||||||
// draw time
|
// draw time
|
||||||
V_DrawScaledPatch(hudinfo[HUD_TIME].x, hudinfo[HUD_TIME].y, V_SNAPTOLEFT, sbotime);
|
ST_DrawPatchFromHud(HUD_TIME, sbotime);
|
||||||
if (cv_timetic.value == 1)
|
if (cv_timetic.value == 1)
|
||||||
V_DrawTallNum(hudinfo[HUD_SECONDS].x, hudinfo[HUD_SECONDS].y, V_SNAPTOLEFT, data.coop.tics);
|
ST_DrawNumFromHud(HUD_SECONDS, data.coop.tics);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
INT32 seconds, minutes, tictrn;
|
||||||
|
|
||||||
|
seconds = G_TicsToSeconds(data.coop.tics);
|
||||||
|
minutes = G_TicsToMinutes(data.coop.tics, true);
|
||||||
|
tictrn = G_TicsToCentiseconds(data.coop.tics);
|
||||||
|
|
||||||
|
ST_DrawNumFromHud(HUD_MINUTES, minutes); // Minutes
|
||||||
|
ST_DrawPatchFromHud(HUD_TIMECOLON, sbocolon); // Colon
|
||||||
|
ST_DrawPadNumFromHud(HUD_SECONDS, seconds, 2); // Seconds
|
||||||
|
|
||||||
// we should show centiseconds on the intermission screen too, if the conditions are right.
|
// we should show centiseconds on the intermission screen too, if the conditions are right.
|
||||||
if (modeattacking || cv_timetic.value == 2)
|
if (modeattacking || cv_timetic.value == 2)
|
||||||
{
|
{
|
||||||
V_DrawPaddedTallNum(hudinfo[HUD_TICS].x, hudinfo[HUD_TICS].y, V_SNAPTOLEFT,
|
ST_DrawPatchFromHud(HUD_TIMETICCOLON, sboperiod); // Period
|
||||||
G_TicsToCentiseconds(data.coop.tics), 2);
|
ST_DrawPadNumFromHud(HUD_TICS, tictrn, 2); // Tics
|
||||||
V_DrawScaledPatch(hudinfo[HUD_TIMETICCOLON].x, hudinfo[HUD_TIMETICCOLON].y, V_SNAPTOLEFT, sboperiod);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
V_DrawPaddedTallNum(hudinfo[HUD_SECONDS].x, hudinfo[HUD_SECONDS].y, V_SNAPTOLEFT,
|
|
||||||
G_TicsToSeconds(data.coop.tics), 2);
|
|
||||||
V_DrawScaledPatch(hudinfo[HUD_TIMECOLON].x, hudinfo[HUD_TIMECOLON].y, V_SNAPTOLEFT, sbocolon);
|
|
||||||
V_DrawTallNum(hudinfo[HUD_MINUTES].x, hudinfo[HUD_MINUTES].y, V_SNAPTOLEFT,
|
|
||||||
G_TicsToMinutes(data.coop.tics, false));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// draw the "got through act" lines and act number
|
// draw the "got through act" lines and act number
|
||||||
|
|
Loading…
Reference in a new issue