Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/JACoders/OpenJK
Browse files Browse the repository at this point in the history
  • Loading branch information
eezstreet committed Jan 20, 2014
2 parents c7d186c + b1506fd commit 0984fd7
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion codemp/client/client.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ typedef struct outPacket_s {
// the parseEntities array must be large enough to hold PACKET_BACKUP frames of
// entities, so that when a delta compressed message arives from the server
// it can be un-deltad from the original
#define MAX_PARSE_ENTITIES 2048
#define MAX_PARSE_ENTITIES ( PACKET_BACKUP * MAX_SNAPSHOT_ENTITIES )

extern int g_console_field_width;

Expand Down
2 changes: 2 additions & 0 deletions codemp/qcommon/qcommon.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ NET

#define MAX_PACKET_USERCMDS 32 // max number of usercmd_t in a packet

#define MAX_SNAPSHOT_ENTITIES 256

#define PORT_ANY -1

#define MAX_RELIABLE_COMMANDS 128 // max string commands buffered for restransmit
Expand Down
2 changes: 1 addition & 1 deletion codemp/server/server.h
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ typedef struct serverStatic_s {
int snapFlagServerBit; // ^= SNAPFLAG_SERVERCOUNT every SV_SpawnServer()

client_t *clients; // [sv_maxclients->integer];
int numSnapshotEntities; // sv_maxclients->integer*PACKET_BACKUP*MAX_PACKET_ENTITIES
int numSnapshotEntities; // sv_maxclients->integer*PACKET_BACKUP*MAX_SNAPSHOT_ENTITIES
int nextSnapshotEntities; // next snapshotEntities to use
entityState_t *snapshotEntities; // [numSnapshotEntities]
int nextHeartbeatTime;
Expand Down
8 changes: 4 additions & 4 deletions codemp/server/sv_init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -252,13 +252,13 @@ void SV_Startup( void ) {

svs.clients = (struct client_s *)Z_Malloc (sizeof(client_t) * sv_maxclients->integer, TAG_CLIENTS, qtrue );
if ( com_dedicated->integer ) {
svs.numSnapshotEntities = sv_maxclients->integer * PACKET_BACKUP * 64;
svs.numSnapshotEntities = sv_maxclients->integer * PACKET_BACKUP * MAX_SNAPSHOT_ENTITIES;
Cvar_Set( "r_ghoul2animsmooth", "0");
Cvar_Set( "r_ghoul2unsqashaftersmooth", "0");

} else {
// we don't need nearly as many when playing locally
svs.numSnapshotEntities = sv_maxclients->integer * 4 * 64;
svs.numSnapshotEntities = sv_maxclients->integer * 4 * MAX_SNAPSHOT_ENTITIES;
}
svs.initialized = qtrue;

Expand Down Expand Up @@ -343,10 +343,10 @@ void SV_ChangeMaxClients( void ) {

// allocate new snapshot entities
if ( com_dedicated->integer ) {
svs.numSnapshotEntities = sv_maxclients->integer * PACKET_BACKUP * 64;
svs.numSnapshotEntities = sv_maxclients->integer * PACKET_BACKUP * MAX_SNAPSHOT_ENTITIES;
} else {
// we don't need nearly as many when playing locally
svs.numSnapshotEntities = sv_maxclients->integer * 4 * 64;
svs.numSnapshotEntities = sv_maxclients->integer * 4 * MAX_SNAPSHOT_ENTITIES;
}
}

Expand Down
1 change: 0 additions & 1 deletion codemp/server/sv_snapshot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,6 @@ Build a client snapshot structure
=============================================================================
*/

#define MAX_SNAPSHOT_ENTITIES 1024
typedef struct snapshotEntityNumbers_s {
int numSnapshotEntities;
int snapshotEntities[MAX_SNAPSHOT_ENTITIES];
Expand Down

0 comments on commit 0984fd7

Please sign in to comment.