Fix some compile issues.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5483 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
1f421b40cc
commit
6c7220324e
4 changed files with 14 additions and 3 deletions
|
@ -722,6 +722,15 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
#define FTE_ALIGN(a)
|
#define FTE_ALIGN(a)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if __STDC_VERSION__ >= 201112L
|
||||||
|
#include <stdalign.h>
|
||||||
|
#define fte_alignof(type) alignof(qintptr_t)
|
||||||
|
#elif _MSC_VER
|
||||||
|
#define fte_alignof(type) __alignof(qintptr_t)
|
||||||
|
#else
|
||||||
|
#define fte_alignof(type) sizeof(qintptr_t)
|
||||||
|
#endif
|
||||||
|
|
||||||
//fte_inline must only be used in headers, and requires one and ONLY one fte_inlinebody elsewhere.
|
//fte_inline must only be used in headers, and requires one and ONLY one fte_inlinebody elsewhere.
|
||||||
//fte_inlinebody must be used on a prototype OUTSIDE of a header.
|
//fte_inlinebody must be used on a prototype OUTSIDE of a header.
|
||||||
//fte_inlinestatic must not be used inside any headers at all.
|
//fte_inlinestatic must not be used inside any headers at all.
|
||||||
|
|
|
@ -1069,7 +1069,7 @@ static void QDECL FS_AddFileHash(int depth, const char *fname, fsbucket_t *fileh
|
||||||
{
|
{
|
||||||
int nlen = strlen(fname)+1;
|
int nlen = strlen(fname)+1;
|
||||||
int plen = sizeof(*filehandle)+nlen;
|
int plen = sizeof(*filehandle)+nlen;
|
||||||
plen = (plen+__alignof(*filehandle)-1) & ~(__alignof(*filehandle)-1);
|
plen = (plen+fte_alignof(fsbucket_t)-1) & ~(fte_alignof(fsbucket_t)-1);
|
||||||
if (!fs_hash_filebuckets || fs_hash_filebuckets->used+plen > fs_hash_filebuckets->total)
|
if (!fs_hash_filebuckets || fs_hash_filebuckets->used+plen > fs_hash_filebuckets->total)
|
||||||
{
|
{
|
||||||
void *o = fs_hash_filebuckets;
|
void *o = fs_hash_filebuckets;
|
||||||
|
@ -3155,7 +3155,7 @@ void COM_Gamedir (const char *dir, const struct gamepacks *packagespaths)
|
||||||
#define EZQUAKECOMPETITIVE "set ruleset_allow_fbmodels 1\nset sv_demoExtensions \"\"\n"
|
#define EZQUAKECOMPETITIVE "set ruleset_allow_fbmodels 1\nset sv_demoExtensions \"\"\n"
|
||||||
/*quake requires a few settings for compatibility*/
|
/*quake requires a few settings for compatibility*/
|
||||||
#define QRPCOMPAT "set cl_cursor_scale 0.2\nset cl_cursor_bias_x 7.5\nset cl_cursor_bias_y 0.8"
|
#define QRPCOMPAT "set cl_cursor_scale 0.2\nset cl_cursor_bias_x 7.5\nset cl_cursor_bias_y 0.8"
|
||||||
#define QCFG "set v_gammainverted 1\nset con_stayhidden 0\nset com_parseutf8 0\nset allow_download_refpackages 0\nset sv_bigcoords \"\"\nmap_autoopenportals 1\n" "sv_port "STRINGIFY(PORT_QWSERVER)" "STRINGIFY(PORT_NQSERVER)"\n" ZFIXHACK EZQUAKECOMPETITIVE QRPCOMPAT
|
#define QCFG "set v_gammainverted 1\nset con_stayhidden 0\nset com_parseutf8 0\nset allow_download_pakcontents 1\nset allow_download_refpackages 0\nset sv_bigcoords \"\"\nmap_autoopenportals 1\n" "sv_port "STRINGIFY(PORT_QWSERVER)" "STRINGIFY(PORT_NQSERVER)"\n" ZFIXHACK EZQUAKECOMPETITIVE QRPCOMPAT
|
||||||
/*NetQuake reconfiguration, to make certain people feel more at home...*/
|
/*NetQuake reconfiguration, to make certain people feel more at home...*/
|
||||||
#define NQCFG "//-nohome\ncfg_save_auto 1\n" QCFG "sv_nqplayerphysics 1\ncl_loopbackprotocol auto\ncl_sbar 1\nplug_sbar 0\nsv_port "STRINGIFY(PORT_NQSERVER)"\ncl_defaultport "STRINGIFY(PORT_NQSERVER)"\n"
|
#define NQCFG "//-nohome\ncfg_save_auto 1\n" QCFG "sv_nqplayerphysics 1\ncl_loopbackprotocol auto\ncl_sbar 1\nplug_sbar 0\nsv_port "STRINGIFY(PORT_NQSERVER)"\ncl_defaultport "STRINGIFY(PORT_NQSERVER)"\n"
|
||||||
//nehahra has to be weird with its extra cvars, and buggy fullbrights.
|
//nehahra has to be weird with its extra cvars, and buggy fullbrights.
|
||||||
|
|
|
@ -92,7 +92,7 @@ cvar_t allow_download_demos = CVARD("allow_download_demos", "1", "0 blocks down
|
||||||
cvar_t allow_download_maps = CVARD("allow_download_maps", "1", "0 blocks downloading of any file in the maps/ directory");
|
cvar_t allow_download_maps = CVARD("allow_download_maps", "1", "0 blocks downloading of any file in the maps/ directory");
|
||||||
cvar_t allow_download_logs = CVARD("allow_download_logs", "0", "1 permits downloading files with the extension .log\n"CON_ERROR"THIS IS DANGEROUS AS IT POTENTIALLY ALLOWS PEOPLE TO SEE PASSWORDS OR OTHER PRIVATE INFORMATION.\nNote that it can be switch on/off via rcon.");
|
cvar_t allow_download_logs = CVARD("allow_download_logs", "0", "1 permits downloading files with the extension .log\n"CON_ERROR"THIS IS DANGEROUS AS IT POTENTIALLY ALLOWS PEOPLE TO SEE PASSWORDS OR OTHER PRIVATE INFORMATION.\nNote that it can be switch on/off via rcon.");
|
||||||
cvar_t allow_download_anymap = CVARD("allow_download_pakmaps", "0", "If 1, permits downloading of maps from within packages. This is normally disabled in order to prevent copyrighted content from being downloaded.");
|
cvar_t allow_download_anymap = CVARD("allow_download_pakmaps", "0", "If 1, permits downloading of maps from within packages. This is normally disabled in order to prevent copyrighted content from being downloaded.");
|
||||||
cvar_t allow_download_pakcontents = CVARD("allow_download_pakcontents", "1", "controls whether clients connected to this server are allowed to download files from within packages.\nDoes NOT implicitly allow downloading bsps, set allow_download_pakmaps to enable that.\nWhile treating each file contained within packages is often undesirable, this is often needed for compatibility with legacy clients (despite it potentially allowing copyright violations).");
|
cvar_t allow_download_pakcontents = CVARD("allow_download_pakcontents", "0", "controls whether clients connected to this server are allowed to download files from within packages.\nDoes NOT implicitly allow downloading bsps, set allow_download_pakmaps to enable that.\nWhile treating each file contained within packages is often undesirable, this is often needed for compatibility with legacy clients (despite it potentially allowing copyright violations).");
|
||||||
cvar_t allow_download_root = CVARD("allow_download_root", "0", "If set, enables downloading from the root of the gamedir (not the basedir). This setting has a lower priority than extension-based checks.");
|
cvar_t allow_download_root = CVARD("allow_download_root", "0", "If set, enables downloading from the root of the gamedir (not the basedir). This setting has a lower priority than extension-based checks.");
|
||||||
cvar_t allow_download_textures = CVARD("allow_download_textures", "1", "0 blocks downloading of any file in the textures/ directory");
|
cvar_t allow_download_textures = CVARD("allow_download_textures", "1", "0 blocks downloading of any file in the textures/ directory");
|
||||||
cvar_t allow_download_packages = CVARD("allow_download_packages", "1", "if 1, permits downloading files (from root directory or elsewhere) with known package extensions (eg: pak+pk3). Packages with a name starting 'pak' are covered by allow_download_copyrighted as well.");
|
cvar_t allow_download_packages = CVARD("allow_download_packages", "1", "if 1, permits downloading files (from root directory or elsewhere) with known package extensions (eg: pak+pk3). Packages with a name starting 'pak' are covered by allow_download_copyrighted as well.");
|
||||||
|
|
|
@ -3368,7 +3368,9 @@ void SV_DemoDownload_f(void)
|
||||||
if (host_client->download)
|
if (host_client->download)
|
||||||
VFS_CLOSE (host_client->download);
|
VFS_CLOSE (host_client->download);
|
||||||
host_client->download = NULL;
|
host_client->download = NULL;
|
||||||
|
#ifdef NQPROT
|
||||||
host_client->downloadstarted = false;
|
host_client->downloadstarted = false;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
#ifdef HAVE_LEGACY
|
#ifdef HAVE_LEGACY
|
||||||
SV_DownloadQueueClear(host_client);
|
SV_DownloadQueueClear(host_client);
|
||||||
|
|
Loading…
Reference in a new issue