diff --git a/src/client/cl_download.c b/src/client/cl_download.c index df599d2e..8dff62d4 100644 --- a/src/client/cl_download.c +++ b/src/client/cl_download.c @@ -72,9 +72,6 @@ static const char *env_suf[6] = {"rt", "bk", "lf", "ft", "up", "dn"}; #define ENV_CNT (CS_PLAYERSKINS + MAX_CLIENTS * PLAYER_MULT) #define TEXTURE_CNT (ENV_CNT + 13) -mapsurface_t* CM_MapSurfaces(int surfnum); -int CM_MapSurfacesNum(void); - void CL_RequestNextDownload(void) { diff --git a/src/client/cl_main.c b/src/client/cl_main.c index bccbb28b..e50b2796 100644 --- a/src/client/cl_main.c +++ b/src/client/cl_main.c @@ -145,7 +145,7 @@ CL_Stop_f(void) * record * Begins recording a demo from the current position */ -void +static void CL_Record_f(void) { char name[MAX_OSPATH]; @@ -260,7 +260,7 @@ CL_Record_f(void) fwrite(buf.data, buf.cursize, 1, cls.demofile); } -void +static void CL_Setenv_f(void) { int argc = Cmd_Argc(); @@ -298,7 +298,7 @@ CL_Setenv_f(void) } } -void +static void CL_Pause_f(void) { /* never pause in multiplayer */ @@ -360,7 +360,7 @@ CL_ParseStatusMessage(void) /* * Load or download any custom player skins and models */ -void +static void CL_Skins_f(void) { int i; @@ -422,7 +422,7 @@ CL_FixUpGender(void) } } -void +static void CL_Userinfo_f(void) { Com_Printf("User info settings:\n"); @@ -464,7 +464,7 @@ void CL_ResetPrecacheCheck (void) * The server will send this command right * before allowing the client into the server */ -void +static void CL_Precache_f(void) { /* Yet another hack to let old demos work */ @@ -487,12 +487,13 @@ CL_Precache_f(void) CL_RequestNextDownload(); } -void CL_CurrentMap_f(void) +static void +CL_CurrentMap_f(void) { Com_Printf("%s\n", cl.configstrings[CS_MODELS + 1]); } -void +static void CL_InitLocal(void) { cls.state = ca_disconnected; @@ -691,9 +692,9 @@ cheatvar_t cheatvars[] = { {NULL, NULL} }; -int numcheatvars; +static int numcheatvars; -void +static void CL_FixCvarCheats(void) { int i; @@ -726,7 +727,7 @@ CL_FixCvarCheats(void) } } -void +static void CL_UpdateWindowedMouse(void) { if (cls.disable_screen) diff --git a/src/client/cl_network.c b/src/client/cl_network.c index 7f068192..17d82da6 100644 --- a/src/client/cl_network.c +++ b/src/client/cl_network.c @@ -27,8 +27,6 @@ #include "header/client.h" #include "../client/sound/header/local.h" -void CL_ParseStatusMessage(void); - extern cvar_t *rcon_client_password; extern cvar_t *rcon_address; extern cvar_t *cl_timeout; @@ -278,8 +276,6 @@ CL_Rcon_f(void) NET_SendPacket(NS_CLIENT, strlen(message) + 1, message, to); } -void CL_WriteConfiguration(void); - /* * Goes from a connected state to full screen * console state Sends a disconnect message to diff --git a/src/client/cl_parse.c b/src/client/cl_parse.c index 1a8f4721..6e5b073b 100644 --- a/src/client/cl_parse.c +++ b/src/client/cl_parse.c @@ -27,12 +27,9 @@ #include "header/client.h" #include "input/header/input.h" -void CL_DownloadFileName(char *dest, int destlen, char *fn); -void CL_ParseDownload(void); +static int bitcounts[32]; /* just for protocol profiling */ -int bitcounts[32]; /* just for protocol profiling */ - -char *svc_strings[256] = { +static char *svc_strings[256] = { "svc_bad", "svc_muzzleflash", diff --git a/src/client/header/client.h b/src/client/header/client.h index 821959e2..8fbfcb9f 100644 --- a/src/client/header/client.h +++ b/src/client/header/client.h @@ -493,15 +493,15 @@ char *Key_KeynumToString (int keynum); void CL_WriteDemoMessage (void); void CL_Stop_f (void); -void CL_Record_f (void); - -extern char *svc_strings[256]; +void CL_ParseStatusMessage(void); void CL_ParseServerMessage (void); void CL_LoadClientinfo (clientinfo_t *ci, char *s); void SHOWNET(char *s); void CL_ParseClientinfo (int player); void CL_Download_f (void); +void CL_DownloadFileName(char *dest, int destlen, char *fn); +void CL_ParseDownload(void); extern int gun_frame; diff --git a/src/client/refresh/files/models.c b/src/client/refresh/files/models.c index ac26b3a0..7197b39b 100644 --- a/src/client/refresh/files/models.c +++ b/src/client/refresh/files/models.c @@ -1572,10 +1572,11 @@ Mod_ReLoadSkins(struct image_s **skins, findimage_t find_image, loadimage_t load skins[i] = find_image(sprout->frames[i].name, it_sprite); if (!skins[i]) { - char newname[MAX_SKINNAME]; + /* SKIN NAME + sprites prefix */ + char newname[MAX_QPATH + 16]; /* heretic2 sprites have no "sprites/" prefix */ - snprintf(newname, MAX_SKINNAME, + snprintf(newname, sizeof(newname) - 1, "sprites/%s", sprout->frames[i].name); skins[i] = find_image(newname, it_sprite); } diff --git a/src/client/refresh/files/wal.c b/src/client/refresh/files/wal.c index 6459a5ca..98693698 100644 --- a/src/client/refresh/files/wal.c +++ b/src/client/refresh/files/wal.c @@ -26,7 +26,7 @@ #include "../ref_shared.h" -struct image_s * +static struct image_s * LoadWalQ2(const char *origname, const char *name, const byte *data, size_t size, imagetype_t type, loadimage_t load_image) { @@ -58,7 +58,7 @@ LoadWalQ2(const char *origname, const char *name, const byte *data, size_t size, (size - ofs), type, 8); } -struct image_s * +static struct image_s * LoadWalDKM(const char *origname, const char *name, const byte *data, size_t size, imagetype_t type, loadimage_t load_image) { diff --git a/src/client/refresh/gl1/qgl.c b/src/client/refresh/gl1/qgl.c index 78d991e7..8dd382db 100644 --- a/src/client/refresh/gl1/qgl.c +++ b/src/client/refresh/gl1/qgl.c @@ -45,7 +45,7 @@ void (APIENTRY *qglColorTableEXT)(GLenum, GLenum, GLsizei, GLenum, GLenum, /* ========================================================================= */ -void QGL_EXT_Reset ( void ) +static void QGL_EXT_Reset ( void ) { qglPointParameterfARB = NULL; qglPointParameterfvARB = NULL; diff --git a/src/client/sound/header/local.h b/src/client/sound/header/local.h index cde7038f..0db2f9c9 100644 --- a/src/client/sound/header/local.h +++ b/src/client/sound/header/local.h @@ -289,8 +289,8 @@ void SDL_Spatialize(channel_t *ch); /* Only begin attenuating sound volumes when outside the FULLVOLUME range */ - #define SOUND_FULLVOLUME 1.0 - #define SOUND_LOOPATTENUATE 0.003 +#define SOUND_FULLVOLUME 1.0 +#define SOUND_LOOPATTENUATE 0.003 /* number of buffers in flight (needed for ogg) */ extern int active_buffers; @@ -356,6 +356,8 @@ void AL_RawSamples(int samples, int rate, int width, */ void AL_UnqueueRawSamples(); +void AL_Underwater(); +void AL_Overwater(); + #endif /* USE_OPENAL */ #endif /* CL_SOUND_LOCAL_H */ - diff --git a/src/client/sound/ogg.c b/src/client/sound/ogg.c index 349960b4..617ed10c 100644 --- a/src/client/sound/ogg.c +++ b/src/client/sound/ogg.c @@ -654,7 +654,7 @@ OGG_TogglePlayback(void) /* * Prints a help message for the 'ogg' cmd. */ -void +static void OGG_HelpMsg(void) { Com_Printf("Unknown sub command %s\n\n", Cmd_Argv(1)); diff --git a/src/common/cvar.c b/src/common/cvar.c index 55a0c833..b1e632d5 100644 --- a/src/common/cvar.c +++ b/src/common/cvar.c @@ -295,7 +295,7 @@ Cvar_Get(const char *var_name, const char *var_value, int flags) return var; } -cvar_t * +static cvar_t * Cvar_Set2(const char *var_name, const char *value, qboolean force) { cvar_t *var; @@ -530,7 +530,7 @@ Cvar_Command(void) /* * Allows setting and defining of arbitrary cvars from console */ -void +static void Cvar_Set_f(void) { char *firstarg; @@ -615,7 +615,7 @@ Cvar_WriteVariables(const char *path) fclose(f); } -void +static void Cvar_List_f(void) { cvar_t *var; @@ -678,7 +678,7 @@ Cvar_List_f(void) qboolean userinfo_modified; -char * +static char * Cvar_BitInfo(int bit) { static char info[MAX_INFO_STRING]; @@ -721,146 +721,150 @@ Cvar_Serverinfo(void) * Increments the given cvar by 1 or adds the * optional given float value to it. */ -void Cvar_Inc_f(void) +static void +Cvar_Inc_f(void) { char string[MAX_QPATH]; - cvar_t *var; - float value; + cvar_t *var; + float value; - if (Cmd_Argc() < 2) + if (Cmd_Argc() < 2) { - Com_Printf("Usage: %s [value]\n", Cmd_Argv(0)); - return; - } + Com_Printf("Usage: %s [value]\n", Cmd_Argv(0)); + return; + } - var = Cvar_FindVar(Cmd_Argv(1)); + var = Cvar_FindVar(Cmd_Argv(1)); - if (!var) + if (!var) { - Com_Printf("%s is not a cvar\n", Cmd_Argv(1)); - return; - } + Com_Printf("%s is not a cvar\n", Cmd_Argv(1)); + return; + } - if (!Cvar_IsFloat(var->string)) + if (!Cvar_IsFloat(var->string)) { - Com_Printf("\"%s\" is \"%s\", can't %s\n", var->name, var->string, Cmd_Argv(0)); - return; - } + Com_Printf("\"%s\" is \"%s\", can't %s\n", var->name, var->string, Cmd_Argv(0)); + return; + } - value = 1; + value = 1; - if (Cmd_Argc() > 2) { - value = atof(Cmd_Argv(2)); - } + if (Cmd_Argc() > 2) { + value = atof(Cmd_Argv(2)); + } - if (!strcmp(Cmd_Argv(0), "dec")) { - value = -value; - } + if (!strcmp(Cmd_Argv(0), "dec")) { + value = -value; + } Com_sprintf(string, sizeof(string), "%f", var->value + value); - Cvar_Set(var->name, string); + Cvar_Set(var->name, string); } /* * Resets a cvar to its default value. */ -void Cvar_Reset_f(void) +static void +Cvar_Reset_f(void) { - cvar_t *var; + cvar_t *var; - if (Cmd_Argc() < 2) + if (Cmd_Argc() < 2) { - Com_Printf("Usage: %s \n", Cmd_Argv(0)); - return; - } + Com_Printf("Usage: %s \n", Cmd_Argv(0)); + return; + } - var = Cvar_FindVar(Cmd_Argv(1)); + var = Cvar_FindVar(Cmd_Argv(1)); - if (!var) + if (!var) { - Com_Printf("%s is not a cvar\n", Cmd_Argv(1)); - return; - } + Com_Printf("%s is not a cvar\n", Cmd_Argv(1)); + return; + } Com_Printf("%s: %s\n", var->name, var->default_string); - Cvar_Set(var->name, var->default_string); + Cvar_Set(var->name, var->default_string); } /* * Resets all known cvar (with the exception of `game') to * their default values. */ -void Cvar_ResetAll_f(void) +static void +Cvar_ResetAll_f(void) { - cvar_t *var; + cvar_t *var; - for (var = cvar_vars; var; var = var->next) + for (var = cvar_vars; var; var = var->next) { - if ((var->flags & CVAR_NOSET)) + if ((var->flags & CVAR_NOSET)) { - continue; + continue; } else if (strcmp(var->name, "game") == 0) { - continue; + continue; } - Cvar_Set(var->name, var->default_string); - } + Cvar_Set(var->name, var->default_string); + } } /* * Toggles a cvar between 0 and 1 or the given values. */ -void Cvar_Toggle_f(void) +static void +Cvar_Toggle_f(void) { - cvar_t *var; - int i, argc = Cmd_Argc(); + cvar_t *var; + int i, argc = Cmd_Argc(); - if (argc < 2) + if (argc < 2) { - Com_Printf("Usage: %s [values]\n", Cmd_Argv(0)); - return; - } + Com_Printf("Usage: %s [values]\n", Cmd_Argv(0)); + return; + } - var = Cvar_FindVar(Cmd_Argv(1)); + var = Cvar_FindVar(Cmd_Argv(1)); - if (!var) + if (!var) { - Com_Printf("%s is not a cvar\n", Cmd_Argv(1)); - return; - } + Com_Printf("%s is not a cvar\n", Cmd_Argv(1)); + return; + } - if (argc < 3) + if (argc < 3) { - if (!strcmp(var->string, "0")) + if (!strcmp(var->string, "0")) { - Cvar_Set(var->name, "1"); - } + Cvar_Set(var->name, "1"); + } else if (!strcmp(var->string, "1")) { - Cvar_Set(var->name, "0"); - } + Cvar_Set(var->name, "0"); + } else { - Com_Printf("\"%s\" is \"%s\", can't toggle\n", var->name, var->string); - } + Com_Printf("\"%s\" is \"%s\", can't toggle\n", var->name, var->string); + } - return; - } + return; + } - for (i = 0; i < argc - 2; i++) + for (i = 0; i < argc - 2; i++) { - if (!Q_stricmp(var->string, Cmd_Argv(2 + i))) + if (!Q_stricmp(var->string, Cmd_Argv(2 + i))) { - i = (i + 1) % (argc - 2); - Cvar_Set(var->name, Cmd_Argv(2 + i)); + i = (i + 1) % (argc - 2); + Cvar_Set(var->name, Cmd_Argv(2 + i)); - return; - } - } + return; + } + } - Com_Printf("\"%s\" is \"%s\", can't cycle\n", var->name, var->string); + Com_Printf("\"%s\" is \"%s\", can't cycle\n", var->name, var->string); } /* @@ -896,7 +900,7 @@ Cvar_Fini(void) Z_Free(var->name); Z_Free(var->default_string); Z_Free(var); - var = c; + var = c; } Cmd_RemoveCommand("cvarlist"); diff --git a/src/common/filesystem.c b/src/common/filesystem.c index 5a43d495..95503466 100644 --- a/src/common/filesystem.c +++ b/src/common/filesystem.c @@ -200,7 +200,7 @@ static voidpf ZCALLBACK fopen_file_func_utf(voidpf opaque, const char *filename, /* * Returns the path up to, but not including the last '/'. */ -void +static void Com_FilePath(const char *path, char *dst, int dstSize) { char *pos; /* Position of the last '/'. */ @@ -226,7 +226,7 @@ Com_FilePath(const char *path, char *dst, int dstSize) } } -int +static int FS_FileLength(FILE *f) { int pos; /* Current position. */ @@ -300,7 +300,7 @@ FS_Gamedir(void) /* * Finds a free fileHandle_t. */ -fsHandle_t * +static fsHandle_t * FS_HandleForFile(const char *path, fileHandle_t *f) { int i; @@ -742,7 +742,8 @@ FS_FreeFile(void *buffer) Z_Free(buffer); } -fsRawPath_t *FS_FreeRawPaths(fsRawPath_t *start, fsRawPath_t *end) +static fsRawPath_t * +FS_FreeRawPaths(fsRawPath_t *start, fsRawPath_t *end) { fsRawPath_t *cur = start; fsRawPath_t *next; @@ -757,7 +758,8 @@ fsRawPath_t *FS_FreeRawPaths(fsRawPath_t *start, fsRawPath_t *end) return cur; } -fsSearchPath_t *FS_FreeSearchPaths(fsSearchPath_t *start, fsSearchPath_t *end) +static fsSearchPath_t * +FS_FreeSearchPaths(fsSearchPath_t *start, fsSearchPath_t *end) { fsSearchPath_t *cur = start; fsSearchPath_t *next; @@ -794,7 +796,7 @@ fsSearchPath_t *FS_FreeSearchPaths(fsSearchPath_t *start, fsSearchPath_t *end) * Loads the header and directory, adding the files at the beginning of the * list so they override previous pack files. */ -fsPack_t * +static fsPack_t * FS_LoadPAK(const char *packPath) { int i; /* Loop counter. */ @@ -877,7 +879,7 @@ FS_LoadPAK(const char *packPath) * Loads the header and directory, adding the files at the beginning of the list * so they override previous pack files. */ -fsPack_t * +static fsPack_t * FS_LoadPK3(const char *packPath) { char fileName[MAX_QPATH]; /* File name. */ @@ -979,7 +981,7 @@ FS_NextPath(const char *prevPath) return NULL; } -void +static void FS_Path_f(void) { int i; @@ -1035,7 +1037,7 @@ FS_Path_f(void) /* * Creates a filelink_t. */ -void +static void FS_Link_f(void) { fsLink_t *l, **prev; @@ -1149,7 +1151,7 @@ FS_ListFiles(const char *findname, int *numfiles, * attributes then a copy of the matching string will be placed there (with * SFF_SUBDIR it changes). */ -qboolean +static qboolean ComparePackFiles(const char *findname, const char *name, unsigned musthave, unsigned canthave, char *output, int size) { @@ -1495,7 +1497,7 @@ FS_ListMods(int *nummods) /* * Directory listing. */ -void +static void FS_Dir_f(void) { char **dirnames; /* File list. */ @@ -1671,7 +1673,7 @@ static char* basename( char* n ) } #endif // _MSC_VER -void +static void FS_AddDirToSearchPath(char *dir, qboolean create) { char *file; char **list; @@ -1825,7 +1827,8 @@ FS_AddDirToSearchPath(char *dir, qboolean create) { } } -void FS_BuildGenericSearchPath(void) { +static void +FS_BuildGenericSearchPath(void) { // We may not use the va() function from shared.c // since it's buffersize is 1024 while most OS have // a maximum path size of 4096... @@ -1863,8 +1866,6 @@ void FS_BuildGenericSearchPath(void) { // Variables extern qboolean menu_startdemoloop; -// Functions -void CL_WriteConfiguration(void); #endif void @@ -2056,7 +2057,9 @@ static void FS_AddDirToRawPath (const char *rawdir, qboolean create, qboolean re } -void FS_BuildRawPath(void) { +static void +FS_BuildRawPath(void) +{ // Add $HOME/.yq2, MUST be the last dir! Required, // otherwise the config cannot be written. if (!is_portable) { diff --git a/src/common/header/common.h b/src/common/header/common.h index 9964addc..117a713a 100644 --- a/src/common/header/common.h +++ b/src/common/header/common.h @@ -626,6 +626,9 @@ qboolean Netchan_CanReliable(netchan_t *chan); cmodel_t *CM_LoadMap(const char *name, qboolean clientload, unsigned *checksum); cmodel_t *CM_InlineModel(const char *name); /* *1, *2, etc */ +int CM_MapSurfacesNum(void); +mapsurface_t* CM_MapSurfaces(int surfnum); + void CM_ModFreeAll(void); int CM_NumClusters(void); @@ -706,6 +709,8 @@ int FS_FOpenFile(const char *name, fileHandle_t *f, qboolean gamedir_only); void FS_FCloseFile(fileHandle_t f); int FS_Read(void *buffer, int size, fileHandle_t f); int FS_FRead(void *buffer, int size, int count, fileHandle_t f); +void CM_ReadPortalState(fileHandle_t f); +void CL_WriteConfiguration(void); // returns the filename used to open f, but (if opened from pack) in correct case // returns NULL if f is no valid handle diff --git a/src/common/pmove.c b/src/common/pmove.c index 71f6fa33..68d29df9 100644 --- a/src/common/pmove.c +++ b/src/common/pmove.c @@ -29,11 +29,6 @@ #include "../client/sound/header/local.h" #include "../client/header/client.h" -#if !defined(DEDICATED_ONLY) && defined(USE_OPENAL) -void AL_Underwater(); -void AL_Overwater(); -#endif - #define STEPSIZE 18 /* all of the locals will be zeroed before each @@ -74,7 +69,7 @@ float pm_waterspeed = 400; #define MIN_STEP_NORMAL 0.7 /* can't step up onto very steep slopes */ #define MAX_CLIP_PLANES 5 -void +static void PM_ClipVelocity(vec3_t in, vec3_t normal, vec3_t out, float overbounce) { float backoff; @@ -102,7 +97,7 @@ PM_ClipVelocity(vec3_t in, vec3_t normal, vec3_t out, float overbounce) * Returns a new origin, velocity, and contact entity * Does not modify any world state? */ -void +static void PM_StepSlideMove_(void) { int bumpcount, numbumps; @@ -226,7 +221,7 @@ PM_StepSlideMove_(void) } } -void +static void PM_StepSlideMove(void) { vec3_t start_o, start_v; @@ -290,7 +285,7 @@ PM_StepSlideMove(void) /* * Handles both ground friction and water friction */ -void +static void PM_Friction(void) { float *vel; @@ -344,7 +339,7 @@ PM_Friction(void) /* * Handles user intended acceleration */ -void +static void PM_Accelerate(vec3_t wishdir, float wishspeed, float accel) { int i; @@ -371,7 +366,7 @@ PM_Accelerate(vec3_t wishdir, float wishspeed, float accel) } } -void +static void PM_AirAccelerate(vec3_t wishdir, float wishspeed, float accel) { int i; @@ -403,7 +398,7 @@ PM_AirAccelerate(vec3_t wishdir, float wishspeed, float accel) } } -void +static void PM_AddCurrents(vec3_t wishvel) { vec3_t v; @@ -537,7 +532,7 @@ PM_AddCurrents(vec3_t wishvel) } } -void +static void PM_WaterMove(void) { int i; @@ -579,7 +574,7 @@ PM_WaterMove(void) PM_StepSlideMove(); } -void +static void PM_AirMove(void) { int i; @@ -681,7 +676,7 @@ PM_AirMove(void) } } -void +static void PM_CatagorizePosition(void) { vec3_t point; @@ -788,7 +783,7 @@ PM_CatagorizePosition(void) } } -void +static void PM_CheckJump(void) { if (pm->s.pm_flags & PMF_TIME_LAND) @@ -857,7 +852,7 @@ PM_CheckJump(void) } } -void +static void PM_CheckSpecialMovement(void) { vec3_t spot; @@ -917,7 +912,7 @@ PM_CheckSpecialMovement(void) pm->s.pm_time = 255; } -void +static void PM_FlyMove(qboolean doclip) { float speed, drop, friction, control, newspeed; @@ -1025,7 +1020,7 @@ PM_FlyMove(qboolean doclip) /* * Sets mins, maxs, and pm->viewheight */ -void +static void PM_CheckDuck(void) { trace_t trace; @@ -1083,7 +1078,7 @@ PM_CheckDuck(void) } } -void +static void PM_DeadMove(void) { float forward; @@ -1108,7 +1103,7 @@ PM_DeadMove(void) } } -qboolean +static qboolean PM_GoodPosition(void) { trace_t trace; @@ -1134,7 +1129,7 @@ PM_GoodPosition(void) * On exit, the origin will have a value that is pre-quantized to the 0.125 * precision of the network channel and in a valid position. */ -void +static void PM_SnapPosition(void) { int sign[3]; @@ -1194,7 +1189,7 @@ PM_SnapPosition(void) VectorCopy(pml.previous_origin, pm->s.origin); } -void +static void PM_InitialSnapPosition(void) { int x, y, z; @@ -1230,7 +1225,7 @@ PM_InitialSnapPosition(void) Com_DPrintf("Bad InitialSnapPosition\n"); } -void +static void PM_ClampAngles(void) { short temp; @@ -1267,7 +1262,8 @@ PM_ClampAngles(void) } #if !defined(DEDICATED_ONLY) -void PM_CalculateViewHeightForDemo() +static void +PM_CalculateViewHeightForDemo() { if (pm->s.pm_type == PM_GIB) pm->viewheight = 8; @@ -1279,7 +1275,8 @@ void PM_CalculateViewHeightForDemo() } } -void PM_CalculateWaterLevelForDemo() +static void +PM_CalculateWaterLevelForDemo() { vec3_t point; int cont; @@ -1299,7 +1296,8 @@ void PM_CalculateWaterLevelForDemo() } } -void PM_UpdateUnderwaterSfx() +static void +PM_UpdateUnderwaterSfx() { static int underwater; @@ -1309,7 +1307,9 @@ void PM_UpdateUnderwaterSfx() #ifdef USE_OPENAL if (snd_is_underwater_enabled) + { AL_Underwater(); + } #endif } diff --git a/src/common/shared/rand.c b/src/common/shared/rand.c index 869bca17..dfa03c08 100644 --- a/src/common/shared/rand.c +++ b/src/common/shared/rand.c @@ -14,6 +14,7 @@ */ #include +#include "../header/shared.h" #define QSIZE 0x200000 #define CNG (cng = 6906969069ULL * cng + 13579) diff --git a/src/game/g_ctf.c b/src/game/g_ctf.c index 9a3a0b4d..44c8a41d 100644 --- a/src/game/g_ctf.c +++ b/src/game/g_ctf.c @@ -4058,16 +4058,6 @@ CTFRequestMatch(edict_t *ent, pmenuhnd_t *p) CTFBeginElection(ent, ELECT_MATCH, text); } -static void -CTFShowScores(edict_t *ent, pmenu_t *p) -{ - PMenu_Close(ent); - - ent->client->showscores = true; - ent->client->showinventory = false; - DeathmatchScoreboard(ent); -} - static int CTFUpdateJoinMenu(edict_t *ent) { diff --git a/src/server/sv_save.c b/src/server/sv_save.c index 0cd5894b..e7669a59 100644 --- a/src/server/sv_save.c +++ b/src/server/sv_save.c @@ -26,8 +26,6 @@ #include "header/server.h" -void CM_ReadPortalState(fileHandle_t f); - /* * Delete save// */