Compare commits
31
Commits
fixuphwbsp
...
fixupnet
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
48d9b2bc98 | ||
|
|
939bf588b3 | ||
|
|
cb2e017bcf | ||
|
|
d91fbf5d36 | ||
|
|
9859e43be7 | ||
|
|
306fec6f9e | ||
|
|
3e8b3e868b | ||
|
|
9261d9c5b2 | ||
|
|
f97941f86e | ||
|
|
a4810bd6c8 | ||
|
|
93cbba218a | ||
|
|
a658883664 | ||
|
|
d94c10014f | ||
|
|
9fb3f4c9a3 | ||
|
|
b0653416f6 | ||
|
|
d1a6394e52 | ||
|
|
ccc90842a7 | ||
|
|
dc069d7bb5 | ||
|
|
f4a827dfc2 | ||
|
|
4f3232b6cc | ||
|
|
3685502edf | ||
|
|
f87bcef079 | ||
|
|
c3458afe2b | ||
|
|
17bc8a4a36 | ||
|
|
b04f017ab6 | ||
|
|
083ddb6396 | ||
|
|
c3129742c3 | ||
|
|
877bd640f3 | ||
|
|
3233df9c6c | ||
|
|
9ad5f5189c | ||
|
|
c7718dea79 |
No files matched your search
+832
-700
File diff suppressed because it is too large.
Load diff
+2
-3
@@ -42,8 +42,8 @@ applications may follow different packet versions.
|
|||||||
#define VANILLA_GT_MATCH 3
|
#define VANILLA_GT_MATCH 3
|
||||||
|
|
||||||
// Networking and tick handling related.
|
// Networking and tick handling related.
|
||||||
#define BACKUPTICS 32
|
#define BACKUPTICS 512 // more than enough for most timeouts....
|
||||||
#define TICQUEUE 512 // more than enough for most timeouts....
|
#define CLIENTBACKUPTICS 32
|
||||||
#define MAXTEXTCMD 256
|
#define MAXTEXTCMD 256
|
||||||
|
|
||||||
// No. of tics your controls can be delayed by.
|
// No. of tics your controls can be delayed by.
|
||||||
@@ -533,7 +533,6 @@ extern UINT32 serverlistultimatecount;
|
|||||||
extern INT32 mapchangepending;
|
extern INT32 mapchangepending;
|
||||||
|
|
||||||
// Points inside doomcom
|
// Points inside doomcom
|
||||||
extern doomdata_t *netbuffer;
|
|
||||||
extern consvar_t cv_stunserver;
|
extern consvar_t cv_stunserver;
|
||||||
extern consvar_t cv_httpsource;
|
extern consvar_t cv_httpsource;
|
||||||
extern consvar_t cv_kicktime;
|
extern consvar_t cv_kicktime;
|
||||||
|
|||||||
+21
-3
@@ -152,6 +152,8 @@ boolean dedicated = false;
|
|||||||
|
|
||||||
boolean loaded_config = false; // true once config.cfg loaded AND executed
|
boolean loaded_config = false; // true once config.cfg loaded AND executed
|
||||||
|
|
||||||
|
static void D_CleanFile(char **filearray);
|
||||||
|
|
||||||
//
|
//
|
||||||
// D_PostEvent
|
// D_PostEvent
|
||||||
// Called by the I/O functions when input is detected
|
// Called by the I/O functions when input is detected
|
||||||
@@ -896,9 +898,25 @@ void D_SRB2Loop(void)
|
|||||||
rendertimefrac_unpaused = FRACUNIT;
|
rendertimefrac_unpaused = FRACUNIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((interp || doDisplay) && !frameskip)
|
|
||||||
|
if (interp || doDisplay)
|
||||||
{
|
{
|
||||||
ranwipe = D_Display();
|
if (!frameskip)
|
||||||
|
{
|
||||||
|
ranwipe = D_Display();
|
||||||
|
}
|
||||||
|
else if (frameskip)
|
||||||
|
{
|
||||||
|
// always update console and hud
|
||||||
|
// otherwise it may take minutes to open it
|
||||||
|
CON_Drawer();
|
||||||
|
|
||||||
|
if (gamestate == GS_LEVEL)
|
||||||
|
{
|
||||||
|
ST_Drawer();
|
||||||
|
HU_Drawer();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Only take screenshots after drawing.
|
// Only take screenshots after drawing.
|
||||||
@@ -1215,7 +1233,7 @@ void D_AddPostloadFiles(void)
|
|||||||
postautoloaded = true;
|
postautoloaded = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void D_CleanFile(char **filearray)
|
static void D_CleanFile(char **filearray)
|
||||||
{
|
{
|
||||||
size_t pnumwadfiles;
|
size_t pnumwadfiles;
|
||||||
for (pnumwadfiles = 0; filearray[pnumwadfiles]; pnumwadfiles++)
|
for (pnumwadfiles = 0; filearray[pnumwadfiles]; pnumwadfiles++)
|
||||||
|
|||||||
@@ -85,8 +85,6 @@ void D_PostEvent(const event_t *ev);
|
|||||||
|
|
||||||
void D_ProcessEvents(void);
|
void D_ProcessEvents(void);
|
||||||
|
|
||||||
void D_CleanFile(char **filearray);
|
|
||||||
|
|
||||||
const char *D_Home(void);
|
const char *D_Home(void);
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|||||||
+34
-29
@@ -48,12 +48,6 @@ tic_t connectiontimeout = (10*TICRATE);
|
|||||||
|
|
||||||
/// \brief network packet
|
/// \brief network packet
|
||||||
doomcom_t *doomcom = NULL;
|
doomcom_t *doomcom = NULL;
|
||||||
/// \brief network packet data, points inside doomcom
|
|
||||||
doomdata_t *netbuffer = NULL;
|
|
||||||
/// \brief hole punching packet, also points inside doomcom
|
|
||||||
#ifdef HOLEPUNCH
|
|
||||||
holepunch_t *holepunchpacket = NULL;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef DEBUGFILE
|
#ifdef DEBUGFILE
|
||||||
FILE *debugfile = NULL; // put some net info in a file during the game
|
FILE *debugfile = NULL; // put some net info in a file during the game
|
||||||
@@ -209,13 +203,9 @@ static node_t nodes[MAXNETNODES];
|
|||||||
// 0 if a = n (mod 256)
|
// 0 if a = n (mod 256)
|
||||||
// >0 if a > b (mod 256)
|
// >0 if a > b (mod 256)
|
||||||
// mnemonic: to use it compare to 0: cmpack(a,b)<0 is "a < b" ...
|
// mnemonic: to use it compare to 0: cmpack(a,b)<0 is "a < b" ...
|
||||||
FUNCMATH static INT32 cmpack(UINT8 a, UINT8 b)
|
FUNCMATH static inline INT32 cmpack(UINT8 a, UINT8 b)
|
||||||
{
|
{
|
||||||
register INT32 d = a - b;
|
return (SINT8)(a - b);
|
||||||
|
|
||||||
if (d >= 127 || d < -128)
|
|
||||||
return -d;
|
|
||||||
return d;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Sets freeack to a free acknum and copies the netbuffer in the ackpak table
|
/** Sets freeack to a free acknum and copies the netbuffer in the ackpak table
|
||||||
@@ -229,6 +219,8 @@ static boolean GetFreeAcknum(UINT8 *freeack)
|
|||||||
node_t *node = &nodes[doomcom->remotenode];
|
node_t *node = &nodes[doomcom->remotenode];
|
||||||
INT32 i, numfreeslot = 0;
|
INT32 i, numfreeslot = 0;
|
||||||
|
|
||||||
|
doomdata_t *netbuffer = DOOMCOM_DATA(doomcom);
|
||||||
|
|
||||||
if (cmpack((UINT8)((node->remotefirstack + MAXACKTOSEND) % 256), node->nextacknum) < 0)
|
if (cmpack((UINT8)((node->remotefirstack + MAXACKTOSEND) % 256), node->nextacknum) < 0)
|
||||||
{
|
{
|
||||||
DEBFILE(va("too fast %d %d\n",node->remotefirstack,node->nextacknum));
|
DEBFILE(va("too fast %d %d\n",node->remotefirstack,node->nextacknum));
|
||||||
@@ -298,6 +290,7 @@ static boolean Processackpak(void)
|
|||||||
INT32 i;
|
INT32 i;
|
||||||
boolean goodpacket = true;
|
boolean goodpacket = true;
|
||||||
node_t *node = &nodes[doomcom->remotenode];
|
node_t *node = &nodes[doomcom->remotenode];
|
||||||
|
doomdata_t *netbuffer = DOOMCOM_DATA(doomcom);
|
||||||
|
|
||||||
// Received an ack return, so remove the ack in the list
|
// Received an ack return, so remove the ack in the list
|
||||||
if (netbuffer->ackreturn && cmpack(node->remotefirstack, netbuffer->ackreturn) < 0)
|
if (netbuffer->ackreturn && cmpack(node->remotefirstack, netbuffer->ackreturn) < 0)
|
||||||
@@ -307,7 +300,7 @@ static boolean Processackpak(void)
|
|||||||
// Search the ackbuffer and free it
|
// Search the ackbuffer and free it
|
||||||
for (i = 0; i < MAXACKPACKETS; i++)
|
for (i = 0; i < MAXACKPACKETS; i++)
|
||||||
{
|
{
|
||||||
if (ackpak[i].acknum && ackpak[i].destinationnode == node - nodes
|
if (ackpak[i].acknum && ackpak[i].destinationnode == doomcom->remotenode
|
||||||
&& cmpack(ackpak[i].acknum, netbuffer->ackreturn) <= 0)
|
&& cmpack(ackpak[i].acknum, netbuffer->ackreturn) <= 0)
|
||||||
{
|
{
|
||||||
RemoveAck(i);
|
RemoveAck(i);
|
||||||
@@ -423,6 +416,7 @@ void Net_SendAcks(INT32 node)
|
|||||||
#ifdef NONET
|
#ifdef NONET
|
||||||
(void)node;
|
(void)node;
|
||||||
#else
|
#else
|
||||||
|
doomdata_t *netbuffer = DOOMCOM_DATA(doomcom);
|
||||||
netbuffer->packettype = PT_NOTHING;
|
netbuffer->packettype = PT_NOTHING;
|
||||||
M_Memcpy(netbuffer->u.textcmd, nodes[node].acktosend, MAXACKTOSEND);
|
M_Memcpy(netbuffer->u.textcmd, nodes[node].acktosend, MAXACKTOSEND);
|
||||||
HSendPacket(node, false, 0, MAXACKTOSEND);
|
HSendPacket(node, false, 0, MAXACKTOSEND);
|
||||||
@@ -434,6 +428,8 @@ static void GotAcks(void)
|
|||||||
{
|
{
|
||||||
INT32 i, j;
|
INT32 i, j;
|
||||||
|
|
||||||
|
doomdata_t *netbuffer = DOOMCOM_DATA(doomcom);
|
||||||
|
|
||||||
for (j = 0; j < MAXACKTOSEND; j++)
|
for (j = 0; j < MAXACKTOSEND; j++)
|
||||||
{
|
{
|
||||||
if (netbuffer->u.textcmd[j])
|
if (netbuffer->u.textcmd[j])
|
||||||
@@ -487,6 +483,8 @@ void Net_AckTicker(void)
|
|||||||
#ifndef NONET
|
#ifndef NONET
|
||||||
INT32 i;
|
INT32 i;
|
||||||
|
|
||||||
|
doomdata_t *netbuffer = DOOMCOM_DATA(doomcom);
|
||||||
|
|
||||||
for (i = 0; i < MAXACKPACKETS; i++)
|
for (i = 0; i < MAXACKPACKETS; i++)
|
||||||
{
|
{
|
||||||
const INT32 nodei = ackpak[i].destinationnode;
|
const INT32 nodei = ackpak[i].destinationnode;
|
||||||
@@ -542,6 +540,7 @@ void Net_UnAcknowledgePacket(INT32 node)
|
|||||||
#ifdef NONET
|
#ifdef NONET
|
||||||
(void)node;
|
(void)node;
|
||||||
#else
|
#else
|
||||||
|
doomdata_t *netbuffer = DOOMCOM_DATA(doomcom);
|
||||||
INT32 hm1 = (nodes[node].acktosend_head-1+MAXACKTOSEND) % MAXACKTOSEND;
|
INT32 hm1 = (nodes[node].acktosend_head-1+MAXACKTOSEND) % MAXACKTOSEND;
|
||||||
DEBFILE(va("UnAcknowledge node %d\n", node));
|
DEBFILE(va("UnAcknowledge node %d\n", node));
|
||||||
|
|
||||||
@@ -736,6 +735,7 @@ void Net_CloseConnection(INT32 node)
|
|||||||
//
|
//
|
||||||
static UINT32 NetbufferChecksum(void)
|
static UINT32 NetbufferChecksum(void)
|
||||||
{
|
{
|
||||||
|
doomdata_t *netbuffer = DOOMCOM_DATA(doomcom);
|
||||||
UINT32 c = 0x1234567;
|
UINT32 c = 0x1234567;
|
||||||
const INT32 l = doomcom->datalength - 4;
|
const INT32 l = doomcom->datalength - 4;
|
||||||
const UINT8 *buf = (UINT8 *)netbuffer + 4;
|
const UINT8 *buf = (UINT8 *)netbuffer + 4;
|
||||||
@@ -852,6 +852,8 @@ const char *Net_GetPacketName(UINT8 packettype)
|
|||||||
|
|
||||||
static void DebugPrintpacket(const char *header)
|
static void DebugPrintpacket(const char *header)
|
||||||
{
|
{
|
||||||
|
doomdata_t *netbuffer = DOOMCOM_DATA(doomcom);
|
||||||
|
|
||||||
fprintf(debugfile, "%-12s (node %d,ack %d,ackret %d,size %d) type(%d) : %s\n",
|
fprintf(debugfile, "%-12s (node %d,ack %d,ackret %d,size %d) type(%d) : %s\n",
|
||||||
header, doomcom->remotenode, netbuffer->ack, netbuffer->ackreturn, doomcom->datalength,
|
header, doomcom->remotenode, netbuffer->ack, netbuffer->ackreturn, doomcom->datalength,
|
||||||
netbuffer->packettype, Net_GetPacketName(netbuffer->packettype));
|
netbuffer->packettype, Net_GetPacketName(netbuffer->packettype));
|
||||||
@@ -1021,6 +1023,7 @@ void Command_Droprate(void)
|
|||||||
#ifndef NONET
|
#ifndef NONET
|
||||||
static boolean ShouldDropPacket(void)
|
static boolean ShouldDropPacket(void)
|
||||||
{
|
{
|
||||||
|
doomdata_t *netbuffer = DOOMCOM_DATA(doomcom);
|
||||||
return (packetdropquantity[netbuffer->packettype])
|
return (packetdropquantity[netbuffer->packettype])
|
||||||
|| (packetdroprate != 0 && rand() < (((double)RAND_MAX) * (packetdroprate / 100.f))) || packetdroprate == 100;
|
|| (packetdroprate != 0 && rand() < (((double)RAND_MAX) * (packetdroprate / 100.f))) || packetdroprate == 100;
|
||||||
}
|
}
|
||||||
@@ -1032,6 +1035,7 @@ static boolean ShouldDropPacket(void)
|
|||||||
//
|
//
|
||||||
boolean HSendPacket(INT32 node, boolean reliable, UINT8 acknum, size_t packetlength)
|
boolean HSendPacket(INT32 node, boolean reliable, UINT8 acknum, size_t packetlength)
|
||||||
{
|
{
|
||||||
|
doomdata_t *netbuffer = DOOMCOM_DATA(doomcom);
|
||||||
doomcom->datalength = (INT16)(packetlength + BASEPACKETSIZE);
|
doomcom->datalength = (INT16)(packetlength + BASEPACKETSIZE);
|
||||||
|
|
||||||
if (node == 0) // Packet is to go back to us
|
if (node == 0) // Packet is to go back to us
|
||||||
@@ -1132,7 +1136,7 @@ boolean HSendPacket(INT32 node, boolean reliable, UINT8 acknum, size_t packetlen
|
|||||||
//
|
//
|
||||||
boolean HGetPacket(void)
|
boolean HGetPacket(void)
|
||||||
{
|
{
|
||||||
//boolean nodejustjoined;
|
doomdata_t *netbuffer = DOOMCOM_DATA(doomcom);
|
||||||
|
|
||||||
// Get a packet from self
|
// Get a packet from self
|
||||||
if (rebound_tail != rebound_head)
|
if (rebound_tail != rebound_head)
|
||||||
@@ -1220,6 +1224,18 @@ static void Internal_FreeNodenum(INT32 nodenum)
|
|||||||
(void)nodenum;
|
(void)nodenum;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static char *I_NetSplitAddress(char *host, char **port)
|
||||||
|
{
|
||||||
|
boolean v4 = (host[0] != '[');
|
||||||
|
|
||||||
|
host = strtok(host, v4 ? ":" : "[]");
|
||||||
|
|
||||||
|
if (port)
|
||||||
|
*port = strtok(NULL, ":");
|
||||||
|
|
||||||
|
return host;
|
||||||
|
}
|
||||||
|
|
||||||
SINT8 I_NetMakeNode(const char *hostname)
|
SINT8 I_NetMakeNode(const char *hostname)
|
||||||
{
|
{
|
||||||
SINT8 newnode = -1;
|
SINT8 newnode = -1;
|
||||||
@@ -1227,20 +1243,14 @@ SINT8 I_NetMakeNode(const char *hostname)
|
|||||||
if (I_NetMakeNodewPort)
|
if (I_NetMakeNodewPort)
|
||||||
{
|
{
|
||||||
char *localhostname = strdup(hostname);
|
char *localhostname = strdup(hostname);
|
||||||
char *t = localhostname;
|
char *port;
|
||||||
const char *port;
|
|
||||||
if (!localhostname)
|
if (!localhostname)
|
||||||
return newnode;
|
return newnode;
|
||||||
|
|
||||||
// retrieve portnum from address!
|
// retrieve portnum from address!
|
||||||
strtok(localhostname, ":");
|
hostname = I_NetSplitAddress(localhostname, &port);
|
||||||
port = strtok(NULL, ":");
|
|
||||||
|
|
||||||
// remove the port in the hostname as we've it already
|
newnode = I_NetMakeNodewPort(hostname, port);
|
||||||
while ((*t != ':') && (*t != '\0'))
|
|
||||||
t++;
|
|
||||||
*t = '\0';
|
|
||||||
|
|
||||||
newnode = I_NetMakeNodewPort(localhostname, port);
|
|
||||||
free(localhostname);
|
free(localhostname);
|
||||||
}
|
}
|
||||||
return newnode;
|
return newnode;
|
||||||
@@ -1332,11 +1342,6 @@ boolean D_CheckNetGame(void)
|
|||||||
if (doomcom->numnodes > MAXNETNODES)
|
if (doomcom->numnodes > MAXNETNODES)
|
||||||
I_Error("Too many nodes (%d), max:%d", doomcom->numnodes, MAXNETNODES);
|
I_Error("Too many nodes (%d), max:%d", doomcom->numnodes, MAXNETNODES);
|
||||||
|
|
||||||
netbuffer = (doomdata_t *)(void *)&doomcom->data;
|
|
||||||
#ifdef HOLEPUNCH
|
|
||||||
holepunchpacket = (holepunch_t *)(void *)&doomcom->data;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef DEBUGFILE
|
#ifdef DEBUGFILE
|
||||||
if (M_CheckParm("-debugfile"))
|
if (M_CheckParm("-debugfile"))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -142,6 +142,7 @@ UINT8 *PutFileNeeded(UINT16 firstfile)
|
|||||||
{
|
{
|
||||||
size_t i;
|
size_t i;
|
||||||
UINT8 count = 0;
|
UINT8 count = 0;
|
||||||
|
doomdata_t *netbuffer = DOOMCOM_DATA(doomcom);
|
||||||
UINT8 *p_start = netbuffer->packettype == PT_MOREFILESNEEDED ? netbuffer->u.filesneededcfg.files : netbuffer->u.serverinfo.fileneeded;
|
UINT8 *p_start = netbuffer->packettype == PT_MOREFILESNEEDED ? netbuffer->u.filesneededcfg.files : netbuffer->u.serverinfo.fileneeded;
|
||||||
UINT8 *p = p_start;
|
UINT8 *p = p_start;
|
||||||
char wadfilename[MAX_WADPATH] = "";
|
char wadfilename[MAX_WADPATH] = "";
|
||||||
@@ -323,6 +324,7 @@ boolean CL_SendRequestFile(void)
|
|||||||
#ifdef MORELEGACYDOWNLOADER
|
#ifdef MORELEGACYDOWNLOADER
|
||||||
boolean firstloop = true;
|
boolean firstloop = true;
|
||||||
#endif
|
#endif
|
||||||
|
doomdata_t *netbuffer = DOOMCOM_DATA(doomcom);
|
||||||
|
|
||||||
#ifdef PARANOIA
|
#ifdef PARANOIA
|
||||||
if (M_CheckParm("-nodownload"))
|
if (M_CheckParm("-nodownload"))
|
||||||
@@ -451,9 +453,11 @@ tryagain:
|
|||||||
// returns false if a requested file was not found or cannot be sent
|
// returns false if a requested file was not found or cannot be sent
|
||||||
boolean Got_RequestFilePak(INT32 node)
|
boolean Got_RequestFilePak(INT32 node)
|
||||||
{
|
{
|
||||||
|
doomdata_t *netbuffer = DOOMCOM_DATA(doomcom);
|
||||||
char wad[MAX_WADPATH+1];
|
char wad[MAX_WADPATH+1];
|
||||||
UINT8 *p = netbuffer->u.textcmd;
|
UINT8 *p = netbuffer->u.textcmd;
|
||||||
UINT8 id;
|
UINT8 id;
|
||||||
|
|
||||||
while (p < netbuffer->u.textcmd + MAXTEXTCMD) // Don't allow hacked client to overflow
|
while (p < netbuffer->u.textcmd + MAXTEXTCMD) // Don't allow hacked client to overflow
|
||||||
{
|
{
|
||||||
id = READUINT8(p);
|
id = READUINT8(p);
|
||||||
@@ -817,6 +821,7 @@ void SV_FileSendTicker(void)
|
|||||||
size_t size;
|
size_t size;
|
||||||
filetx_t *f;
|
filetx_t *f;
|
||||||
INT32 packetsent, ram, i, j;
|
INT32 packetsent, ram, i, j;
|
||||||
|
doomdata_t *netbuffer = DOOMCOM_DATA(doomcom);
|
||||||
|
|
||||||
if (!filestosend) // No file to send
|
if (!filestosend) // No file to send
|
||||||
return;
|
return;
|
||||||
@@ -945,6 +950,7 @@ void SV_FileSendTicker(void)
|
|||||||
|
|
||||||
void Got_Filetxpak(void)
|
void Got_Filetxpak(void)
|
||||||
{
|
{
|
||||||
|
doomdata_t *netbuffer = DOOMCOM_DATA(doomcom);
|
||||||
INT32 filenum = netbuffer->u.filetxpak.fileid;
|
INT32 filenum = netbuffer->u.filetxpak.fileid;
|
||||||
fileneeded_t *file = &fileneeded[filenum];
|
fileneeded_t *file = &fileneeded[filenum];
|
||||||
char *filename = file->filename;
|
char *filename = file->filename;
|
||||||
@@ -1185,6 +1191,18 @@ filestatus_t findfile(char *filename, const UINT8 *wantedmd5sum, boolean complet
|
|||||||
badmd5 = true;
|
badmd5 = true;
|
||||||
// if not found at all, just move on without doing anything
|
// if not found at all, just move on without doing anything
|
||||||
|
|
||||||
|
if (cv_addons_option.value == 3 && *cv_addons_folder.string != '\0')
|
||||||
|
{
|
||||||
|
// next, check any custom directory if specified
|
||||||
|
homecheck = filesearch(filename, cv_addons_folder.string, wantedmd5sum, completepath, 10);
|
||||||
|
|
||||||
|
if (homecheck == FS_FOUND) // we found the file, so return that we have :)
|
||||||
|
return FS_FOUND;
|
||||||
|
else if (homecheck == FS_MD5SUMBAD) // file has a bad md5; move on and look for a file with the right md5
|
||||||
|
badmd5 = true;
|
||||||
|
// if not found at all, just move on without doing anything
|
||||||
|
}
|
||||||
|
|
||||||
// finally check "." directory
|
// finally check "." directory
|
||||||
homecheck = filesearch(filename, ".", wantedmd5sum, completepath, 10);
|
homecheck = filesearch(filename, ".", wantedmd5sum, completepath, 10);
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -575,7 +575,7 @@ extern consvar_t cv_downloading; // allow clients to downloading WADs.
|
|||||||
extern consvar_t cv_nettimeout; // SRB2Kart: Advanced server options menu
|
extern consvar_t cv_nettimeout; // SRB2Kart: Advanced server options menu
|
||||||
extern consvar_t cv_jointimeout;
|
extern consvar_t cv_jointimeout;
|
||||||
extern consvar_t cv_maxping;
|
extern consvar_t cv_maxping;
|
||||||
extern ticcmd_t netcmds[TICQUEUE][MAXPLAYERS];
|
extern ticcmd_t netcmds[BACKUPTICS][MAXPLAYERS];
|
||||||
extern INT32 serverplayer;
|
extern INT32 serverplayer;
|
||||||
extern INT32 adminplayers[MAXPLAYERS];
|
extern INT32 adminplayers[MAXPLAYERS];
|
||||||
|
|
||||||
|
|||||||
+35
-32
@@ -681,47 +681,49 @@ INT32 JoyAxis(axis_input_e axissel, UINT8 player)
|
|||||||
INT32 axisval;
|
INT32 axisval;
|
||||||
boolean flp = false;
|
boolean flp = false;
|
||||||
|
|
||||||
|
UINT8 pnum = player-1;
|
||||||
|
|
||||||
//find what axis to get
|
//find what axis to get
|
||||||
switch (axissel)
|
switch (axissel)
|
||||||
{
|
{
|
||||||
case AXISTURN:
|
case AXISTURN:
|
||||||
axisval = cv_turnaxis[player-1].value;
|
axisval = cv_turnaxis[pnum].value;
|
||||||
break;
|
break;
|
||||||
case AXISMOVE:
|
case AXISMOVE:
|
||||||
axisval = cv_moveaxis[player-1].value;
|
axisval = cv_moveaxis[pnum].value;
|
||||||
break;
|
break;
|
||||||
case AXISCAMTURN:
|
case AXISCAMTURN:
|
||||||
axisval = cv_camturnaxis[player-1].value;
|
axisval = cv_camturnaxis[pnum].value;
|
||||||
break;
|
break;
|
||||||
case AXISCAMSTRAFE:
|
case AXISCAMSTRAFE:
|
||||||
axisval = cv_camstrafeaxis[player-1].value;
|
axisval = cv_camstrafeaxis[pnum].value;
|
||||||
break;
|
break;
|
||||||
case AXISBRAKE:
|
case AXISBRAKE:
|
||||||
axisval = cv_brakeaxis[player-1].value;
|
axisval = cv_brakeaxis[pnum].value;
|
||||||
break;
|
break;
|
||||||
case AXISAIM:
|
case AXISAIM:
|
||||||
axisval = cv_aimaxis[player-1].value;
|
axisval = cv_aimaxis[pnum].value;
|
||||||
break;
|
break;
|
||||||
case AXISLOOK:
|
case AXISLOOK:
|
||||||
axisval = cv_lookaxis[player-1].value;
|
axisval = cv_lookaxis[pnum].value;
|
||||||
break;
|
break;
|
||||||
case AXISFIRE:
|
case AXISFIRE:
|
||||||
axisval = cv_fireaxis[player-1].value;
|
axisval = cv_fireaxis[pnum].value;
|
||||||
break;
|
break;
|
||||||
case AXISDRIFT:
|
case AXISDRIFT:
|
||||||
axisval = cv_driftaxis[player-1].value;
|
axisval = cv_driftaxis[pnum].value;
|
||||||
break;
|
break;
|
||||||
case AXISLOOKBACK:
|
case AXISLOOKBACK:
|
||||||
axisval = cv_lookbackaxis[player-1].value;
|
axisval = cv_lookbackaxis[pnum].value;
|
||||||
break;
|
break;
|
||||||
case AXISCUSTOM1:
|
case AXISCUSTOM1:
|
||||||
axisval = cv_custom1axis[player-1].value;
|
axisval = cv_custom1axis[pnum].value;
|
||||||
break;
|
break;
|
||||||
case AXISCUSTOM2:
|
case AXISCUSTOM2:
|
||||||
axisval = cv_custom2axis[player-1].value;
|
axisval = cv_custom2axis[pnum].value;
|
||||||
break;
|
break;
|
||||||
case AXISCUSTOM3:
|
case AXISCUSTOM3:
|
||||||
axisval = cv_custom3axis[player-1].value;
|
axisval = cv_custom3axis[pnum].value;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return 0;
|
return 0;
|
||||||
@@ -732,44 +734,51 @@ INT32 JoyAxis(axis_input_e axissel, UINT8 player)
|
|||||||
axisval = -axisval;
|
axisval = -axisval;
|
||||||
flp = true;
|
flp = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (axisval > JOYAXISSET*2 || axisval == 0) //not there in array or None
|
if (axisval > JOYAXISSET*2 || axisval == 0) //not there in array or None
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (axisval%2)
|
if (axisval % 2)
|
||||||
{
|
{
|
||||||
axisval /= 2;
|
axisval /= 2;
|
||||||
retaxis = joyxmove[axisval];
|
retaxis = joyxmove[pnum][axisval];
|
||||||
|
|
||||||
if (retaxis < (-JOYAXISRANGE))
|
if (retaxis < (-JOYAXISRANGE))
|
||||||
retaxis = -JOYAXISRANGE;
|
retaxis = -JOYAXISRANGE;
|
||||||
if (retaxis > (+JOYAXISRANGE))
|
if (retaxis > (+JOYAXISRANGE))
|
||||||
retaxis = +JOYAXISRANGE;
|
retaxis = +JOYAXISRANGE;
|
||||||
if (!Joystick[player-1].bGamepadStyle && axissel < AXISDEAD)
|
if (!Joystick[pnum].bGamepadStyle && axissel < AXISDEAD)
|
||||||
{
|
{
|
||||||
const INT32 jdeadzone = ((JOYAXISRANGE-1) * cv_xdeadzone[player-1].value) >> FRACBITS;
|
const INT32 jdeadzone = ((JOYAXISRANGE-1) * cv_xdeadzone[pnum].value) >> FRACBITS;
|
||||||
if (abs(retaxis) <= jdeadzone)
|
if (abs(retaxis) <= jdeadzone)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if (flp) retaxis = -retaxis; //flip it around
|
|
||||||
|
if (flp)
|
||||||
|
retaxis = -retaxis; // flip it around
|
||||||
|
|
||||||
return retaxis;
|
return retaxis;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
axisval--;
|
axisval--;
|
||||||
axisval /= 2;
|
axisval /= 2;
|
||||||
retaxis = joyymove[axisval];
|
retaxis = joyymove[pnum][axisval];
|
||||||
|
|
||||||
if (retaxis < (-JOYAXISRANGE))
|
if (retaxis < (-JOYAXISRANGE))
|
||||||
retaxis = -JOYAXISRANGE;
|
retaxis = -JOYAXISRANGE;
|
||||||
if (retaxis > (+JOYAXISRANGE))
|
if (retaxis > (+JOYAXISRANGE))
|
||||||
retaxis = +JOYAXISRANGE;
|
retaxis = +JOYAXISRANGE;
|
||||||
if (!Joystick[player-1].bGamepadStyle && axissel < AXISDEAD)
|
if (!Joystick[pnum].bGamepadStyle && axissel < AXISDEAD)
|
||||||
{
|
{
|
||||||
const INT32 jdeadzone = ((JOYAXISRANGE-1) * cv_ydeadzone[player-1].value) >> FRACBITS;
|
const INT32 jdeadzone = ((JOYAXISRANGE-1) * cv_ydeadzone[pnum].value) >> FRACBITS;
|
||||||
if (abs(retaxis) <= jdeadzone)
|
if (abs(retaxis) <= jdeadzone)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if (flp) retaxis = -retaxis; //flip it around
|
|
||||||
|
if (flp)
|
||||||
|
retaxis = -retaxis; // flip it around
|
||||||
|
|
||||||
return retaxis;
|
return retaxis;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1216,15 +1225,9 @@ static void G_DoLoadLevel(boolean resetplayer)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// clear cmd building stuff
|
// clear cmd building stuff
|
||||||
memset(gamekeydown, 0, sizeof (gamekeydown));
|
memset(gamekeydown, 0, sizeof(gamekeydown));
|
||||||
|
memset(joyxmove, 0, sizeof(joyxmove));
|
||||||
for (i = 0; i < JOYAXISSET; i++)
|
memset(joyymove, 0, sizeof(joyymove));
|
||||||
{
|
|
||||||
joyxmove[i] = joyymove[i] = 0;
|
|
||||||
joy2xmove[i] = joy2ymove[i] = 0;
|
|
||||||
joy3xmove[i] = joy3ymove[i] = 0;
|
|
||||||
joy4xmove[i] = joy4ymove[i] = 0;
|
|
||||||
}
|
|
||||||
mousex = mousey = 0;
|
mousex = mousey = 0;
|
||||||
|
|
||||||
// clear hud messages remains (usually from game startup)
|
// clear hud messages remains (usually from game startup)
|
||||||
@@ -1784,7 +1787,7 @@ void G_Ticker(boolean run)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
buf = gametic % TICQUEUE;
|
buf = gametic % BACKUPTICS;
|
||||||
|
|
||||||
if (!demo.playback)
|
if (!demo.playback)
|
||||||
{
|
{
|
||||||
|
|||||||
+9
-19
@@ -114,8 +114,7 @@ INT32 mousex, mousey;
|
|||||||
INT32 mlooky; // like mousey but with a custom sensitivity for mlook
|
INT32 mlooky; // like mousey but with a custom sensitivity for mlook
|
||||||
|
|
||||||
// joystick values are repeated
|
// joystick values are repeated
|
||||||
INT32 joyxmove[JOYAXISSET], joyymove[JOYAXISSET], joy2xmove[JOYAXISSET], joy2ymove[JOYAXISSET],
|
INT32 joyxmove[MAXSPLITSCREENPLAYERS][JOYAXISSET], joyymove[MAXSPLITSCREENPLAYERS][JOYAXISSET];
|
||||||
joy3xmove[JOYAXISSET], joy3ymove[JOYAXISSET], joy4xmove[JOYAXISSET], joy4ymove[JOYAXISSET];
|
|
||||||
|
|
||||||
// current state of the keys: true if pushed
|
// current state of the keys: true if pushed
|
||||||
UINT8 gamekeydown[NUMINPUTS];
|
UINT8 gamekeydown[NUMINPUTS];
|
||||||
@@ -187,32 +186,32 @@ void G_MapEventsToControls(event_t *ev)
|
|||||||
i = ev->data1;
|
i = ev->data1;
|
||||||
if (i >= JOYAXISSET || menuactive || CON_Ready() || chat_on)
|
if (i >= JOYAXISSET || menuactive || CON_Ready() || chat_on)
|
||||||
break;
|
break;
|
||||||
if (ev->data2 != INT32_MAX) joyxmove[i] = ev->data2;
|
if (ev->data2 != INT32_MAX) joyxmove[0][i] = ev->data2;
|
||||||
if (ev->data3 != INT32_MAX) joyymove[i] = ev->data3;
|
if (ev->data3 != INT32_MAX) joyymove[0][i] = ev->data3;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ev_joystick2: // buttons are virtual keys
|
case ev_joystick2: // buttons are virtual keys
|
||||||
i = ev->data1;
|
i = ev->data1;
|
||||||
if (i >= JOYAXISSET || menuactive)
|
if (i >= JOYAXISSET || menuactive)
|
||||||
break;
|
break;
|
||||||
if (ev->data2 != INT32_MAX) joy2xmove[i] = ev->data2;
|
if (ev->data2 != INT32_MAX) joyxmove[1][i] = ev->data2;
|
||||||
if (ev->data3 != INT32_MAX) joy2ymove[i] = ev->data3;
|
if (ev->data3 != INT32_MAX) joyymove[1][i] = ev->data3;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ev_joystick3:
|
case ev_joystick3:
|
||||||
i = ev->data1;
|
i = ev->data1;
|
||||||
if (i >= JOYAXISSET)
|
if (i >= JOYAXISSET)
|
||||||
break;
|
break;
|
||||||
if (ev->data2 != INT32_MAX) joy3xmove[i] = ev->data2;
|
if (ev->data2 != INT32_MAX) joyxmove[2][i] = ev->data2;
|
||||||
if (ev->data3 != INT32_MAX) joy3ymove[i] = ev->data3;
|
if (ev->data3 != INT32_MAX) joyymove[2][i] = ev->data3;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ev_joystick4:
|
case ev_joystick4:
|
||||||
i = ev->data1;
|
i = ev->data1;
|
||||||
if (i >= JOYAXISSET)
|
if (i >= JOYAXISSET)
|
||||||
break;
|
break;
|
||||||
if (ev->data2 != INT32_MAX) joy4xmove[i] = ev->data2;
|
if (ev->data2 != INT32_MAX) joyxmove[3][i] = ev->data2;
|
||||||
if (ev->data3 != INT32_MAX) joy4ymove[i] = ev->data3;
|
if (ev->data3 != INT32_MAX) joyymove[3][i] = ev->data3;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@@ -258,15 +257,6 @@ void G_ResetControls(void)
|
|||||||
memset(joyxmove, 0, sizeof(joyxmove));
|
memset(joyxmove, 0, sizeof(joyxmove));
|
||||||
memset(joyymove, 0, sizeof(joyymove));
|
memset(joyymove, 0, sizeof(joyymove));
|
||||||
|
|
||||||
memset(joy2xmove, 0, sizeof(joy2xmove));
|
|
||||||
memset(joy2ymove, 0, sizeof(joy2ymove));
|
|
||||||
|
|
||||||
memset(joy3xmove, 0, sizeof(joy3xmove));
|
|
||||||
memset(joy3ymove, 0, sizeof(joy3ymove));
|
|
||||||
|
|
||||||
memset(joy4xmove, 0, sizeof(joy4xmove));
|
|
||||||
memset(joy4ymove, 0, sizeof(joy4ymove));
|
|
||||||
|
|
||||||
// reset those just in case the game missed the keyup event
|
// reset those just in case the game missed the keyup event
|
||||||
memset(dpadscrollstate, false, sizeof(dpadscrollstate));
|
memset(dpadscrollstate, false, sizeof(dpadscrollstate));
|
||||||
}
|
}
|
||||||
|
|||||||
+8
-5
@@ -41,10 +41,12 @@ typedef enum
|
|||||||
KEY_DBLJOY1 = KEY_DBLMOUSE1 + MOUSEBUTTONS,
|
KEY_DBLJOY1 = KEY_DBLMOUSE1 + MOUSEBUTTONS,
|
||||||
KEY_DBLHAT1 = KEY_DBLJOY1 + JOYBUTTONS,
|
KEY_DBLHAT1 = KEY_DBLJOY1 + JOYBUTTONS,
|
||||||
|
|
||||||
KEY_2JOY1 = KEY_DBLHAT1 + MOUSEBUTTONS,
|
KEY_2MOUSE1 = KEY_DBLHAT1 + JOYHATS*4,
|
||||||
|
KEY_2JOY1 = KEY_2MOUSE1 + MOUSEBUTTONS,
|
||||||
KEY_2HAT1 = KEY_2JOY1 + JOYBUTTONS,
|
KEY_2HAT1 = KEY_2JOY1 + JOYBUTTONS,
|
||||||
|
|
||||||
KEY_DBL2JOY1 = KEY_2HAT1 + MOUSEBUTTONS,
|
KEY_DBL2MOUSE1 = KEY_2HAT1 + JOYHATS*4,
|
||||||
|
KEY_DBL2JOY1 = KEY_DBL2MOUSE1 + MOUSEBUTTONS,
|
||||||
KEY_DBL2HAT1 = KEY_DBL2JOY1 + JOYBUTTONS,
|
KEY_DBL2HAT1 = KEY_DBL2JOY1 + JOYBUTTONS,
|
||||||
|
|
||||||
KEY_3JOY1 = KEY_DBL2HAT1 + JOYHATS*4,
|
KEY_3JOY1 = KEY_DBL2HAT1 + JOYHATS*4,
|
||||||
@@ -61,8 +63,10 @@ typedef enum
|
|||||||
|
|
||||||
KEY_MOUSEWHEELUP = KEY_DBL4HAT1 + JOYHATS*4,
|
KEY_MOUSEWHEELUP = KEY_DBL4HAT1 + JOYHATS*4,
|
||||||
KEY_MOUSEWHEELDOWN = KEY_MOUSEWHEELUP + 1,
|
KEY_MOUSEWHEELDOWN = KEY_MOUSEWHEELUP + 1,
|
||||||
|
KEY_2MOUSEWHEELUP = KEY_MOUSEWHEELDOWN + 1,
|
||||||
|
KEY_2MOUSEWHEELDOWN = KEY_2MOUSEWHEELUP + 1,
|
||||||
|
|
||||||
NUMINPUTS = KEY_MOUSEWHEELDOWN + 1,
|
NUMINPUTS = KEY_2MOUSEWHEELDOWN + 1, // FIXME: all the mouse 2 stuff should be removed, but it screws up mappings somehow
|
||||||
} key_input_e;
|
} key_input_e;
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
@@ -113,8 +117,7 @@ extern consvar_t cv_gamepadled[MAXSPLITSCREENPLAYERS];
|
|||||||
extern INT32 mousex, mousey;
|
extern INT32 mousex, mousey;
|
||||||
extern INT32 mlooky; //mousey with mlookSensitivity
|
extern INT32 mlooky; //mousey with mlookSensitivity
|
||||||
|
|
||||||
extern INT32 joyxmove[JOYAXISSET], joyymove[JOYAXISSET], joy2xmove[JOYAXISSET], joy2ymove[JOYAXISSET],
|
extern INT32 joyxmove[MAXSPLITSCREENPLAYERS][JOYAXISSET], joyymove[MAXSPLITSCREENPLAYERS][JOYAXISSET];
|
||||||
joy3xmove[JOYAXISSET], joy3ymove[JOYAXISSET], joy4xmove[JOYAXISSET], joy4ymove[JOYAXISSET];
|
|
||||||
|
|
||||||
// current state of the keys: true if pushed
|
// current state of the keys: true if pushed
|
||||||
extern UINT8 gamekeydown[NUMINPUTS];
|
extern UINT8 gamekeydown[NUMINPUTS];
|
||||||
|
|||||||
+5
-1
@@ -220,7 +220,11 @@ HMS_connect (const char *format, ...)
|
|||||||
|
|
||||||
curl_easy_setopt(curl, CURLOPT_URL, url);
|
curl_easy_setopt(curl, CURLOPT_URL, url);
|
||||||
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
|
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
|
||||||
curl_easy_setopt(curl, CURLOPT_IPRESOLVE, (long)CURL_IPRESOLVE_V4);
|
|
||||||
|
#ifdef HAVE_IPV6
|
||||||
|
if (!M_CheckParm("-ipv6"))
|
||||||
|
#endif
|
||||||
|
curl_easy_setopt(curl, CURLOPT_IPRESOLVE, (long)CURL_IPRESOLVE_V4);
|
||||||
|
|
||||||
curl_easy_setopt(curl, CURLOPT_TIMEOUT, (long)cv_masterserver_timeout.value);
|
curl_easy_setopt(curl, CURLOPT_TIMEOUT, (long)cv_masterserver_timeout.value);
|
||||||
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, HMS_on_read);
|
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, HMS_on_read);
|
||||||
|
|||||||
+6
-8
@@ -310,7 +310,7 @@ void HU_LoadGraphics(void)
|
|||||||
lt_font[0] = (patch_t *)W_CachePatchName("LTFNT039", PU_HUDGFX); /// \note fake start hack
|
lt_font[0] = (patch_t *)W_CachePatchName("LTFNT039", PU_HUDGFX); /// \note fake start hack
|
||||||
|
|
||||||
// Number support
|
// Number support
|
||||||
lt_font[9] = (patch_t *)W_CachePatchName("LTFNT048", PU_HUDGFX);
|
lt_font[9] = (patch_t *)W_CachePatchName("LTFNT048", PU_HUDGFX);
|
||||||
lt_font[10] = (patch_t *)W_CachePatchName("LTFNT049", PU_HUDGFX);
|
lt_font[10] = (patch_t *)W_CachePatchName("LTFNT049", PU_HUDGFX);
|
||||||
lt_font[11] = (patch_t *)W_CachePatchName("LTFNT050", PU_HUDGFX);
|
lt_font[11] = (patch_t *)W_CachePatchName("LTFNT050", PU_HUDGFX);
|
||||||
lt_font[12] = (patch_t *)W_CachePatchName("LTFNT051", PU_HUDGFX);
|
lt_font[12] = (patch_t *)W_CachePatchName("LTFNT051", PU_HUDGFX);
|
||||||
@@ -747,7 +747,7 @@ static void Command_CSay_f(void)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!server && !IsPlayerAdmin(consoleplayer))
|
if (!server && !IsPlayerAdmin(consoleplayer))
|
||||||
{
|
{
|
||||||
CONS_Alert(CONS_NOTICE, M_GetText("Only servers and admins can use csay.\n"));
|
CONS_Alert(CONS_NOTICE, M_GetText("Only servers and admins can use csay.\n"));
|
||||||
return;
|
return;
|
||||||
@@ -2881,13 +2881,11 @@ void HU_DoCEcho(const char *msg)
|
|||||||
*p = '\n';
|
*p = '\n';
|
||||||
|
|
||||||
CONS_Printf("%s\n", temp);
|
CONS_Printf("%s\n", temp);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
else if (cv_cechotoggle.value)
|
||||||
|
cechotimer = cechoduration;
|
||||||
|
|
||||||
I_OutputMsg("%s\n", msg); // print to log
|
I_OutputMsg("%s\n", msg); // ALWAYS print to log
|
||||||
|
|
||||||
if (!cv_cechotoggle.value)
|
|
||||||
return;
|
|
||||||
|
|
||||||
cechotimer = cechoduration;
|
|
||||||
}
|
}
|
||||||
+4
-4
@@ -82,6 +82,8 @@ typedef struct
|
|||||||
char data[MAXPACKETLENGTH];
|
char data[MAXPACKETLENGTH];
|
||||||
} ATTRPACK doomcom_t;
|
} ATTRPACK doomcom_t;
|
||||||
|
|
||||||
|
#define DOOMCOM_DATA(d) (doomdata_t *)&(d)->data
|
||||||
|
|
||||||
#ifdef HOLEPUNCH
|
#ifdef HOLEPUNCH
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
@@ -89,6 +91,8 @@ typedef struct
|
|||||||
INT32 addr;
|
INT32 addr;
|
||||||
INT16 port;
|
INT16 port;
|
||||||
} ATTRPACK holepunch_t;
|
} ATTRPACK holepunch_t;
|
||||||
|
|
||||||
|
#define HOLEPUNCH_DATA(d) (holepunch_t *)&(d)->data
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(_MSC_VER)
|
#if defined(_MSC_VER)
|
||||||
@@ -97,10 +101,6 @@ typedef struct
|
|||||||
|
|
||||||
extern doomcom_t *doomcom;
|
extern doomcom_t *doomcom;
|
||||||
|
|
||||||
#ifdef HOLEPUNCH
|
|
||||||
extern holepunch_t *holepunchpacket;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/** \brief return packet in doomcom struct
|
/** \brief return packet in doomcom struct
|
||||||
*/
|
*/
|
||||||
extern boolean (*I_NetGet)(void);
|
extern boolean (*I_NetGet)(void);
|
||||||
|
|||||||
+76
-20
@@ -371,8 +371,16 @@ static inline void I_UPnP_rem(const char *port, const char * servicetype)
|
|||||||
|
|
||||||
static const char *SOCK_AddrToStr(mysockaddr_t *sk)
|
static const char *SOCK_AddrToStr(mysockaddr_t *sk)
|
||||||
{
|
{
|
||||||
static char s[64]; // 255.255.255.255:65535 or IPv6:65535
|
static char s[64]; // 255.255.255.255:65535 or
|
||||||
|
// [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535
|
||||||
|
|
||||||
#ifdef HAVE_NTOP
|
#ifdef HAVE_NTOP
|
||||||
|
#ifdef HAVE_IPV6
|
||||||
|
int v6 = (sk->any.sa_family == AF_INET6);
|
||||||
|
#else
|
||||||
|
int v6 = 0;
|
||||||
|
#endif
|
||||||
|
|
||||||
void *addr;
|
void *addr;
|
||||||
int e = 0; // save error code so it can't be modified later code and avoid calling WSAGetLastError() more then once
|
int e = 0; // save error code so it can't be modified later code and avoid calling WSAGetLastError() more then once
|
||||||
|
|
||||||
@@ -387,14 +395,20 @@ static const char *SOCK_AddrToStr(mysockaddr_t *sk)
|
|||||||
|
|
||||||
if(addr == NULL)
|
if(addr == NULL)
|
||||||
sprintf(s, "No address");
|
sprintf(s, "No address");
|
||||||
else if(inet_ntop(sk->any.sa_family, addr, s, sizeof (s)) == NULL)
|
else if(inet_ntop(sk->any.sa_family, addr, &s[v6], sizeof (s) - v6) == NULL)
|
||||||
{
|
{
|
||||||
e = errno;
|
e = errno;
|
||||||
sprintf(s, "Unknown family type, error #%u: %s", e, strerror(e));
|
sprintf(s, "Unknown family type, error #%u: %s", e, strerror(e));
|
||||||
}
|
}
|
||||||
#ifdef HAVE_IPV6
|
#ifdef HAVE_IPV6
|
||||||
else if(sk->any.sa_family == AF_INET6 && sk->ip6.sin6_port != 0)
|
else if(sk->any.sa_family == AF_INET6)
|
||||||
strcat(s, va(":%d", ntohs(sk->ip6.sin6_port)));
|
{
|
||||||
|
s[0] = '[';
|
||||||
|
strcat(s, "]");
|
||||||
|
|
||||||
|
if (sk->ip6.sin6_port != 0)
|
||||||
|
strcat(s, va(":%d", ntohs(sk->ip6.sin6_port)));
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
else if(sk->any.sa_family == AF_INET && sk->ip4.sin_port != 0)
|
else if(sk->any.sa_family == AF_INET && sk->ip4.sin_port != 0)
|
||||||
strcat(s, va(":%d", ntohs(sk->ip4.sin_port)));
|
strcat(s, va(":%d", ntohs(sk->ip4.sin_port)));
|
||||||
@@ -486,10 +500,30 @@ static time_t SOCK_GetUnbanTime(size_t ban)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifndef NONET
|
#ifndef NONET
|
||||||
|
|
||||||
|
#ifdef HAVE_IPV6
|
||||||
|
static boolean SOCK_cmpipv6(mysockaddr_t *a, mysockaddr_t *b, UINT8 mask)
|
||||||
|
{
|
||||||
|
UINT8 bitmask;
|
||||||
|
I_Assert(mask <= 128);
|
||||||
|
if (mask == 0)
|
||||||
|
mask = 128;
|
||||||
|
if (memcmp(&a->ip6.sin6_addr.s6_addr, &b->ip6.sin6_addr.s6_addr, mask / 8) != 0)
|
||||||
|
return false;
|
||||||
|
if (mask % 8 == 0)
|
||||||
|
return true;
|
||||||
|
bitmask = 255 << (mask % 8);
|
||||||
|
return (a->ip6.sin6_addr.s6_addr[mask / 8] & bitmask) == (b->ip6.sin6_addr.s6_addr[mask / 8] & bitmask);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static boolean SOCK_cmpaddr(mysockaddr_t *a, mysockaddr_t *b, UINT8 mask)
|
static boolean SOCK_cmpaddr(mysockaddr_t *a, mysockaddr_t *b, UINT8 mask)
|
||||||
{
|
{
|
||||||
UINT32 bitmask = INADDR_NONE;
|
UINT32 bitmask = INADDR_NONE;
|
||||||
|
|
||||||
|
if (a->any.sa_family != b->any.sa_family)
|
||||||
|
return false;
|
||||||
|
|
||||||
if (mask && mask < 32)
|
if (mask && mask < 32)
|
||||||
bitmask = htonl((UINT32)(-1) << (32 - mask));
|
bitmask = htonl((UINT32)(-1) << (32 - mask));
|
||||||
|
|
||||||
@@ -498,13 +532,14 @@ static boolean SOCK_cmpaddr(mysockaddr_t *a, mysockaddr_t *b, UINT8 mask)
|
|||||||
&& (b->ip4.sin_port == 0 || (a->ip4.sin_port == b->ip4.sin_port));
|
&& (b->ip4.sin_port == 0 || (a->ip4.sin_port == b->ip4.sin_port));
|
||||||
#ifdef HAVE_IPV6
|
#ifdef HAVE_IPV6
|
||||||
else if (b->any.sa_family == AF_INET6)
|
else if (b->any.sa_family == AF_INET6)
|
||||||
return memcmp(&a->ip6.sin6_addr, &b->ip6.sin6_addr, sizeof(b->ip6.sin6_addr))
|
return SOCK_cmpipv6(a, b, mask)
|
||||||
&& (b->ip6.sin6_port == 0 || (a->ip6.sin6_port == b->ip6.sin6_port));
|
&& (b->ip6.sin6_port == 0 || (a->ip6.sin6_port == b->ip6.sin6_port));
|
||||||
#endif
|
#endif
|
||||||
else
|
else
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// This is a hack. For some reason, nodes aren't being freed properly.
|
// This is a hack. For some reason, nodes aren't being freed properly.
|
||||||
// This goes through and cleans up what nodes were supposed to be freed.
|
// This goes through and cleans up what nodes were supposed to be freed.
|
||||||
/** \warning This function causes the file downloading to stop if someone joins.
|
/** \warning This function causes the file downloading to stop if someone joins.
|
||||||
@@ -620,6 +655,7 @@ is_external_address (UINT32 p)
|
|||||||
|
|
||||||
static boolean hole_punch(ssize_t c)
|
static boolean hole_punch(ssize_t c)
|
||||||
{
|
{
|
||||||
|
holepunch_t *holepunchpacket = HOLEPUNCH_DATA(doomcom);
|
||||||
|
|
||||||
/* See ../doc/Holepunch-Protocol.txt */
|
/* See ../doc/Holepunch-Protocol.txt */
|
||||||
if (cv_rendezvousserver.string[0] &&
|
if (cv_rendezvousserver.string[0] &&
|
||||||
@@ -659,6 +695,7 @@ static boolean SOCK_Get(void)
|
|||||||
fromlen = (socklen_t)sizeof(fromaddress);
|
fromlen = (socklen_t)sizeof(fromaddress);
|
||||||
c = recvfrom(mysockets[n], (char *)&doomcom->data, MAXPACKETLENGTH, 0,
|
c = recvfrom(mysockets[n], (char *)&doomcom->data, MAXPACKETLENGTH, 0,
|
||||||
(void *)&fromaddress, &fromlen);
|
(void *)&fromaddress, &fromlen);
|
||||||
|
|
||||||
if (c > 0)
|
if (c > 0)
|
||||||
{
|
{
|
||||||
#ifdef USE_STUN
|
#ifdef USE_STUN
|
||||||
@@ -868,11 +905,11 @@ static SOCKET_TYPE UDP_Bind(int family, struct sockaddr *addr, socklen_t addrlen
|
|||||||
unsigned long trueval = true;
|
unsigned long trueval = true;
|
||||||
#endif
|
#endif
|
||||||
mysockaddr_t straddr;
|
mysockaddr_t straddr;
|
||||||
struct sockaddr_in sin;
|
socklen_t len = sizeof(straddr);
|
||||||
socklen_t len = sizeof(sin);
|
|
||||||
|
|
||||||
if (s == (SOCKET_TYPE)ERRSOCKET)
|
if (s == (SOCKET_TYPE)ERRSOCKET)
|
||||||
return (SOCKET_TYPE)ERRSOCKET;
|
return (SOCKET_TYPE)ERRSOCKET;
|
||||||
|
|
||||||
#ifdef USE_WINSOCK
|
#ifdef USE_WINSOCK
|
||||||
{ // Alam_GBC: disable the new UDP connection reset behavior for Win2k and up
|
{ // Alam_GBC: disable the new UDP connection reset behavior for Win2k and up
|
||||||
#ifdef USE_WINSOCK2
|
#ifdef USE_WINSOCK2
|
||||||
@@ -892,14 +929,12 @@ static SOCKET_TYPE UDP_Bind(int family, struct sockaddr *addr, socklen_t addrlen
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
straddr.any = *addr;
|
memcpy(&straddr, addr, addrlen);
|
||||||
I_OutputMsg("Binding to %s\n", SOCK_AddrToStr(&straddr));
|
I_OutputMsg("Binding to %s\n", SOCK_AddrToStr(&straddr));
|
||||||
|
|
||||||
if (family == AF_INET)
|
if (family == AF_INET)
|
||||||
{
|
{
|
||||||
mysockaddr_t tmpaddr;
|
if (straddr.ip4.sin_addr.s_addr == htonl(INADDR_ANY))
|
||||||
tmpaddr.any = *addr ;
|
|
||||||
if (tmpaddr.ip4.sin_addr.s_addr == htonl(INADDR_ANY))
|
|
||||||
{
|
{
|
||||||
opt = true;
|
opt = true;
|
||||||
opts = (socklen_t)sizeof(opt);
|
opts = (socklen_t)sizeof(opt);
|
||||||
@@ -924,7 +959,7 @@ static SOCKET_TYPE UDP_Bind(int family, struct sockaddr *addr, socklen_t addrlen
|
|||||||
#ifdef HAVE_IPV6
|
#ifdef HAVE_IPV6
|
||||||
else if (family == AF_INET6)
|
else if (family == AF_INET6)
|
||||||
{
|
{
|
||||||
if (memcmp(addr, &in6addr_any, sizeof(in6addr_any)) == 0) //IN6_ARE_ADDR_EQUAL
|
if (memcmp(&straddr.ip6.sin6_addr, &in6addr_any, sizeof(in6addr_any)) == 0) //IN6_ARE_ADDR_EQUAL
|
||||||
{
|
{
|
||||||
opt = true;
|
opt = true;
|
||||||
opts = (socklen_t)sizeof(opt);
|
opts = (socklen_t)sizeof(opt);
|
||||||
@@ -939,7 +974,7 @@ static SOCKET_TYPE UDP_Bind(int family, struct sockaddr *addr, socklen_t addrlen
|
|||||||
// make it IPv6 ony
|
// make it IPv6 ony
|
||||||
opt = true;
|
opt = true;
|
||||||
opts = (socklen_t)sizeof(opt);
|
opts = (socklen_t)sizeof(opt);
|
||||||
rc = setsockopt(s, SOL_SOCKET, IPV6_V6ONLY, (char *)&opt, opts);
|
rc = setsockopt(s, IPPROTO_IPV6, IPV6_V6ONLY, (char *)&opt, opts);
|
||||||
if (rc <= -1)
|
if (rc <= -1)
|
||||||
{
|
{
|
||||||
e = errno;
|
e = errno;
|
||||||
@@ -969,7 +1004,7 @@ static SOCKET_TYPE UDP_Bind(int family, struct sockaddr *addr, socklen_t addrlen
|
|||||||
|
|
||||||
inet_pton(AF_INET6, IPV6_MULTICAST_ADDRESS, &maddr.ipv6mr_multiaddr);
|
inet_pton(AF_INET6, IPV6_MULTICAST_ADDRESS, &maddr.ipv6mr_multiaddr);
|
||||||
maddr.ipv6mr_interface = 0;
|
maddr.ipv6mr_interface = 0;
|
||||||
rc = setsockopt(s, SOL_SOCKET, IPV6_JOIN_GROUP, (const char *)&maddr, sizeof(maddr));
|
rc = setsockopt(s, IPPROTO_IPV6, IPV6_JOIN_GROUP, (const char *)&maddr, sizeof(maddr));
|
||||||
if (rc <= -1)
|
if (rc <= -1)
|
||||||
{
|
{
|
||||||
e = errno;
|
e = errno;
|
||||||
@@ -1032,7 +1067,7 @@ static SOCKET_TYPE UDP_Bind(int family, struct sockaddr *addr, socklen_t addrlen
|
|||||||
CONS_Printf(M_GetText("Network system buffer set to: %dKb\n"), opt>>10);
|
CONS_Printf(M_GetText("Network system buffer set to: %dKb\n"), opt>>10);
|
||||||
}
|
}
|
||||||
|
|
||||||
rc = getsockname(s, (struct sockaddr *)&sin, &len);
|
rc = getsockname(s, &straddr.any, &len);
|
||||||
if (rc != 0)
|
if (rc != 0)
|
||||||
{
|
{
|
||||||
e = errno;
|
e = errno;
|
||||||
@@ -1040,7 +1075,14 @@ static SOCKET_TYPE UDP_Bind(int family, struct sockaddr *addr, socklen_t addrlen
|
|||||||
I_OutputMsg("getsockname failed: #%u, %s\n", e, strerror(e));
|
I_OutputMsg("getsockname failed: #%u, %s\n", e, strerror(e));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
current_port = (UINT16)ntohs(sin.sin_port);
|
{
|
||||||
|
if (family == AF_INET)
|
||||||
|
current_port = (UINT16)ntohs(straddr.ip4.sin_port);
|
||||||
|
#ifdef HAVE_IPV6
|
||||||
|
else if (family == AF_INET6)
|
||||||
|
current_port = (UINT16)ntohs(straddr.ip6.sin6_port);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
@@ -1121,6 +1163,7 @@ static boolean UDP_Socket(void)
|
|||||||
I_freeaddrinfo(ai);
|
I_freeaddrinfo(ai);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_IPV6
|
#ifdef HAVE_IPV6
|
||||||
if (b_ipv6)
|
if (b_ipv6)
|
||||||
{
|
{
|
||||||
@@ -1319,12 +1362,13 @@ static boolean SOCK_GetAddr(struct sockaddr_in *sin, const char *address, const
|
|||||||
{
|
{
|
||||||
struct my_addrinfo *ai = NULL, *runp, hints;
|
struct my_addrinfo *ai = NULL, *runp, hints;
|
||||||
int gaie;
|
int gaie;
|
||||||
|
size_t i;
|
||||||
|
|
||||||
if (!port || !port[0])
|
if (!port || !port[0])
|
||||||
port = DEFAULTPORT;
|
port = DEFAULTPORT;
|
||||||
|
|
||||||
memset (&hints, 0x00, sizeof (hints));
|
memset (&hints, 0x00, sizeof (hints));
|
||||||
hints.ai_flags = 0;
|
hints.ai_flags = AI_ADDRCONFIG;
|
||||||
hints.ai_family = AF_UNSPEC;
|
hints.ai_family = AF_UNSPEC;
|
||||||
hints.ai_socktype = SOCK_DGRAM;
|
hints.ai_socktype = SOCK_DGRAM;
|
||||||
hints.ai_protocol = IPPROTO_UDP;
|
hints.ai_protocol = IPPROTO_UDP;
|
||||||
@@ -1343,10 +1387,19 @@ static boolean SOCK_GetAddr(struct sockaddr_in *sin, const char *address, const
|
|||||||
{
|
{
|
||||||
while (runp != NULL)
|
while (runp != NULL)
|
||||||
{
|
{
|
||||||
if (sendto(mysockets[0], NULL, 0, 0, runp->ai_addr, runp->ai_addrlen) == 0)
|
// test ip address of server
|
||||||
break;
|
for (i = 0; i < mysocketses; ++i)
|
||||||
|
{
|
||||||
|
if (runp->ai_addr->sa_family == myfamily[i])
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
runp = runp->ai_next;
|
if (i >= mysocketses)
|
||||||
|
runp = runp->ai_next;
|
||||||
|
else
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1390,6 +1443,8 @@ static void rendezvous(int size)
|
|||||||
|
|
||||||
tic_t tic = I_GetTime();
|
tic_t tic = I_GetTime();
|
||||||
|
|
||||||
|
holepunch_t *holepunchpacket = HOLEPUNCH_DATA(doomcom);
|
||||||
|
|
||||||
if (tic != refreshtic)
|
if (tic != refreshtic)
|
||||||
{
|
{
|
||||||
if (SOCK_GetAddr(&rzv.ip4, host, (port ? port : "7777"), false))
|
if (SOCK_GetAddr(&rzv.ip4, host, (port ? port : "7777"), false))
|
||||||
@@ -1415,6 +1470,7 @@ static void rendezvous(int size)
|
|||||||
static void SOCK_RequestHolePunch(INT32 node)
|
static void SOCK_RequestHolePunch(INT32 node)
|
||||||
{
|
{
|
||||||
mysockaddr_t * addr = &clientaddress[node];
|
mysockaddr_t * addr = &clientaddress[node];
|
||||||
|
holepunch_t *holepunchpacket = HOLEPUNCH_DATA(doomcom);
|
||||||
|
|
||||||
holepunchpacket->addr = addr->ip4.sin_addr.s_addr;
|
holepunchpacket->addr = addr->ip4.sin_addr.s_addr;
|
||||||
holepunchpacket->port = addr->ip4.sin_port;
|
holepunchpacket->port = addr->ip4.sin_port;
|
||||||
|
|||||||
+6
-5
@@ -3081,14 +3081,12 @@ static void K_SpawnDriftSparks(player_t *player)
|
|||||||
if (leveltime % 2 == 1)
|
if (leveltime % 2 == 1)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (cv_airsparks.value)
|
const boolean onground = P_IsObjectOnGround(player->mo);
|
||||||
goto skipground;
|
|
||||||
|
|
||||||
if (!P_IsObjectOnGround(player->mo))
|
// kinda sketchy
|
||||||
|
if (!cv_airsparks.value && onground)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
skipground: // idk im sleepy
|
|
||||||
|
|
||||||
if (!player->kartstuff[k_drift] || player->kartstuff[k_driftcharge] < K_GetKartDriftSparkValue(player))
|
if (!player->kartstuff[k_drift] || player->kartstuff[k_driftcharge] < K_GetKartDriftSparkValue(player))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -3105,6 +3103,8 @@ skipground: // idk im sleepy
|
|||||||
newy = player->mo->y + P_ReturnThrustY(player->mo, thrustangle, smolscale);
|
newy = player->mo->y + P_ReturnThrustY(player->mo, thrustangle, smolscale);
|
||||||
spark = P_SpawnMobj(newx, newy, player->mo->z, MT_DRIFTSPARK);
|
spark = P_SpawnMobj(newx, newy, player->mo->z, MT_DRIFTSPARK);
|
||||||
|
|
||||||
|
spark->islocal = cv_airsparks.value && !onground;
|
||||||
|
|
||||||
P_SetTarget(&spark->target, player->mo);
|
P_SetTarget(&spark->target, player->mo);
|
||||||
spark->angle = travelangle-(ANGLE_45/5)*player->kartstuff[k_drift];
|
spark->angle = travelangle-(ANGLE_45/5)*player->kartstuff[k_drift];
|
||||||
|
|
||||||
@@ -5361,6 +5361,7 @@ FUNCINLINE static ATTRINLINE void K_SpawnNormalSpeedLines(player_t *player, bool
|
|||||||
fast->momx = 3*player->mo->momx/4;
|
fast->momx = 3*player->mo->momx/4;
|
||||||
fast->momy = 3*player->mo->momy/4;
|
fast->momy = 3*player->mo->momy/4;
|
||||||
fast->momz = 3*player->mo->momz/4;
|
fast->momz = 3*player->mo->momz/4;
|
||||||
|
fast->islocal = !synched;
|
||||||
P_SetTarget(&fast->target, player->mo); // easier lua access
|
P_SetTarget(&fast->target, player->mo); // easier lua access
|
||||||
|
|
||||||
K_MatchGenericExtraFlags(fast, player->mo);
|
K_MatchGenericExtraFlags(fast, player->mo);
|
||||||
|
|||||||
+2
-1
@@ -150,7 +150,8 @@ static const udata_field_t mobj_fields[] = {
|
|||||||
FIELD(mobj_t, cvmem, udatalib_getter_int32, udatalib_setter_int32),
|
FIELD(mobj_t, cvmem, udatalib_getter_int32, udatalib_setter_int32),
|
||||||
FIELD(mobj_t, standingslope, udatalib_getter_slope, mobj_standingslope_noset),
|
FIELD(mobj_t, standingslope, udatalib_getter_slope, mobj_standingslope_noset),
|
||||||
FIELD(mobj_t, colorized, udatalib_getter_boolean, udatalib_setter_boolean),
|
FIELD(mobj_t, colorized, udatalib_getter_boolean, udatalib_setter_boolean),
|
||||||
FIELD(mobj_t, mirrored, udatalib_getter_boolean, udatalib_setter_boolean),
|
FIELD(mobj_t, mirrored, udatalib_getter_boolean, udatalib_setter_boolean),
|
||||||
|
FIELD(mobj_t, islocal, udatalib_getter_boolean, udatalib_setter_boolean),
|
||||||
{ NULL, 0, NULL, NULL },
|
{ NULL, 0, NULL, NULL },
|
||||||
};
|
};
|
||||||
#undef FIELD
|
#undef FIELD
|
||||||
|
|||||||
+13
-12
@@ -1114,10 +1114,10 @@ static menuitem_t MP_PlayerSetupMenu[] =
|
|||||||
#ifndef NONET
|
#ifndef NONET
|
||||||
static menuitem_t MP_ConnectMenu[] =
|
static menuitem_t MP_ConnectMenu[] =
|
||||||
{
|
{
|
||||||
{IT_STRING | IT_KEYHANDLER, NULL, "", M_HandleServerSearch,0},
|
{IT_STRING | IT_CVAR, NULL, "Sort By", &cv_serversort, 0},
|
||||||
{IT_STRING | IT_CVAR, NULL, "Sort By", &cv_serversort, 16},
|
{IT_STRING | IT_KEYHANDLER, NULL, "Page", M_HandleServerPage, 8},
|
||||||
{IT_STRING | IT_KEYHANDLER, NULL, "Page", M_HandleServerPage, 24},
|
{IT_STRING | IT_CALL, NULL, "Refresh", M_Refresh, 16},
|
||||||
{IT_STRING | IT_CALL, NULL, "Refresh", M_Refresh, 32},
|
{IT_STRING | IT_KEYHANDLER, NULL, "", M_HandleServerSearch,25},
|
||||||
|
|
||||||
{IT_STRING | IT_SPACE, NULL, "", M_Connect, 48},
|
{IT_STRING | IT_SPACE, NULL, "", M_Connect, 48},
|
||||||
{IT_STRING | IT_SPACE, NULL, "", M_Connect, 60},
|
{IT_STRING | IT_SPACE, NULL, "", M_Connect, 60},
|
||||||
@@ -1133,10 +1133,10 @@ static menuitem_t MP_ConnectMenu[] =
|
|||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
mp_connect_search,
|
|
||||||
mp_connect_sort,
|
mp_connect_sort,
|
||||||
mp_connect_page,
|
mp_connect_page,
|
||||||
mp_connect_refresh,
|
mp_connect_refresh,
|
||||||
|
mp_connect_search,
|
||||||
FIRSTSERVERLINE
|
FIRSTSERVERLINE
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
@@ -6072,8 +6072,8 @@ static void M_AddonsOptions(INT32 choice)
|
|||||||
M_SetupNextMenu(&OP_AddonsOptionsDef);
|
M_SetupNextMenu(&OP_AddonsOptionsDef);
|
||||||
}
|
}
|
||||||
|
|
||||||
#define LOCATIONSTRING1 "Visit \x83SRB2.ORG/MODS\x80 to get & make addons!"
|
#define LOCATIONSTRING1 "Visit \x83mb.srb2.org/addons\x80 to get & make addons!"
|
||||||
#define LOCATIONSTRING2 "Visit \x88SRB2.ORG/MODS\x80 to get & make addons!"
|
#define LOCATIONSTRING2 "Visit \x88mb.srb2.org/addons\x80 to get & make addons!"
|
||||||
|
|
||||||
static void M_AddonsInternal(void)
|
static void M_AddonsInternal(void)
|
||||||
{
|
{
|
||||||
@@ -9884,15 +9884,16 @@ static void M_DrawConnectMenu(void)
|
|||||||
M_DrawServerLines(currentMenu->x, serverlistpage);
|
M_DrawServerLines(currentMenu->x, serverlistpage);
|
||||||
}
|
}
|
||||||
|
|
||||||
V_DrawFill(currentMenu->x, currentMenu->y, MAXSTRINGLENGTH*8+6, 8+6, 239);
|
INT32 input_y = currentMenu->menuitems[mp_connect_search].alphaKey;
|
||||||
|
|
||||||
|
V_DrawFill(currentMenu->x, currentMenu->y+input_y, MAXSTRINGLENGTH*8+6, 8+6, 239);
|
||||||
|
|
||||||
const INT32 xoff = 3, yoff = 3;
|
const INT32 xoff = 3, yoff = 3;
|
||||||
|
|
||||||
|
if (itemOn != mp_connect_search)
|
||||||
if (itemOn != 0)
|
V_DrawString(currentMenu->x+xoff, currentMenu->y+yoff+input_y, V_ALLOWLOWERCASE, menuinput.buffer);
|
||||||
V_DrawString(currentMenu->x+xoff, currentMenu->y+yoff, V_ALLOWLOWERCASE, menuinput.buffer);
|
|
||||||
else
|
else
|
||||||
M_DrawTextInput(currentMenu->x+xoff, currentMenu->y+yoff, &menuinput, 0);
|
M_DrawTextInput(currentMenu->x+xoff, currentMenu->y+yoff+input_y, &menuinput, 0);
|
||||||
|
|
||||||
localservercount = serverlistcount;
|
localservercount = serverlistcount;
|
||||||
|
|
||||||
|
|||||||
@@ -30,7 +30,11 @@ typedef union
|
|||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
msg_header_t header;
|
msg_header_t header;
|
||||||
|
#ifndef HAVE_IPV6
|
||||||
char ip[16];
|
char ip[16];
|
||||||
|
#else
|
||||||
|
char ip[sizeof "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff"];
|
||||||
|
#endif
|
||||||
char port[8];
|
char port[8];
|
||||||
char contact[32];
|
char contact[32];
|
||||||
char version[8]; // format is: x.yy.z (like 1.30.2 or 1.31)
|
char version[8]; // format is: x.yy.z (like 1.30.2 or 1.31)
|
||||||
|
|||||||
+1
-1
@@ -6089,7 +6089,7 @@ void P_MobjThinker(mobj_t *mobj)
|
|||||||
const sector_t *sec1 = mobj->subsector ? mobj->subsector->sector : NULL;
|
const sector_t *sec1 = mobj->subsector ? mobj->subsector->sector : NULL;
|
||||||
|
|
||||||
// 970 allows ANY mobj to trigger a linedef exec
|
// 970 allows ANY mobj to trigger a linedef exec
|
||||||
if (UNLIKELY(sec1 && GETSECSPECIAL(sec1->special, 2) == 8))
|
if (UNLIKELY(!mobj->islocal && sec1 && GETSECSPECIAL(sec1->special, 2) == 8)) // BEWARE: islocal does not exist in vanilla
|
||||||
{
|
{
|
||||||
sector_t *sec2;
|
sector_t *sec2;
|
||||||
sec2 = P_ThingOnSpecial3DFloor(mobj);
|
sec2 = P_ThingOnSpecial3DFloor(mobj);
|
||||||
|
|||||||
@@ -414,6 +414,7 @@ typedef struct mobj_s
|
|||||||
boolean init_salty;
|
boolean init_salty;
|
||||||
|
|
||||||
// WARNING: New fields must be added separately to savegame and Lua.
|
// WARNING: New fields must be added separately to savegame and Lua.
|
||||||
|
boolean islocal; // BEWARE: islocal does not exist in vanilla, strictly to be used for locally loaded addons to not cause desynchs with the mobj linedef trigger check. DO NOT USE THIS IN ACTUAL ADDONS YOU INTEND TO USE ON YOUR SERVER
|
||||||
} mobj_t;
|
} mobj_t;
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -3071,7 +3071,7 @@ boolean P_SetupLevel(boolean fromnetsave, boolean reloadinggamestate)
|
|||||||
|
|
||||||
if (!fromnetsave) // uglier hack
|
if (!fromnetsave) // uglier hack
|
||||||
{ // to make a newly loaded level start on the second frame.
|
{ // to make a newly loaded level start on the second frame.
|
||||||
INT32 buf = gametic % TICQUEUE;
|
INT32 buf = gametic % BACKUPTICS;
|
||||||
|
|
||||||
for (i = 0; i < MAXPLAYERS; i++)
|
for (i = 0; i < MAXPLAYERS; i++)
|
||||||
{
|
{
|
||||||
|
|||||||
+8
-20
@@ -42,13 +42,13 @@ static CV_PossibleValue_t fpscap_cons_t[] = {
|
|||||||
{0, NULL}
|
{0, NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
consvar_t cv_fpscap = {"fpscap", "Match refresh rate", CV_SAVE, fpscap_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_fpscap = {"fpscap", "Match refresh rate", CV_SAVE, fpscap_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
consvar_t cv_fpscapbg = {"fpscapbackground", "Match refresh rate", CV_SAVE, fpscap_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_fpscapbg = {"fpscapbackground", "Match refresh rate", CV_SAVE, fpscap_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
|
|
||||||
consvar_t cv_precipinterp = {"precipinterpolation", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_precipinterp = {"precipinterpolation", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
|
|
||||||
ps_metric_t ps_interp_frac = {0};
|
ps_metric_t ps_interp_frac = {0};
|
||||||
ps_metric_t ps_interp_lag = {0};
|
ps_metric_t ps_interp_lag = {0};
|
||||||
|
|
||||||
static boolean R_UseBackgroundFramerateCap(void)
|
static boolean R_UseBackgroundFramerateCap(void)
|
||||||
{
|
{
|
||||||
@@ -67,21 +67,21 @@ static boolean R_UseBackgroundFramerateCap(void)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
static UINT32 R_GetBackgroundFramerateCap(void)
|
static UINT32 R_GetFrameCap(INT32 val)
|
||||||
{
|
{
|
||||||
if (cv_fpscapbg.value == 0)
|
if (val == 0)
|
||||||
{
|
{
|
||||||
// 0: Match refresh rate
|
// 0: Match refresh rate
|
||||||
return I_GetRefreshRate();
|
return I_GetRefreshRate();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cv_fpscapbg.value < 0)
|
if (val < 0)
|
||||||
{
|
{
|
||||||
// -1: Unlimited
|
// -1: Unlimited
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
return cv_fpscapbg.value;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
UINT32 R_GetFramerateCap(void)
|
UINT32 R_GetFramerateCap(void)
|
||||||
@@ -95,22 +95,10 @@ UINT32 R_GetFramerateCap(void)
|
|||||||
|
|
||||||
if (R_UseBackgroundFramerateCap())
|
if (R_UseBackgroundFramerateCap())
|
||||||
{
|
{
|
||||||
return R_GetBackgroundFramerateCap();
|
return R_GetFrameCap(cv_fpscapbg.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cv_fpscap.value == 0)
|
return R_GetFrameCap(cv_fpscap.value);
|
||||||
{
|
|
||||||
// 0: Match refresh rate
|
|
||||||
return I_GetRefreshRate();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (cv_fpscap.value < 0)
|
|
||||||
{
|
|
||||||
// -1: Unlimited
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
return cv_fpscap.value;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean R_UsingFrameInterpolation(void)
|
boolean R_UsingFrameInterpolation(void)
|
||||||
|
|||||||
+34
-32
@@ -1133,7 +1133,6 @@ static void R_SetupSkyScale(player_t *player, camera_t *thiscam, mapheader_t *mh
|
|||||||
{
|
{
|
||||||
if (skyboxmo[1])
|
if (skyboxmo[1])
|
||||||
{
|
{
|
||||||
angle_t ang;
|
|
||||||
fixed_t x = 0, y = 0;
|
fixed_t x = 0, y = 0;
|
||||||
|
|
||||||
if (mh->skybox_scalex > 0)
|
if (mh->skybox_scalex > 0)
|
||||||
@@ -1165,8 +1164,8 @@ static void R_SetupSkyScale(player_t *player, camera_t *thiscam, mapheader_t *mh
|
|||||||
newview->y -= x;
|
newview->y -= x;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
ang = viewmobj->angle>>ANGLETOFINESHIFT;
|
angle_t ang = viewmobj->angle>>ANGLETOFINESHIFT;
|
||||||
newview->x += FixedMul(x,FINECOSINE(ang)) - FixedMul(y, FINESINE(ang));
|
newview->x += FixedMul(x,FINECOSINE(ang)) - FixedMul(y, FINESINE(ang));
|
||||||
newview->y += FixedMul(x, FINESINE(ang)) + FixedMul(y,FINECOSINE(ang));
|
newview->y += FixedMul(x, FINESINE(ang)) + FixedMul(y,FINECOSINE(ang));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -1192,14 +1191,14 @@ static void R_SetupSkyScale(player_t *player, camera_t *thiscam, mapheader_t *mh
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void R_SkyboxFrame(int s)
|
void R_SkyboxFrame(UINT8 pnum)
|
||||||
{
|
{
|
||||||
player_t *player = &players[displayplayers[s]];
|
player_t *player = &players[displayplayers[pnum]];
|
||||||
camera_t *thiscam = &camera[s];
|
camera_t *thiscam = &camera[pnum];
|
||||||
subsector_t *subsector = NULL;
|
sector_t *viewsec = NULL;
|
||||||
mapheader_t *mh = mapheaderinfo[gamemap-1];
|
mapheader_t *mh = mapheaderinfo[gamemap-1];
|
||||||
|
|
||||||
R_SetViewContext(static_cast<viewcontext_e>(VIEWCONTEXT_SKY1 + s));
|
R_SetViewContext(static_cast<viewcontext_e>(VIEWCONTEXT_SKY1 + pnum));
|
||||||
|
|
||||||
// cut-away view stuff
|
// cut-away view stuff
|
||||||
newview->sky = true;
|
newview->sky = true;
|
||||||
@@ -1215,35 +1214,38 @@ void R_SkyboxFrame(int s)
|
|||||||
|
|
||||||
R_SetupAimingFrame(player, thiscam);
|
R_SetupAimingFrame(player, thiscam);
|
||||||
|
|
||||||
newview->angle += viewmobj->angle;
|
if (!P_MobjWasRemoved(viewmobj))
|
||||||
|
{
|
||||||
|
newview->angle += viewmobj->angle;
|
||||||
|
|
||||||
newview->x = viewmobj->x;
|
newview->x = viewmobj->x;
|
||||||
newview->y = viewmobj->y;
|
newview->y = viewmobj->y;
|
||||||
newview->z = (viewmobj->spawnpoint) ? (((fixed_t)viewmobj->spawnpoint->angle)<<FRACBITS) : 0;
|
newview->z = (viewmobj->spawnpoint) ? (((fixed_t)viewmobj->spawnpoint->angle) << FRACBITS) : 0;
|
||||||
|
|
||||||
|
if (viewmobj->subsector)
|
||||||
|
viewsec = viewmobj->subsector->sector;
|
||||||
|
}
|
||||||
|
|
||||||
if (mh)
|
if (mh)
|
||||||
{
|
{
|
||||||
R_SetupSkyScale(player, thiscam, mh);
|
R_SetupSkyScale(player, thiscam, mh);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!P_MobjWasRemoved(viewmobj) && viewmobj->subsector && viewmobj->subsector->sector)
|
R_SetupCommonFrame(player, viewsec);
|
||||||
subsector = viewmobj->subsector;
|
|
||||||
|
|
||||||
R_SetupCommonFrame(player, subsector->sector);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void R_SetupFrame(int s, boolean skybox)
|
void R_SetupFrame(UINT8 pnum, boolean skybox)
|
||||||
{
|
{
|
||||||
player_t *player = &players[displayplayers[s]];
|
player_t *player = &players[displayplayers[pnum]];
|
||||||
camera_t *thiscam = &camera[s];
|
camera_t *thiscam = &camera[pnum];
|
||||||
boolean chasecam = (cv_chasecam[s].value);
|
boolean chasecam = (cv_chasecam[pnum].value);
|
||||||
sector_t * sector = NULL;
|
sector_t *viewsec = NULL;
|
||||||
|
|
||||||
R_SetViewContext(static_cast<viewcontext_e>(VIEWCONTEXT_PLAYER1 + s));
|
R_SetViewContext(static_cast<viewcontext_e>(VIEWCONTEXT_PLAYER1 + pnum));
|
||||||
|
|
||||||
if (thiscam->reset)
|
if (thiscam->reset)
|
||||||
{
|
{
|
||||||
R_ResetViewInterpolation(s);
|
R_ResetViewInterpolation(pnum);
|
||||||
thiscam->reset = false;
|
thiscam->reset = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1278,10 +1280,10 @@ void R_SetupFrame(int s, boolean skybox)
|
|||||||
newview->y = viewmobj->y;
|
newview->y = viewmobj->y;
|
||||||
newview->z = viewmobj->z + 20*FRACUNIT;
|
newview->z = viewmobj->z + 20*FRACUNIT;
|
||||||
|
|
||||||
if (viewmobj->subsector && viewmobj->subsector->sector)
|
if (viewmobj->subsector)
|
||||||
sector = viewmobj->subsector->sector;
|
viewsec = viewmobj->subsector->sector;
|
||||||
|
|
||||||
R_SetupCommonFrame(player, sector);
|
R_SetupCommonFrame(player, viewsec);
|
||||||
}
|
}
|
||||||
else if (thiscam && chasecam) // use outside cam view
|
else if (thiscam && chasecam) // use outside cam view
|
||||||
{
|
{
|
||||||
@@ -1292,10 +1294,10 @@ void R_SetupFrame(int s, boolean skybox)
|
|||||||
newview->y = thiscam->y;
|
newview->y = thiscam->y;
|
||||||
newview->z = thiscam->z + (thiscam->height>>1);
|
newview->z = thiscam->z + (thiscam->height>>1);
|
||||||
|
|
||||||
if (thiscam->subsector && thiscam->subsector->sector)
|
if (thiscam->subsector)
|
||||||
sector = thiscam->subsector->sector;
|
viewsec = thiscam->subsector->sector;
|
||||||
|
|
||||||
R_SetupCommonFrame(player, sector);
|
R_SetupCommonFrame(player, viewsec);
|
||||||
}
|
}
|
||||||
else if (player->mo) // use the player's eyes view
|
else if (player->mo) // use the player's eyes view
|
||||||
{
|
{
|
||||||
@@ -1306,10 +1308,10 @@ void R_SetupFrame(int s, boolean skybox)
|
|||||||
newview->y = viewmobj->y;
|
newview->y = viewmobj->y;
|
||||||
newview->z = player->viewz;
|
newview->z = player->viewz;
|
||||||
|
|
||||||
if (viewmobj->subsector && viewmobj->subsector->sector)
|
if (viewmobj->subsector)
|
||||||
sector = viewmobj->subsector->sector;
|
viewsec = viewmobj->subsector->sector;
|
||||||
|
|
||||||
R_SetupCommonFrame(player, sector);
|
R_SetupCommonFrame(player, viewsec);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -215,8 +215,8 @@ void R_SetViewSize(void);
|
|||||||
void R_ExecuteSetViewSize(void);
|
void R_ExecuteSetViewSize(void);
|
||||||
|
|
||||||
fixed_t R_GetPlayerFov(player_t *player);
|
fixed_t R_GetPlayerFov(player_t *player);
|
||||||
void R_SkyboxFrame(int s);
|
void R_SkyboxFrame(UINT8 pnum);
|
||||||
void R_SetupFrame(int s, boolean skybox);
|
void R_SetupFrame(UINT8 pnum, boolean skybox);
|
||||||
|
|
||||||
// Called by G_Drawer.
|
// Called by G_Drawer.
|
||||||
void R_RenderPlayerView(player_t *player);
|
void R_RenderPlayerView(player_t *player);
|
||||||
|
|||||||
+17
-16
@@ -419,27 +419,28 @@ static void ST_drawDebugInfo(void)
|
|||||||
|
|
||||||
static void ST_drawLevelTitle(void)
|
static void ST_drawLevelTitle(void)
|
||||||
{
|
{
|
||||||
char *lvlttl = mapheaderinfo[gamemap-1]->lvlttl;
|
char *lvlttl, *subttl, *zonttl, *actnum;
|
||||||
char *subttl = mapheaderinfo[gamemap-1]->subttl;
|
INT32 lvlttlxpos, ttlnumxpos, zonexpos;
|
||||||
char *zonttl = mapheaderinfo[gamemap-1]->zonttl; // SRB2kart
|
INT32 dupcalc;
|
||||||
char *actnum = mapheaderinfo[gamemap-1]->actnum;
|
UINT8 gtc;
|
||||||
INT32 lvlttlxpos;
|
|
||||||
INT32 ttlnumxpos;
|
|
||||||
INT32 zonexpos;
|
|
||||||
INT32 dupcalc = (vid.width/vid.dupx);
|
|
||||||
UINT8 gtc = G_GetGametypeColor(gametype);
|
|
||||||
INT32 sub = 0;
|
INT32 sub = 0;
|
||||||
INT32 bary = (splitscreen)
|
INT32 bary;
|
||||||
? BASEVIDHEIGHT/2
|
|
||||||
: 163;
|
|
||||||
INT32 lvlw;
|
INT32 lvlw;
|
||||||
|
|
||||||
if (!cv_stagetitle.value)
|
if (!cv_stagetitle.value || (timeinmap > 113))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (timeinmap > 113)
|
if (*mapheaderinfo[gamemap-1]->lvlttl == '\0')
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
lvlttl = mapheaderinfo[gamemap-1]->lvlttl;
|
||||||
|
subttl = mapheaderinfo[gamemap-1]->subttl;
|
||||||
|
zonttl = mapheaderinfo[gamemap-1]->zonttl; // SRB2kart
|
||||||
|
actnum = mapheaderinfo[gamemap-1]->actnum;
|
||||||
|
dupcalc = (vid.width/vid.dupx);
|
||||||
|
gtc = G_GetGametypeColor(gametype);
|
||||||
|
bary = (splitscreen) ? BASEVIDHEIGHT/2 : 163;
|
||||||
|
|
||||||
lvlw = V_LevelNameWidth(lvlttl);
|
lvlw = V_LevelNameWidth(lvlttl);
|
||||||
|
|
||||||
if (actnum[0])
|
if (actnum[0])
|
||||||
@@ -603,7 +604,7 @@ static void ST_overlayDrawer(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// draw level title Tails
|
// draw level title Tails
|
||||||
if (*mapheaderinfo[gamemap-1]->lvlttl != '\0' && !(hu_showscores && (netgame || multiplayer) && !mapreset) && LUA_HudEnabled(hud_stagetitle) && !forceshowhud)
|
if (!(hu_showscores && (netgame || multiplayer) && !mapreset) && LUA_HudEnabled(hud_stagetitle) && !forceshowhud)
|
||||||
ST_drawLevelTitle();
|
ST_drawLevelTitle();
|
||||||
|
|
||||||
if (!hu_showscores && netgame && !mapreset)
|
if (!hu_showscores && netgame && !mapreset)
|
||||||
@@ -740,7 +741,7 @@ void ST_Drawer(void)
|
|||||||
UINT8 i;
|
UINT8 i;
|
||||||
|
|
||||||
#ifdef SEENAMES
|
#ifdef SEENAMES
|
||||||
if (cv_seenames.value && cv_allowseenames.value && displayplayers[0] == consoleplayer && seenplayer && seenplayer->mo && !mapreset)
|
if (UNLIKELY(cv_seenames.value && cv_allowseenames.value && displayplayers[0] == consoleplayer && seenplayer && seenplayer->mo && !mapreset))
|
||||||
{
|
{
|
||||||
if (cv_seenames.value == 1)
|
if (cv_seenames.value == 1)
|
||||||
V_DrawCenteredString(BASEVIDWIDTH/2, BASEVIDHEIGHT/2 + 15, V_HUDTRANSHALF, player_names[seenplayer-players]);
|
V_DrawCenteredString(BASEVIDWIDTH/2, BASEVIDHEIGHT/2 + 15, V_HUDTRANSHALF, player_names[seenplayer-players]);
|
||||||
|
|||||||
Reference in new issue
Block a user