cvar_t timestamps = {CVAR_SAVE, "timestamps", "0"};
cvar_t timeformat = {CVAR_SAVE, "timeformat", "[%b %e %X] "};
+cvar_t sv_maxplayers = {0, "maxplayers", "8"};
+
/*
================
Host_EndGame
else
{
// default players in some games, singleplayer in most
- if (gamemode != GAME_TRANSFUSION && gamemode != GAME_GOODVSBAD2 && gamemode != GAME_NEXUIZ || gamemode == GAME_BATTLEMECH)
+ if (gamemode != GAME_TRANSFUSION && gamemode != GAME_GOODVSBAD2 && gamemode != GAME_NEXUIZ && gamemode != GAME_BATTLEMECH)
numplayers = 1;
}
}
Cvar_RegisterVariable (×tamps);
Cvar_RegisterVariable (&timeformat);
+ Cvar_RegisterVariable(&sv_maxplayers);
+
Host_ServerOptions ();
}
#define MASTER_PORT 27950
-cvar_t sv_maxplayers = {0, "maxplayers", "8"};
cvar_t sv_public = {0, "sv_public", "0"};
static cvar_t sv_heartbeatperiod = {CVAR_SAVE, "sv_heartbeatperiod", "180"};
extern void SV_ConnectClient(int clientnum, netconn_t *netconnection);
int NetConn_ServerParsePacket(lhnetsocket_t *mysocket, qbyte *data, int length, lhnetaddress_t *peeraddress)
{
- int i, n, ret, clientnum, responselength, best;
+ int i, n, ret, clientnum, responselength, best, clientcount;
double besttime;
client_t *client;
netconn_t *conn;
Cvar_RegisterVariable(&sv_netport);
Cvar_RegisterVariable(&sv_netaddress);
Cvar_RegisterVariable(&sv_netaddress_ipv6);
- Cvar_RegisterVariable(&sv_maxplayers);
Cvar_RegisterVariable(&sv_public);
Cvar_RegisterVariable(&sv_heartbeatperiod);
for (masternum = 0;sv_masters[masternum].name;masternum++)
//
//============================================================================
-extern cvar_t sv_maxplayers;
extern sizebuf_t net_message;
int NetConn_SendReliableMessage(netconn_t *conn, sizebuf_t *data);
}
}
cl_entities[enumber].state_current.number = enumber;
+#if 0
+ // debugging code
if (cl_entities[enumber].state_current.active != cl_entities[enumber].state_previous.active)
{
if (cl_entities[enumber].state_current.active)
else if (cl_entities[enumber].state_current.active)
Con_Printf("entity #%i has become inactive\n");
}
+#endif
CL_MoveLerpEntityStates(&cl_entities[enumber]);
cl_entities_active[enumber] = true;
if (d->currentcommit)
extern cvar_t sv_aim;
extern cvar_t sv_stepheight;
extern cvar_t sv_jumpstep;
+extern cvar_t sv_maxplayers;
extern mempool_t *sv_clients_mempool;
extern mempool_t *sv_edicts_mempool;