mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-01-17 23:21:05 +00:00
Heyyyy, this fixes controls not registering :D
This commit is contained in:
parent
fc9d426660
commit
b820d47b63
3 changed files with 42 additions and 7 deletions
|
@ -3731,8 +3731,12 @@ FILESTAMP
|
|||
break;
|
||||
case PT_CLIENTCMD:
|
||||
case PT_CLIENT2CMD:
|
||||
case PT_CLIENT3CMD:
|
||||
case PT_CLIENT4CMD:
|
||||
case PT_CLIENTMIS:
|
||||
case PT_CLIENT2MIS:
|
||||
case PT_CLIENT3MIS:
|
||||
case PT_CLIENT4MIS:
|
||||
case PT_NODEKEEPALIVE:
|
||||
case PT_NODEKEEPALIVEMIS:
|
||||
if (client)
|
||||
|
@ -3793,10 +3797,23 @@ FILESTAMP
|
|||
}
|
||||
|
||||
// Splitscreen cmd
|
||||
if ((netbuffer->packettype == PT_CLIENT2CMD || netbuffer->packettype == PT_CLIENT2MIS)
|
||||
if (((netbuffer->packettype == PT_CLIENT2CMD || netbuffer->packettype == PT_CLIENT2MIS)
|
||||
|| (netbuffer->packettype == PT_CLIENT3CMD || netbuffer->packettype == PT_CLIENT3MIS)
|
||||
|| (netbuffer->packettype == PT_CLIENT4CMD || netbuffer->packettype == PT_CLIENT4MIS))
|
||||
&& nodetoplayer2[node] >= 0)
|
||||
G_MoveTiccmd(&netcmds[maketic%BACKUPTICS][(UINT8)nodetoplayer2[node]],
|
||||
&netbuffer->u.client2pak.cmd2, 1);
|
||||
|
||||
if (((netbuffer->packettype == PT_CLIENT3CMD || netbuffer->packettype == PT_CLIENT3MIS)
|
||||
|| (netbuffer->packettype == PT_CLIENT4CMD || netbuffer->packettype == PT_CLIENT4MIS))
|
||||
&& nodetoplayer3[node] >= 0)
|
||||
G_MoveTiccmd(&netcmds[maketic%BACKUPTICS][(UINT8)nodetoplayer3[node]],
|
||||
&netbuffer->u.client3pak.cmd3, 1);
|
||||
|
||||
if ((netbuffer->packettype == PT_CLIENT4CMD || netbuffer->packettype == PT_CLIENT4MIS)
|
||||
&& nodetoplayer4[node] >= 0)
|
||||
G_MoveTiccmd(&netcmds[maketic%BACKUPTICS][(UINT8)nodetoplayer4[node]],
|
||||
&netbuffer->u.client4pak.cmd4, 1);
|
||||
|
||||
// A delay before we check resynching
|
||||
// Used on join or just after a synch fail
|
||||
|
@ -4318,8 +4335,20 @@ static void CL_SendClientCmd(void)
|
|||
G_MoveTiccmd(&netbuffer->u.clientpak.cmd, &localcmds, 1);
|
||||
netbuffer->u.clientpak.consistancy = SHORT(consistancy[gametic%BACKUPTICS]);
|
||||
|
||||
// Send a special packet with 2 cmd for splitscreen
|
||||
if (splitscreen || botingame)
|
||||
if (splitscreen4)
|
||||
{
|
||||
netbuffer->packettype += 6;
|
||||
G_MoveTiccmd(&netbuffer->u.client4pak.cmd2, &localcmds2, 1);
|
||||
G_MoveTiccmd(&netbuffer->u.client4pak.cmd3, &localcmds3, 1);
|
||||
G_MoveTiccmd(&netbuffer->u.client4pak.cmd4, &localcmds4, 1);
|
||||
}
|
||||
else if (splitscreen3)
|
||||
{
|
||||
netbuffer->packettype += 4;
|
||||
G_MoveTiccmd(&netbuffer->u.client3pak.cmd2, &localcmds2, 1);
|
||||
G_MoveTiccmd(&netbuffer->u.client3pak.cmd3, &localcmds3, 1);
|
||||
}
|
||||
else if (splitscreen || botingame) // Send a special packet with 2 cmd for splitscreen
|
||||
{
|
||||
netbuffer->packettype += 2;
|
||||
G_MoveTiccmd(&netbuffer->u.client2pak.cmd2, &localcmds2, 1);
|
||||
|
|
|
@ -40,6 +40,10 @@ 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.
|
||||
|
@ -109,7 +113,6 @@ typedef struct
|
|||
ticcmd_t cmd, cmd2;
|
||||
} ATTRPACK client2cmd_pak;
|
||||
|
||||
/*
|
||||
// Splitscreen3 packet
|
||||
// WARNING: must have the same format of clientcmd_pak, for more easy use
|
||||
typedef struct
|
||||
|
@ -129,7 +132,6 @@ typedef struct
|
|||
INT16 consistancy;
|
||||
ticcmd_t cmd, cmd2, cmd3, cmd4;
|
||||
} ATTRPACK client4cmd_pak;
|
||||
*/
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(disable : 4200)
|
||||
|
@ -421,8 +423,8 @@ typedef struct
|
|||
{
|
||||
clientcmd_pak clientpak; // 144 bytes
|
||||
client2cmd_pak client2pak; // 200 bytes
|
||||
//client3cmd_pak client3pak; // 256 bytes(?)
|
||||
//client4cmd_pak client4pak; // 312 bytes(?)
|
||||
client3cmd_pak client3pak; // 256 bytes(?)
|
||||
client4cmd_pak client4pak; // 312 bytes(?)
|
||||
servertics_pak serverpak; // 132495 bytes (more around 360, no?)
|
||||
serverconfig_pak servercfg; // 773 bytes
|
||||
resynchend_pak resynchend; //
|
||||
|
|
|
@ -882,8 +882,12 @@ static void DebugPrintpacket(const char *header)
|
|||
}
|
||||
case PT_CLIENTCMD:
|
||||
case PT_CLIENT2CMD:
|
||||
case PT_CLIENT3CMD:
|
||||
case PT_CLIENT4CMD:
|
||||
case PT_CLIENTMIS:
|
||||
case PT_CLIENT2MIS:
|
||||
case PT_CLIENT3MIS:
|
||||
case PT_CLIENT4MIS:
|
||||
case PT_NODEKEEPALIVE:
|
||||
case PT_NODEKEEPALIVEMIS:
|
||||
fprintf(debugfile, " tic %4u resendfrom %u\n",
|
||||
|
|
Loading…
Reference in a new issue