Merge branch 'awful-mix' of https://git.magicalgirl.moe/SinnamonLat/Kart-Public into awful-mix

This commit is contained in:
Wolfy 2020-04-07 06:41:54 -05:00
commit bbce134afa
3 changed files with 30 additions and 8 deletions

View file

@ -1147,6 +1147,7 @@ static UINT8 cl_challengequestion[MD5_LEN+1];
static char cl_challengepassword[65]; static char cl_challengepassword[65];
static UINT8 cl_challengeanswer[MD5_LEN+1]; static UINT8 cl_challengeanswer[MD5_LEN+1];
static UINT8 cl_challengeattempted = 0; static UINT8 cl_challengeattempted = 0;
static char cl_challengeaddress[64];
// Player name send/load // Player name send/load
@ -2275,6 +2276,8 @@ boolean CL_Responder(event_t *ev)
#ifndef NONET #ifndef NONET
SL_ClearServerList(servernode); SL_ClearServerList(servernode);
if (I_NetMakeNodewPort)
servernode = I_NetMakeNode(cl_challengeaddress);
#endif #endif
cl_mode = CL_SEARCHING; cl_mode = CL_SEARCHING;
@ -3794,7 +3797,7 @@ static void HandleConnect(SINT8 node)
D_MakeJoinPasswordChallenge(&netbuffer->u.joinchallenge.challengenum, netbuffer->u.joinchallenge.question); D_MakeJoinPasswordChallenge(&netbuffer->u.joinchallenge.challengenum, netbuffer->u.joinchallenge.question);
netbuffer->packettype = PT_JOINCHALLENGE; netbuffer->packettype = PT_JOINCHALLENGE;
HSendPacket(node, true, 0, sizeof(joinchallenge_pak)); HSendPacket(node, false, 0, sizeof(joinchallenge_pak));
Net_CloseConnection(node); Net_CloseConnection(node);
return; return;
@ -4017,6 +4020,8 @@ static void HandlePacketFromAwayNode(SINT8 node)
cl_challengenum = netbuffer->u.joinchallenge.challengenum; cl_challengenum = netbuffer->u.joinchallenge.challengenum;
memcpy(cl_challengequestion, netbuffer->u.joinchallenge.question, 16); memcpy(cl_challengequestion, netbuffer->u.joinchallenge.question, 16);
if (I_GetNodeAddress)
strcpy(cl_challengeaddress, I_GetNodeAddress(node));
Net_CloseConnection(node); // Don't need to stay connected while challenging Net_CloseConnection(node); // Don't need to stay connected while challenging
cl_mode = CL_CHALLENGE; cl_mode = CL_CHALLENGE;
@ -4026,6 +4031,10 @@ static void HandlePacketFromAwayNode(SINT8 node)
case 2: case 2:
// We already sent a correct password, so throw it back up again. // We already sent a correct password, so throw it back up again.
D_ComputeChallengeAnswer(cl_challengequestion, cl_challengepassword, cl_challengeanswer); D_ComputeChallengeAnswer(cl_challengequestion, cl_challengepassword, cl_challengeanswer);
#ifndef NONET
if (I_NetMakeNodewPort)
servernode = I_NetMakeNode(cl_challengeaddress);
#endif
cl_mode = CL_ASKJOIN; cl_mode = CL_ASKJOIN;
break; break;

View file

