From 320cf1cee5a93a85ed4ae1c0861c6a6db569980b Mon Sep 17 00:00:00 2001 From: Spoike Date: Wed, 14 Apr 2021 06:10:37 +0000 Subject: [PATCH] Try to fix some compile issues. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5814 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- build_setup.sh | 13 ++++++++----- build_wip.sh | 11 ++++++----- engine/client/m_download.c | 19 +++---------------- engine/client/m_options.c | 6 +++--- engine/common/cvar.c | 6 ++++-- engine/gl/gl_model.c | 2 ++ engine/server/sv_user.c | 2 +- 7 files changed, 27 insertions(+), 32 deletions(-) diff --git a/build_setup.sh b/build_setup.sh index cd67d46a..bc80cf47 100755 --- a/build_setup.sh +++ b/build_setup.sh @@ -52,9 +52,11 @@ fi #windows doesn't cross compile, so no system dependancy issues #skip some dependancies if we're running on cygwin, ode is buggy. if [ "$(uname -s)" == "Linux" ]; then - PLUGINS_WINDOWS="ffmpeg ode qi ezhud xmpp irc" + PLUGINS_WIN32="ffmpeg ode qi ezhud xmpp irc" + PLUGINS_WIN64="ffmpeg ode qi ezhud xmpp irc" else - PLUGINS_WINDOWS="qi ezhud xmpp irc" + PLUGINS_WIN32="qi ezhud xmpp irc" + PLUGINS_WIN64="qi ezhud xmpp irc" fi echo @@ -229,7 +231,8 @@ if [ "$UID" != "0" ]; then echo "TARGETS_WINDOWS=\"$TARGETS_WINDOWS\"" >>$FTECONFIG echo "TARGETS_LINUX=\"$TARGETS_LINUX\"" >>$FTECONFIG - echo "PLUGINS_WINDOWS=\"$PLUGINS_WINDOWS\"" >>$FTECONFIG + echo "PLUGINS_WIN32=\"$PLUGINS_WIN32\"" >>$FTECONFIG + echo "PLUGINS_WIN64=\"$PLUGINS_WIN64\"" >>$FTECONFIG echo "PLUGINS_LINUXx86=\"$PLUGINS_LINUXx86\"" >>$FTECONFIG echo "PLUGINS_LINUXx64=\"$PLUGINS_LINUXx64\"" >>$FTECONFIG echo "PLUGINS_LINUXx32=\"$PLUGINS_LINUXx32\"" >>$FTECONFIG @@ -463,11 +466,11 @@ if [ $UID -ne 0 ] && [ $REBUILD_TOOLCHAINS == "y" ]; then echo "Making libraries (win64)..." make FTE_TARGET=win64 makelibs CPUOPTIMISATIONS=-fno-finite-math-only 2>&1 >>/dev/null fi - if [ "$BUILD_WIN32" == "y" ] && [[ "$PLUGINS_WINDOWS" =~ "ode" ]]; then + if [ "$BUILD_WIN32" == "y" ] && [[ "$PLUGINS_WIN32" =~ "ode" ]]; then echo "Prebuilding ODE library (win32)..." make FTE_TARGET=win32 plugins-rel NATIVE_PLUGINS=ode 2>&1 >>/dev/null fi - if [ "$BUILD_WIN64" == "y" ] && [[ "$PLUGINS_WINDOWS" =~ "ode" ]]; then + if [ "$BUILD_WIN64" == "y" ] && [[ "$PLUGINS_WIN64" =~ "ode" ]]; then echo "Prebuilding ODE library (win64)..." make FTE_TARGET=win64 plugins-rel NATIVE_PLUGINS=ode 2>&1 >>/dev/null fi diff --git a/build_wip.sh b/build_wip.sh index f43e987b..5034e3cd 100755 --- a/build_wip.sh +++ b/build_wip.sh @@ -23,7 +23,8 @@ BUILD_WEB=y PLUGINS_LINUXx86="qi ezhud xmpp irc" PLUGINS_LINUXx64="qi ezhud xmpp irc" PLUGINS_LINUXx32="qi ezhud xmpp irc" -PLUGINS_WINDOWS="avplug ode qi ezhud xmpp irc" +PLUGINS_WIN32="avplug ode qi ezhud xmpp irc" +PLUGINS_WIN64="avplug ode qi ezhud xmpp irc" THREADS="-j 4" TARGETS_LINUX="qcc-rel rel dbg vk-rel plugins-rel plugins-dbg" @@ -218,14 +219,14 @@ if [ "$BUILD_CYGWIN" != "n" ]; then NATIVE_PLUGINS="qi ezhud" build "Cygwin" cygwin qcc-rel rel dbg plugins-rel plugins-dbg fi if [ "$BUILD_WIN32" != "n" ]; then - NATIVE_PLUGINS="$PLUGINS_WINDOWS" build "Windows 32-bit" win32 FTE_TARGET=win32 CFLAGS="$WARNINGLEVEL" $TARGETS_WINDOWS + NATIVE_PLUGINS="$PLUGINS_WIN32" build "Windows 32-bit" win32 FTE_TARGET=win32 CFLAGS="$WARNINGLEVEL" $TARGETS_WINDOWS fi if [ "$BUILD_WIN64" != "n" ]; then - NATIVE_PLUGINS="$PLUGINS_WINDOWS" build "Windows 64-bit" win64 FTE_TARGET=win64 CFLAGS="$WARNINGLEVEL" $TARGETS_WINDOWS + NATIVE_PLUGINS="$PLUGINS_WIN64" build "Windows 64-bit" win64 FTE_TARGET=win64 CFLAGS="$WARNINGLEVEL" $TARGETS_WINDOWS fi if [ "$BUILD_MSVC" != "n" ]; then - NATIVE_PLUGINS="$PLUGINS_WINDOWS" build "Windows MSVC 32-bit" msvc FTE_TARGET=vc BITS=32 CFLAGS="$WARNINGLEVEL" sv-rel gl-rel vk-rel mingl-rel m-rel d3d-rel qcc-rel qccgui-scintilla qccgui-dbg gl-dbg sv-dbg plugins-dbg plugins-rel - NATIVE_PLUGINS="$PLUGINS_WINDOWS" build "Windows MSVC 64-bit" msvc FTE_TARGET=vc BITS=64 CFLAGS="$WARNINGLEVEL" sv-rel gl-rel vk-rel mingl-rel m-rel d3d-rel qcc-rel qccgui-scintilla qccgui-dbg gl-dbg sv-dbg plugins-dbg plugins-rel + NATIVE_PLUGINS="$PLUGINS_WIN32" build "Windows MSVC 32-bit" msvc FTE_TARGET=vc BITS=32 CFLAGS="$WARNINGLEVEL" sv-rel gl-rel vk-rel mingl-rel m-rel d3d-rel qcc-rel qccgui-scintilla qccgui-dbg gl-dbg sv-dbg plugins-dbg plugins-rel + NATIVE_PLUGINS="$PLUGINS_WIN64" build "Windows MSVC 64-bit" msvc FTE_TARGET=vc BITS=64 CFLAGS="$WARNINGLEVEL" sv-rel gl-rel vk-rel mingl-rel m-rel d3d-rel qcc-rel qccgui-scintilla qccgui-dbg gl-dbg sv-dbg plugins-dbg plugins-rel fi export NATIVE_PLUGINS="qi ezhud xmpp irc" if [ "$BUILD_ANDROID" != "n" ]; then diff --git a/engine/client/m_download.c b/engine/client/m_download.c index bb3b413e..583ae0cd 100644 --- a/engine/client/m_download.c +++ b/engine/client/m_download.c @@ -2407,10 +2407,10 @@ static void PM_UpdatePackageList(qboolean autoupdate, int retry) PM_PreparePackageList(); #ifndef WEBCLIENT - for (i = 0; i < numdownloadablelists; i++) + for (i = 0; i < pm_numsources; i++) { - if (downloadablelist[i].status == SRCSTAT_PENDING) - downloadablelist[i].status = SRCSTAT_FAILED_DNS; + if (pm_source[i].status == SRCSTAT_PENDING) + pm_source[i].status = SRCSTAT_FAILED_DNS; } #else doautoupdate |= autoupdate; @@ -3336,11 +3336,6 @@ int PM_IsApplying(qboolean listsonly) count++; } } - /*for (i = 0; i < numdownloadablelists; i++) - { - if (downloadablelist[i].curdl) - count++; - }*/ #endif return count; } @@ -5199,14 +5194,6 @@ static void MD_Download_UpdateStatus(struct emenu_s *m) if (!info->populated) { y = 48; - /*for (i = 0; i < numdownloadablelists; i++) - { - if (downloadablelist[i].status == SRCSTAT_PENDING) - { - Draw_FunStringWidth(0, y, "Querying for package list", vid.width, 2, false); - return; - } - }*/ info->populated = true; MC_AddFrameStart(m, 48); diff --git a/engine/client/m_options.c b/engine/client/m_options.c index b89740af..0e7f279c 100644 --- a/engine/client/m_options.c +++ b/engine/client/m_options.c @@ -1309,7 +1309,7 @@ void M_Menu_Preset_f (void) MB_CONSOLECMDRETURN("^7normal (faithful)", "fps_preset normal\n", "An updated but still faithful appearance, using content replacements where applicable", presetoption[4]), MB_CONSOLECMDRETURN("^7nice (dynamic)", "fps_preset nice\n", "For people who like nice things, but still want to actually play", presetoption[5]), MB_COMBOCVAR("gen deluxemaps", r_deluxemapping_cvar, deluxeopts, NULL, NULL), -#ifdef RTLIGHTS +#if defined(RTLIGHTS) && (defined(GLQUAKE) || defined(VKQUAKE)) MB_CONSOLECMDRETURN("^7realtime (all on)", "fps_preset realtime\n", "For people who value pretty over fast/smooth. Not viable for deathmatch.", presetoption[6]), MB_CHECKBOXCVAR("bloom", r_bloom, 1), MB_CHECKBOXCVAR("force rtlights", r_shadow_realtime_world_importlightentitiesfrommap, 1), @@ -1554,7 +1554,7 @@ void M_Menu_Render_f (void) emenu_t *menu; extern cvar_t r_novis, cl_item_bobbing, r_waterwarp, r_nolerp, r_noframegrouplerp, r_fastsky, gl_nocolors, gl_lerpimages, r_wateralpha, r_drawviewmodel, gl_cshiftenabled, r_hdr_irisadaptation, scr_logcenterprint, r_fxaa, r_graphics; -#ifdef GLQUAKE +#if defined(GLQUAKE) || defined(VKQUAKE) extern cvar_t r_bloom; #endif static menuresel_t resel; @@ -1580,7 +1580,7 @@ void M_Menu_Render_f (void) #endif MB_COMBOCVAR("Log Centerprints", scr_logcenterprint, logcenteropts, logcentervalues, "Display centerprints in the console also."), MB_CHECKBOXCVAR("FXAA", r_fxaa, 0), -#ifdef GLQUAKE +#if defined(GLQUAKE) || defined(VKQUAKE) MB_CHECKBOXCVAR("Bloom", r_bloom, 0), #endif MB_CHECKBOXCVARTIP("HDR", r_hdr_irisadaptation, 0, "Adjust scene brightness to compensate for lighting levels."), diff --git a/engine/common/cvar.c b/engine/common/cvar.c index 3b1b994b..30009f15 100644 --- a/engine/common/cvar.c +++ b/engine/common/cvar.c @@ -467,9 +467,11 @@ showhelp: // print cvar name if (!cmd->defaultstr || !strcmp(cmd->string, cmd->defaultstr)) - Con_Printf(S_COLOR_GREEN "%s", cmd->name); + Con_Printf(S_COLOR_GREEN "%s", cmd->name); //cvar has default value, woo. + else if (cmd->flags & CVAR_ARCHIVE) + Con_Printf(S_COLOR_RED "%s", cmd->name); //cvar will persist. oh noes. else - Con_Printf(S_COLOR_RED "%s", cmd->name); + Con_Printf(S_COLOR_YELLOW "%s", cmd->name); //cvar is changed, but won't be saved to a config so w/e. total++; // print current value diff --git a/engine/gl/gl_model.c b/engine/gl/gl_model.c index 3771b37f..921f4097 100644 --- a/engine/gl/gl_model.c +++ b/engine/gl/gl_model.c @@ -5509,6 +5509,7 @@ TRACE(("LoadBrushModel %i\n", __LINE__)); submod->cnodes = NULL; Q1BSP_SetModelFuncs(submod); +#ifdef Q2BSPS if (bm->brushes) { struct bihleaf_s *leafs, *l; @@ -5527,6 +5528,7 @@ TRACE(("LoadBrushModel %i\n", __LINE__)); BIH_Build(submod, leafs, l-leafs); BZ_Free(leafs); } +#endif if (i) COM_AddWork(WG_MAIN, Mod_ModelLoaded, submod, NULL, MLS_LOADED, 0); diff --git a/engine/server/sv_user.c b/engine/server/sv_user.c index 17f9c08c..b472a807 100644 --- a/engine/server/sv_user.c +++ b/engine/server/sv_user.c @@ -81,7 +81,7 @@ cvar_t cmd_allowaccess = CVAR("cmd_allowaccess", "0"); //set to 1 to allow cmd t cvar_t cmd_gamecodelevel = CVARF("cmd_gamecodelevel", STRINGIFY(RESTRICT_LOCAL), CVAR_NOTFROMSERVER); //execution level which gamecode is told about (for unrecognised commands) cvar_t sv_pure = CVARFD("sv_pure", "", CVAR_SERVERINFO, "The most evil cvar in the world, many clients will ignore this.\n0=standard quake rules.\n1=clients should prefer files within packages present on the server.\n2=clients should use *only* files within packages present on the server.\nDue to quake 1.01/1.06 differences, a setting of 2 only works in total conversions."); -cvar_t sv_nqplayerphysics = CVARAFCD("sv_nqplayerphysics", "auto", "sv_nomsec", 0, SV_NQPhysicsUpdate, "Disable player prediction and run NQ-style player physics instead. This can be used for compatibility with mods that expect exact behaviour."); +cvar_t sv_nqplayerphysics = CVARAFCD("sv_nqplayerphysics", "auto", "sv_nomsec", CVAR_ARCHIVE, SV_NQPhysicsUpdate, "Disable player prediction and run NQ-style player physics instead. This can be used for compatibility with mods that expect exact behaviour."); #ifdef HAVE_LEGACY static cvar_t sv_brokenmovetypes = CVARD("sv_brokenmovetypes", "0", "Emulate vanilla quakeworld by forcing MOVETYPE_WALK on all players. Shouldn't be used for any games other than QuakeWorld.");