Merge branch 'master' of git@git.magicalgirl.moe:KartKrew/Kart.git

This commit is contained in:
Sryder 2018-11-16 17:19:08 +00:00
commit df90530eba
5 changed files with 28 additions and 24 deletions

View File

@ -1305,7 +1305,7 @@ static void SV_SendServerInfo(INT32 node, tic_t servertime)
netbuffer->u.serverinfo.numberofplayer = (UINT8)D_NumPlayers(); netbuffer->u.serverinfo.numberofplayer = (UINT8)D_NumPlayers();
netbuffer->u.serverinfo.maxplayer = (UINT8)cv_maxplayers.value; netbuffer->u.serverinfo.maxplayer = (UINT8)cv_maxplayers.value;
netbuffer->u.serverinfo.gametype = (UINT8)gametype; netbuffer->u.serverinfo.gametype = (UINT8)(G_BattleGametype() ? 3 : 2); // SRB2Kart: Vanilla's gametype constants for MS support
netbuffer->u.serverinfo.modifiedgame = (UINT8)modifiedgame; netbuffer->u.serverinfo.modifiedgame = (UINT8)modifiedgame;
netbuffer->u.serverinfo.cheatsenabled = CV_CheatsEnabled(); netbuffer->u.serverinfo.cheatsenabled = CV_CheatsEnabled();
netbuffer->u.serverinfo.isdedicated = (UINT8)dedicated; netbuffer->u.serverinfo.isdedicated = (UINT8)dedicated;
@ -1395,7 +1395,8 @@ static void SV_SendPlayerInfo(INT32 node)
netbuffer->u.playerinfo[i].skin = (UINT8)players[i].skin; netbuffer->u.playerinfo[i].skin = (UINT8)players[i].skin;
// Extra data // Extra data
netbuffer->u.playerinfo[i].data = players[i].skincolor; // Kart has extra skincolors, so we can't use this
netbuffer->u.playerinfo[i].data = 0; //netbuffer->u.playerinfo[i].data = players[i].skincolor;
if (players[i].pflags & PF_TAGIT) if (players[i].pflags & PF_TAGIT)
netbuffer->u.playerinfo[i].data |= 0x20; netbuffer->u.playerinfo[i].data |= 0x20;
@ -1444,10 +1445,9 @@ static boolean SV_SendServerConfig(INT32 node)
for (i = 0; i < MAXPLAYERS; i++) for (i = 0; i < MAXPLAYERS; i++)
{ {
netbuffer->u.servercfg.adminplayers[i] = (SINT8)adminplayers[i];
if (!playeringame[i]) if (!playeringame[i])
continue; continue;
netbuffer->u.servercfg.adminplayers[i] = (SINT8)adminplayers[i];
netbuffer->u.servercfg.playerskins[i] = (UINT8)players[i].skin; netbuffer->u.servercfg.playerskins[i] = (UINT8)players[i].skin;
netbuffer->u.servercfg.playercolor[i] = (UINT8)players[i].skincolor; netbuffer->u.servercfg.playercolor[i] = (UINT8)players[i].skincolor;
} }
@ -4510,18 +4510,23 @@ static INT16 Consistancy(void)
static void CL_SendClientCmd(void) static void CL_SendClientCmd(void)
{ {
size_t packetsize = 0; size_t packetsize = 0;
boolean mis = false;
netbuffer->packettype = PT_CLIENTCMD; netbuffer->packettype = PT_CLIENTCMD;
if (cl_packetmissed) if (cl_packetmissed)
netbuffer->packettype++; {
netbuffer->packettype = PT_CLIENTMIS;
mis = true;
}
netbuffer->u.clientpak.resendfrom = (UINT8)(neededtic & UINT8_MAX); netbuffer->u.clientpak.resendfrom = (UINT8)(neededtic & UINT8_MAX);
netbuffer->u.clientpak.client_tic = (UINT8)(gametic & UINT8_MAX); netbuffer->u.clientpak.client_tic = (UINT8)(gametic & UINT8_MAX);
if (gamestate == GS_WAITINGPLAYERS) if (gamestate == GS_WAITINGPLAYERS)
{ {
// Send PT_NODEKEEPALIVE packet // Send PT_NODEKEEPALIVE packet
netbuffer->packettype += 8; netbuffer->packettype = (mis ? PT_NODEKEEPALIVEMIS : PT_NODEKEEPALIVE);
packetsize = sizeof (clientcmd_pak) - sizeof (ticcmd_t) - sizeof (INT16); packetsize = sizeof (clientcmd_pak) - sizeof (ticcmd_t) - sizeof (INT16);
HSendPacket(servernode, false, 0, packetsize); HSendPacket(servernode, false, 0, packetsize);
} }
@ -4532,15 +4537,15 @@ static void CL_SendClientCmd(void)
if (splitscreen || botingame) // Send a special packet with 2 cmd for splitscreen if (splitscreen || botingame) // Send a special packet with 2 cmd for splitscreen
{ {
netbuffer->packettype += 2; netbuffer->packettype = (mis ? PT_CLIENT2MIS : PT_CLIENT2CMD);
G_MoveTiccmd(&netbuffer->u.client2pak.cmd2, &localcmds2, 1); G_MoveTiccmd(&netbuffer->u.client2pak.cmd2, &localcmds2, 1);
if (splitscreen > 1) if (splitscreen > 1)
{ {
netbuffer->packettype += 2; netbuffer->packettype = (mis ? PT_CLIENT3MIS : PT_CLIENT3CMD);
G_MoveTiccmd(&netbuffer->u.client3pak.cmd3, &localcmds3, 1); G_MoveTiccmd(&netbuffer->u.client3pak.cmd3, &localcmds3, 1);
if (splitscreen > 2) if (splitscreen > 2)
{ {
netbuffer->packettype += 2; netbuffer->packettype = (mis ? PT_CLIENT4MIS : PT_CLIENT4CMD);
G_MoveTiccmd(&netbuffer->u.client4pak.cmd4, &localcmds4, 1); G_MoveTiccmd(&netbuffer->u.client4pak.cmd4, &localcmds4, 1);
packetsize = sizeof (client4cmd_pak); packetsize = sizeof (client4cmd_pak);
} }

View File

@ -40,10 +40,6 @@ typedef enum
PT_CLIENTMIS, // Same as above with but saying resend from. PT_CLIENTMIS, // Same as above with but saying resend from.
PT_CLIENT2CMD, // 2 cmds in the packet for splitscreen. PT_CLIENT2CMD, // 2 cmds in the packet for splitscreen.
PT_CLIENT2MIS, // Same as above with but saying resend from PT_CLIENT2MIS, // Same as above with but saying resend from
PT_CLIENT3CMD, // 3P
PT_CLIENT3MIS,
PT_CLIENT4CMD, // 4P
PT_CLIENT4MIS,
PT_NODEKEEPALIVE, // Same but without ticcmd and consistancy PT_NODEKEEPALIVE, // Same but without ticcmd and consistancy
PT_NODEKEEPALIVEMIS, PT_NODEKEEPALIVEMIS,
PT_SERVERTICS, // All cmds for the tic. PT_SERVERTICS, // All cmds for the tic.
@ -79,6 +75,13 @@ typedef enum
#ifdef NEWPING #ifdef NEWPING
PT_PING, // Packet sent to tell clients the other client's latency to server. PT_PING, // Packet sent to tell clients the other client's latency to server.
#endif #endif
// Kart-specific packets
PT_CLIENT3CMD, // 3P
PT_CLIENT3MIS,
PT_CLIENT4CMD, // 4P
PT_CLIENT4MIS,
NUMPACKETTYPE NUMPACKETTYPE
} packettype_t; } packettype_t;
@ -358,7 +361,7 @@ typedef struct
UINT8 cheatsenabled; UINT8 cheatsenabled;
UINT8 isdedicated; UINT8 isdedicated;
UINT8 fileneedednum; UINT8 fileneedednum;
SINT8 adminplayers[MAXPLAYERS]; SINT8 adminplayer;
tic_t time; tic_t time;
tic_t leveltime; tic_t leveltime;
char servername[MAXSERVERNAME]; char servername[MAXSERVERNAME];

View File

@ -8420,7 +8420,7 @@ struct {
{"TOL_2D",TOL_2D}, {"TOL_2D",TOL_2D},
{"TOL_MARIO",TOL_MARIO}, {"TOL_MARIO",TOL_MARIO},
{"TOL_NIGHTS",TOL_NIGHTS}, {"TOL_NIGHTS",TOL_NIGHTS},
//{"TOL_ERZ3",TOL_ERZ3}, {"TOL_TV",TOL_TV},
{"TOL_XMAS",TOL_XMAS}, {"TOL_XMAS",TOL_XMAS},
//{"TOL_KART",TOL_KART}, //{"TOL_KART",TOL_KART},
@ -8551,14 +8551,8 @@ struct {
{"PAL_NUKE",PAL_NUKE}, {"PAL_NUKE",PAL_NUKE},
// Gametypes, for use with global var "gametype" // Gametypes, for use with global var "gametype"
{"GT_COOP",GT_COOP},
{"GT_COMPETITION",GT_COMPETITION},
{"GT_RACE",GT_RACE}, {"GT_RACE",GT_RACE},
{"GT_MATCH",GT_MATCH}, {"GT_MATCH",GT_MATCH},
{"GT_TEAMMATCH",GT_TEAMMATCH},
{"GT_TAG",GT_TAG},
{"GT_HIDEANDSEEK",GT_HIDEANDSEEK},
{"GT_CTF",GT_CTF},
// Player state (playerstate_t) // Player state (playerstate_t)
{"PST_LIVE",PST_LIVE}, // Playing or camping. {"PST_LIVE",PST_LIVE}, // Playing or camping.

View File

@ -301,7 +301,7 @@ enum TypeOfLevel
TOL_2D = 0x0100, ///< 2D TOL_2D = 0x0100, ///< 2D
TOL_MARIO = 0x0200, ///< Mario TOL_MARIO = 0x0200, ///< Mario
TOL_NIGHTS = 0x0400, ///< NiGHTS TOL_NIGHTS = 0x0400, ///< NiGHTS
TOL_TV = 0x0800, ///< Midnight Channel specific: draw TV like overlay on HUD TOL_TV = 0x0800, ///< Midnight Channel specific: draw TV like overlay on HUD
TOL_XMAS = 0x1000 ///< Christmas NiGHTS TOL_XMAS = 0x1000 ///< Christmas NiGHTS
//TOL_KART = 0x4000 ///< Kart 32768 //TOL_KART = 0x4000 ///< Kart 32768
}; };
@ -313,6 +313,7 @@ enum GameType // SRB2Kart
GT_MATCH, // battle, but renaming would be silly GT_MATCH, // battle, but renaming would be silly
NUMGAMETYPES, NUMGAMETYPES,
// TODO: This is *horrid*. Remove this hack ASAP.
// the following have been left in on account of just not wanting to deal with removing all the checks for them // the following have been left in on account of just not wanting to deal with removing all the checks for them
GT_COOP, GT_COOP,
GT_COMPETITION, GT_COMPETITION,

View File

@ -499,7 +499,7 @@ static const char *credits[] = {
"Jun Senoue", "Jun Senoue",
"\"SSNTails\"", "\"SSNTails\"",
"Michael \"MaxieDaMan\" Staple", "Michael \"MaxieDaMan\" Staple",
"Simon Stålenhag", // Stålenhag, add the accent char later? "Simon Stalenhag", // Stålenhag, add the accent char later?
"\"Synthescissor\"", "\"Synthescissor\"",
"Yuko Takehara", "Yuko Takehara",
"Tony Thai", "Tony Thai",
@ -522,6 +522,7 @@ static const char *credits[] = {
"\"DrTapeworm\"", "\"DrTapeworm\"",
"Paul \"Boinciel\" Clempson", "Paul \"Boinciel\" Clempson",
"Sherman \"CoatRack\" DesJardins", "Sherman \"CoatRack\" DesJardins",
"Vivian \"toaster\" Grannell",
"James \"SeventhSentinel\" Hall", "James \"SeventhSentinel\" Hall",
"\"Lat\'\"", "\"Lat\'\"",
"Sean \"Sryder\" Ryder", "Sean \"Sryder\" Ryder",
@ -580,7 +581,7 @@ static struct {
// This Tyler52 gag is troublesome // This Tyler52 gag is troublesome
// Alignment should be ((spaces+1 * 100) + (headers+1 * 38) + (lines * 15)) // Alignment should be ((spaces+1 * 100) + (headers+1 * 38) + (lines * 15))
// Current max image spacing: (200*17) // Current max image spacing: (200*17)
{112, (15*100)+(17*38)+(96*15), "TYLER52", SKINCOLOR_NONE}, {112, (15*100)+(17*38)+(97*15), "TYLER52", SKINCOLOR_NONE},
{0, 0, NULL, SKINCOLOR_NONE} {0, 0, NULL, SKINCOLOR_NONE}
}; };