Commit df90530e by Sryder

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

parents 0a1c4ef8 e85e621d
......@@ -1305,7 +1305,7 @@ static void SV_SendServerInfo(INT32 node, tic_t servertime)
netbuffer->u.serverinfo.numberofplayer = (UINT8)D_NumPlayers();
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.cheatsenabled = CV_CheatsEnabled();
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;
// 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)
netbuffer->u.playerinfo[i].data |= 0x20;
......@@ -1444,10 +1445,9 @@ static boolean SV_SendServerConfig(INT32 node)
for (i = 0; i < MAXPLAYERS; i++)
{
netbuffer->u.servercfg.adminplayers[i] = (SINT8)adminplayers[i];
if (!playeringame[i])
continue;
netbuffer->u.servercfg.adminplayers[i] = (SINT8)adminplayers[i];
netbuffer->u.servercfg.playerskins[i] = (UINT8)players[i].skin;
netbuffer->u.servercfg.playercolor[i] = (UINT8)players[i].skincolor;
}
......@@ -4510,18 +4510,23 @@ static INT16 Consistancy(void)
static void CL_SendClientCmd(void)
{
size_t packetsize = 0;
boolean mis = false;
netbuffer->packettype = PT_CLIENTCMD;
if (cl_packetmissed)
netbuffer->packettype++;
{
netbuffer->packettype = PT_CLIENTMIS;
mis = true;
}
netbuffer->u.clientpak.resendfrom = (UINT8)(neededtic & UINT8_MAX);
netbuffer->u.clientpak.client_tic = (UINT8)(gametic & UINT8_MAX);
if (gamestate == GS_WAITINGPLAYERS)
{
// Send PT_NODEKEEPALIVE packet
netbuffer->packettype += 8;
netbuffer->packettype = (mis ? PT_NODEKEEPALIVEMIS : PT_NODEKEEPALIVE);
packetsize = sizeof (clientcmd_pak) - sizeof (ticcmd_t) - sizeof (INT16);
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
{
netbuffer->packettype += 2;
netbuffer->packettype = (mis ? PT_CLIENT2MIS : PT_CLIENT2CMD);
G_MoveTiccmd(&netbuffer->u.client2pak.cmd2, &localcmds2, 1);
if (splitscreen > 1)
{
netbuffer->packettype += 2;
netbuffer->packettype = (mis ? PT_CLIENT3MIS : PT_CLIENT3CMD);
G_MoveTiccmd(&netbuffer->u.client3pak.cmd3, &localcmds3, 1);
if (splitscreen > 2)
{
netbuffer->packettype += 2;
netbuffer->packettype = (mis ? PT_CLIENT4MIS : PT_CLIENT4CMD);
G_MoveTiccmd(&netbuffer->u.client4pak.cmd4, &localcmds4, 1);
packetsize = sizeof (client4cmd_pak);
}
......
......@@ -40,10 +40,6 @@ typedef enum
PT_CLIENTMIS, // Same as above with but saying resend from.
PT_CLIENT2CMD, // 2 cmds in the packet for splitscreen.
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_NODEKEEPALIVEMIS,
PT_SERVERTICS, // All cmds for the tic.
......@@ -79,6 +75,13 @@ typedef enum
#ifdef NEWPING
PT_PING, // Packet sent to tell clients the other client's latency to server.
#endif
// Kart-specific packets
PT_CLIENT3CMD, // 3P
PT_CLIENT3MIS,
PT_CLIENT4CMD, // 4P
PT_CLIENT4MIS,
NUMPACKETTYPE
} packettype_t;
......@@ -358,7 +361,7 @@ typedef struct
UINT8 cheatsenabled;
UINT8 isdedicated;
UINT8 fileneedednum;
SINT8 adminplayers[MAXPLAYERS];
SINT8 adminplayer;
tic_t time;
tic_t leveltime;
char servername[MAXSERVERNAME];
......
......@@ -8420,7 +8420,7 @@ struct {
{"TOL_2D",TOL_2D},
{"TOL_MARIO",TOL_MARIO},
{"TOL_NIGHTS",TOL_NIGHTS},
//{"TOL_ERZ3",TOL_ERZ3},
{"TOL_TV",TOL_TV},
{"TOL_XMAS",TOL_XMAS},
//{"TOL_KART",TOL_KART},
......@@ -8551,14 +8551,8 @@ struct {
{"PAL_NUKE",PAL_NUKE},
// Gametypes, for use with global var "gametype"
{"GT_COOP",GT_COOP},
{"GT_COMPETITION",GT_COMPETITION},
{"GT_RACE",GT_RACE},
{"GT_MATCH",GT_MATCH},
{"GT_TEAMMATCH",GT_TEAMMATCH},
{"GT_TAG",GT_TAG},
{"GT_HIDEANDSEEK",GT_HIDEANDSEEK},
{"GT_CTF",GT_CTF},
// Player state (playerstate_t)
{"PST_LIVE",PST_LIVE}, // Playing or camping.
......
......@@ -301,7 +301,7 @@ enum TypeOfLevel
TOL_2D = 0x0100, ///< 2D
TOL_MARIO = 0x0200, ///< Mario
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_KART = 0x4000 ///< Kart 32768
};
......@@ -313,6 +313,7 @@ enum GameType // SRB2Kart
GT_MATCH, // battle, but renaming would be silly
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
GT_COOP,
GT_COMPETITION,
......
......@@ -499,7 +499,7 @@ static const char *credits[] = {
"Jun Senoue",
"\"SSNTails\"",
"Michael \"MaxieDaMan\" Staple",
"Simon Stålenhag", // Stålenhag, add the accent char later?
"Simon Stalenhag", // Stålenhag, add the accent char later?
"\"Synthescissor\"",
"Yuko Takehara",
"Tony Thai",
......@@ -522,6 +522,7 @@ static const char *credits[] = {
"\"DrTapeworm\"",
"Paul \"Boinciel\" Clempson",
"Sherman \"CoatRack\" DesJardins",
"Vivian \"toaster\" Grannell",
"James \"SeventhSentinel\" Hall",
"\"Lat\'\"",
"Sean \"Sryder\" Ryder",
......@@ -580,7 +581,7 @@ static struct {
// This Tyler52 gag is troublesome
// Alignment should be ((spaces+1 * 100) + (headers+1 * 38) + (lines * 15))
// 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}
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment