diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index de630b4e..1e8755ab 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,7 +4,7 @@ on: [push, pull_request] jobs: linux: name: Linux - runs-on: ubuntu-16.04 + runs-on: ubuntu-18.04 steps: - uses: actions/checkout@v2 - name: Install Dependencies diff --git a/code/qcommon/files.c b/code/qcommon/files.c index 4a94463e..a9f2995a 100644 --- a/code/qcommon/files.c +++ b/code/qcommon/files.c @@ -2932,7 +2932,9 @@ void FS_AddGameDirectory( const char *path, const char *dir ) { // Get .pk3 files pakfiles = Sys_ListFiles(curpath, ".pk3", NULL, &numfiles, qfalse); - qsort( pakfiles, numfiles, sizeof(char*), paksort ); + if ( pakfiles ) { + qsort( pakfiles, numfiles, sizeof(char*), paksort ); + } if ( fs_numServerPaks ) { numdirs = 0; diff --git a/code/renderergl2/glsl/lightall_fp.glsl b/code/renderergl2/glsl/lightall_fp.glsl index ff7fc125..28b59eb7 100644 --- a/code/renderergl2/glsl/lightall_fp.glsl +++ b/code/renderergl2/glsl/lightall_fp.glsl @@ -264,7 +264,8 @@ void main() float NL, NH, NE, EH, attenuation; #if defined(USE_LIGHT) && !defined(USE_FAST_LIGHT) - mat3 tangentToWorld = mat3(var_Tangent.xyz, var_Bitangent.xyz, var_Normal.xyz); + vec3 surfNormal = (!gl_FrontFacing ? var_Normal : -var_Normal).xyz; + mat3 tangentToWorld = mat3(var_Tangent.xyz, var_Bitangent.xyz, surfNormal); viewDir = vec3(var_Normal.w, var_Tangent.w, var_Bitangent.w); E = normalize(viewDir); #endif @@ -335,7 +336,7 @@ void main() N.z = sqrt(clamp((0.25 - N.x * N.x) - N.y * N.y, 0.0, 1.0)); N = tangentToWorld * N; #else - N = var_Normal.xyz; + N = surfNormal; #endif N = normalize(N); @@ -361,7 +362,7 @@ void main() #if !defined(USE_LIGHT_VECTOR) ambientColor = lightColor; - float surfNL = clamp(dot(var_Normal.xyz, L), 0.0, 1.0); + float surfNL = clamp(dot(surfNormal, L), 0.0, 1.0); // reserve 25% ambient to avoid black areas on normalmaps lightColor *= 0.75; diff --git a/code/sdl/sdl_input.c b/code/sdl/sdl_input.c index 2ad324e3..63274c61 100644 --- a/code/sdl/sdl_input.c +++ b/code/sdl/sdl_input.c @@ -33,6 +33,10 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include "../client/client.h" #include "../sys/sys_local.h" +#if !SDL_VERSION_ATLEAST(2, 0, 17) +#define KMOD_SCROLL KMOD_RESERVED +#endif + static cvar_t *in_keyboardDebug = NULL; static SDL_GameController *gamepad = NULL; @@ -84,7 +88,7 @@ static void IN_PrintKey( const SDL_Keysym *keysym, keyNum_t key, qboolean down ) if( keysym->mod & KMOD_NUM ) Com_Printf( " KMOD_NUM" ); if( keysym->mod & KMOD_CAPS ) Com_Printf( " KMOD_CAPS" ); if( keysym->mod & KMOD_MODE ) Com_Printf( " KMOD_MODE" ); - if( keysym->mod & KMOD_RESERVED ) Com_Printf( " KMOD_RESERVED" ); + if( keysym->mod & KMOD_SCROLL ) Com_Printf( " KMOD_SCROLL" ); Com_Printf( " Q:0x%02x(%s)\n", key, Key_KeynumToString( key ) ); }