@ -781,6 +781,8 @@ static const char *packettypename[NUMPACKETTYPE] =
{ {
"NOTHING", "NOTHING",
"SERVERCFG", "SERVERCFG",
"CLIENTCMD", "CLIENTCMD",
"CLIENTMIS", "CLIENTMIS",
"CLIENT2CMD", "CLIENT2CMD",
@ -801,6 +803,9 @@ static const char *packettypename[NUMPACKETTYPE] =
"RESYNCHEND", "RESYNCHEND",
"RESYNCHGET", "RESYNCHGET",
"CLIENT3CMD", "CLIENT3CMD",
"CLIENT3MIS", "CLIENT3MIS",
"CLIENT4CMD", "CLIENT4CMD",
@ -811,13 +816,20 @@ static const char *packettypename[NUMPACKETTYPE] =
"DOWNLOADFILESOKAY", "DOWNLOADFILESOKAY",
"FILEFRAGMENT", "FILEFRAGMENT",
"TEXTCMD", "TEXTCMD",
"TEXTCMD2", "TEXTCMD2",
"TEXTCMD3", "TEXTCMD3",
"TEXTCMD4", "TEXTCMD4",
"CLIENTJOIN", "CLIENTJOIN",
"NODETIMEOUT", "NODETIMEOUT",
"RESYNCHING", "RESYNCHING",
"TELLFILESNEEDED",
"MOREFILESNEEDED",
"PING" "PING"
}; };
@ -1159,7 +1171,8 @@ boolean HGetPacket(void)
|| netbuffer->packettype == PT_PLAYERINFO || netbuffer->packettype == PT_PLAYERINFO
|| netbuffer->packettype == PT_REQUESTFILE || netbuffer->packettype == PT_REQUESTFILE
|| netbuffer->packettype == PT_ASKINFOVIAMS || netbuffer->packettype == PT_ASKINFOVIAMS
|| netbuffer->packettype == PT_CLIENTJOIN)) || netbuffer->packettype == PT_CLIENTJOIN
|| netbuffer->packettype == PT_TELLFILESNEEDED))
{ {
DEBFILE(va("New node sent an unexpected %s packet\n", packettypename[netbuffer->packettype])); DEBFILE(va("New node sent an unexpected %s packet\n", packettypename[netbuffer->packettype]));
CONS_Alert(CONS_NOTICE, "New node sent an unexpected %s packet\n", packettypename[netbuffer->packettype]); CONS_Alert(CONS_NOTICE, "New node sent an unexpected %s packet\n", packettypename[netbuffer->packettype]);

View file

@ -3159,11 +3159,11 @@ static mobj_t *K_ThrowKartItem(player_t *player, boolean missile, mobjtype_t map
if (dir == -1) if (dir == -1)
{ {
// Shoot backward // Shoot backward
mo = K_SpawnKartMissile(player->mo, mapthing, player->mo->angle + ANGLE_180 - 0x06000000, 0, PROJSPEED/4); mo = K_SpawnKartMissile(player->mo, mapthing, player->mo->angle + ANGLE_180 - 0x06000000, 0, PROJSPEED/16);
K_SpawnKartMissile(player->mo, mapthing, player->mo->angle + ANGLE_180 - 0x03000000, 0, PROJSPEED/4); K_SpawnKartMissile(player->mo, mapthing, player->mo->angle + ANGLE_180 - 0x03000000, 0, PROJSPEED/16);
K_SpawnKartMissile(player->mo, mapthing, player->mo->angle + ANGLE_180, 0, PROJSPEED/4); K_SpawnKartMissile(player->mo, mapthing, player->mo->angle + ANGLE_180, 0, PROJSPEED/16);
K_SpawnKartMissile(player->mo, mapthing, player->mo->angle + ANGLE_180 + 0x03000000, 0, PROJSPEED/4); K_SpawnKartMissile(player->mo, mapthing, player->mo->angle + ANGLE_180 + 0x03000000, 0, PROJSPEED/16);
K_SpawnKartMissile(player->mo, mapthing, player->mo->angle + ANGLE_180 + 0x06000000, 0, PROJSPEED/4); K_SpawnKartMissile(player->mo, mapthing, player->mo->angle + ANGLE_180 + 0x06000000, 0, PROJSPEED/16);
} }
else else
{ {
@ -3180,7 +3180,7 @@ static mobj_t *K_ThrowKartItem(player_t *player, boolean missile, mobjtype_t map
if (dir == -1 && mapthing != MT_SPB) if (dir == -1 && mapthing != MT_SPB)
{ {
// Shoot backward // Shoot backward
mo = K_SpawnKartMissile(player->mo, mapthing, player->mo->angle + ANGLE_180, 0, PROJSPEED/2); mo = K_SpawnKartMissile(player->mo, mapthing, player->mo->angle + ANGLE_180, 0, PROJSPEED/8);
} }
else else
{ {