Skip to content

Commit

Permalink
Const-ify server state pointers in client_t.
Browse files Browse the repository at this point in the history
  • Loading branch information
skullernet authored and res2k committed Jan 2, 2025
1 parent e0c584d commit 61af7f7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions src/server/server.h
Original file line number Diff line number Diff line change
Expand Up @@ -351,14 +351,14 @@ typedef struct client_s {
server_entity_packed_t *entities; // [num_entities]

// server state pointers (hack for MVD channels implementation)
configstring_t *configstrings;
const cs_remap_t *csr;
char *gamedir, *mapname;
const game_export_t *ge;
cm_t *cm;
int infonum; // slot number visible to client
int spawncount;
int maxclients;
const configstring_t *configstrings;
const cs_remap_t *csr;
const char *gamedir, *mapname;
const game_export_t *ge;
const cm_t *cm;
int infonum; // slot number visible to client
int spawncount;
int maxclients;

// netchan type dependent methods
void (*AddMessage)(struct client_s *, const byte *, size_t, bool);
Expand Down
2 changes: 1 addition & 1 deletion src/server/user.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ static void write_gamestate(void)
memset(spawnbaselines, 0, sizeof(spawnbaselines));

for (int i = 0; i < sv_client->csr->end; i++) {
char* string = sv_client->configstrings[i];
const char* string = sv_client->configstrings[i];
if (!string[0]) {
continue;
}
Expand Down

0 comments on commit 61af7f7

Please sign in to comment.