getmap respawn fix

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1470 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
driAn
2007-12-22 19:53:53 +00:00
parent f261d257b7
commit c3a95a3879
+9 -4
View File
@@ -1557,7 +1557,7 @@ void welcomepacket(ucharbuf &p, int n)
putint(p, SV_TIMEUP);
putint(p, minremain);
}
if(!configsets.length() || numcl > 1)
if(numcl > 1)
{
putint(p, SV_ITEMLIST);
loopv(sents) if(sents[i].spawned)
@@ -1917,9 +1917,14 @@ void process(ENetPacket *packet, int sender, int chan) // sender may be -1
case SV_RECVMAP:
{
ENetPacket *mappacket = getmapserv(sender);
if(mappacket) sendpacket(sender, 2, mappacket);
else sendservmsg("no map to get", sender);
ENetPacket *mappacket = getmapserv(cl->clientnum);
if(mappacket)
{
sendpacket(cl->clientnum, 2, mappacket);
cl->state.state = CS_DEAD; // allow respawn after map download
cl->state.reset();
}
else sendservmsg("no map to get", cl->clientnum);
break;
}