MAX_STR=MAX_STR_LENGTH and dont send/recieve the pName, but set it to NULL. (It is not needed but for .txt templates.)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4295 4a71c877-e1ca-e34f-864e-861f7616d084master
parent
710282fb60
commit
5530bc9209
|
@ -90,7 +90,7 @@ char playerName[MAX_PLAYERS][MAX_STR_LENGTH]; //Array to store all player
|
||||||
/* multiplayer message stack stuff */
|
/* multiplayer message stack stuff */
|
||||||
/////////////////////////////////////
|
/////////////////////////////////////
|
||||||
#define MAX_MSG_STACK 50
|
#define MAX_MSG_STACK 50
|
||||||
#define MAX_STR 255
|
#define MAX_STR MAX_STR_LENGTH
|
||||||
|
|
||||||
static char msgStr[MAX_MSG_STACK][MAX_STR];
|
static char msgStr[MAX_MSG_STACK][MAX_STR];
|
||||||
static SDWORD msgPlFrom[MAX_MSG_STACK];
|
static SDWORD msgPlFrom[MAX_MSG_STACK];
|
||||||
|
@ -1361,7 +1361,6 @@ BOOL sendTemplate(DROID_TEMPLATE *pTempl)
|
||||||
NETuint8_t(&player);
|
NETuint8_t(&player);
|
||||||
NETuint32_t(&pTempl->ref);
|
NETuint32_t(&pTempl->ref);
|
||||||
NETstring(pTempl->aName, sizeof(pTempl->aName));
|
NETstring(pTempl->aName, sizeof(pTempl->aName));
|
||||||
NETstring(pTempl->pName, strlen(pTempl->pName) + 1);
|
|
||||||
NETuint8_t(&pTempl->NameVersion);
|
NETuint8_t(&pTempl->NameVersion);
|
||||||
|
|
||||||
for (i = 0; i < DROID_MAXCOMP; i++)
|
for (i = 0; i < DROID_MAXCOMP; i++)
|
||||||
|
@ -1393,7 +1392,6 @@ BOOL recvTemplate()
|
||||||
DROID_TEMPLATE *psTempl;
|
DROID_TEMPLATE *psTempl;
|
||||||
DROID_TEMPLATE t, *pT = &t;
|
DROID_TEMPLATE t, *pT = &t;
|
||||||
int i;
|
int i;
|
||||||
char nameBuf[MAX_STR_LENGTH];
|
|
||||||
|
|
||||||
NETbeginDecode(NET_TEMPLATE);
|
NETbeginDecode(NET_TEMPLATE);
|
||||||
NETuint8_t(&player);
|
NETuint8_t(&player);
|
||||||
|
@ -1401,7 +1399,6 @@ BOOL recvTemplate()
|
||||||
|
|
||||||
NETuint32_t(&pT->ref);
|
NETuint32_t(&pT->ref);
|
||||||
NETstring(pT->aName, sizeof(pT->aName));
|
NETstring(pT->aName, sizeof(pT->aName));
|
||||||
NETstring(nameBuf, MAX_STR_LENGTH);
|
|
||||||
NETuint8_t(&pT->NameVersion);
|
NETuint8_t(&pT->NameVersion);
|
||||||
|
|
||||||
for (i = 0; i < DROID_MAXCOMP; i++)
|
for (i = 0; i < DROID_MAXCOMP; i++)
|
||||||
|
@ -1425,7 +1422,7 @@ BOOL recvTemplate()
|
||||||
NETend();
|
NETend();
|
||||||
|
|
||||||
t.psNext = NULL;
|
t.psNext = NULL;
|
||||||
t.pName = strdup(nameBuf);
|
t.pName = NULL;
|
||||||
|
|
||||||
psTempl = IdToTemplate(t.multiPlayerID,player);
|
psTempl = IdToTemplate(t.multiPlayerID,player);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue