MSG_WriteByte (&client->netconnection->message, 1);
client->spawned = false; // need prespawn, spawn, etc
+ client->sendsignon = 1; // send this message, and increment to 2, 2 will be set to 0 by the prespawn command
// clear movement info until client enters the new level properly
memset(&client->cmd, 0, sizeof(client->cmd));
statsf[STAT_MOVEVARS_AIRACCEL_SIDEWAYS_FRICTION] = sv_airaccel_sideways_friction.value;
statsf[STAT_MOVEVARS_FRICTION] = sv_friction.value;
statsf[STAT_MOVEVARS_WATERFRICTION] = sv_waterfriction.value >= 0 ? sv_waterfriction.value : sv_friction.value;
+ statsf[STAT_FRAGLIMIT] = fraglimit.value;
+ statsf[STAT_TIMELIMIT] = timelimit.value;
if (sv.protocol == PROTOCOL_QUAKE || sv.protocol == PROTOCOL_QUAKEDP || sv.protocol == PROTOCOL_NEHAHRAMOVIE || sv.protocol == PROTOCOL_DARKPLACES1 || sv.protocol == PROTOCOL_DARKPLACES2 || sv.protocol == PROTOCOL_DARKPLACES3 || sv.protocol == PROTOCOL_DARKPLACES4 || sv.protocol == PROTOCOL_DARKPLACES5)
{
if (gamemode == GAME_HIPNOTIC || gamemode == GAME_ROGUE || gamemode == GAME_NEXUIZ)
{
for (i = 0;i < 32;i++)
- if (stats[STAT_WEAPON] & (1<<i))
+ if (stats[STAT_ACTIVEWEAPON] & (1<<i))
break;
MSG_WriteByte (msg, i);
}
else
- MSG_WriteByte (msg, stats[STAT_WEAPON]);
+ MSG_WriteByte (msg, stats[STAT_ACTIVEWEAPON]);
if (bits & SU_VIEWZOOM)
{
if (sv.protocol == PROTOCOL_DARKPLACES2 || sv.protocol == PROTOCOL_DARKPLACES3 || sv.protocol == PROTOCOL_DARKPLACES4)
// the client off if they overflow, and quake protocol shows less than
// the full entity set if rate limited
clientrate = max(NET_MINRATE, client->rate);
- maxsize = 1400;
- maxsize2 = 1400;
+ maxsize = 1024;
+ maxsize2 = 1024;
}
else
{
if (!NetConn_CanSend(client->netconnection))
{
// send the datagram
- //NetConn_SendUnreliableMessage (client->netconnection, &msg, sv.protocol, clientrate);
+ //NetConn_SendUnreliableMessage (client->netconnection, &msg, sv.protocol, clientrate, true);
return;
}
else if (host_client->spawned)
}
// send the datagram
- NetConn_SendUnreliableMessage (client->netconnection, &msg, sv.protocol, clientrate);
+ NetConn_SendUnreliableMessage (client->netconnection, &msg, sv.protocol, clientrate, client->sendsignon == 2);
+ if (client->sendsignon == 1 && !client->netconnection->message.cursize)
+ client->sendsignon = 2; // prevent reliable until client sends prespawn (this is the keepalive phase)
}
/*
if (strcmp(host_client->old_name, host_client->name))
{
if (host_client->spawned)
- SV_BroadcastPrintf("%s^%i changed name to %s\n", host_client->old_name, STRING_COLOR_DEFAULT, host_client->name);
+ SV_BroadcastPrintf("%s changed name to %s\n", host_client->old_name, host_client->name);
strlcpy(host_client->old_name, host_client->name, sizeof(host_client->old_name));
// send notification to all clients
MSG_WriteByte (&sv.reliable_datagram, svc_updatename);
host_client->download_expectedposition = 0;
host_client->download_started = false;
+ host_client->sendsignon = true; // make sure this message is sent
// the rest of the download process is handled in SV_SendClientDatagram
// and other code dealing with svc_downloaddata and clc_ackdownloaddata
prog->numbuiltins = vm_sv_numbuiltins;
prog->headercrc = PROGHEADER_CRC;
prog->max_edicts = 512;
- prog->limit_edicts = MAX_EDICTS;
+ if (sv.protocol == PROTOCOL_QUAKE)
+ prog->limit_edicts = 640; // before quake mission pack 1 this was 512
+ else if (sv.protocol == PROTOCOL_QUAKEDP)
+ prog->limit_edicts = 2048; // guessing
+ else if (sv.protocol == PROTOCOL_NEHAHRAMOVIE)
+ prog->limit_edicts = 2048; // guessing!
+ else
+ prog->limit_edicts = MAX_EDICTS;
prog->reserved_edicts = svs.maxclients;
prog->edictprivate_size = sizeof(edict_engineprivate_t);
prog->name = "server";