Merge remote-tracking branch 'upstream/main' into xcode

This commit is contained in:
Tom Kidd 2021-10-02 21:30:17 -05:00
commit 2fef57fffa
4 changed files with 13 additions and 6 deletions

View file

@ -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

View file

@ -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;

View file

@ -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;

View file

@ -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 ) );
}