]> git.xonotic.org Git - xonotic/netradiant.git/commitdiff
Merge commit 'ddee6cbe7c5fcbba52e7881a411f310809b867f9' into master-merge
authorThomas Debesse <dev@illwieckz.net>
Tue, 21 Jun 2022 04:10:48 +0000 (06:10 +0200)
committerThomas Debesse <dev@illwieckz.net>
Tue, 21 Jun 2022 04:10:48 +0000 (06:10 +0200)
1  2 
tools/quake3/q3map2/bspfile_abstract.c
tools/quake3/q3map2/light_bounce.c
tools/quake3/q3map2/main.c
tools/quake3/q3map2/path_init.c
tools/quake3/q3map2/q3map2.h

index e738429008fbb6362e93ddf9e194419b14fd3e91,c818121215d6f3a87bf1b728b73ee550a80a13bf..8cd6deadd281a8a395b0a158b7959d2ee3995aef
@@@ -586,10 -582,14 +588,13 @@@ static void RadSubdivideDiffuseLight( i
                VectorMA( light->origin, 1.0f, light->normal, light->origin );
                light->dist = DotProduct( light->origin, normal );
  
-               /* optionally create a point backsplash light for first pass */
-               if ( original && si->backsplashFraction > 0 ) {
+ #if 0
+               /* optionally create a point backsplash light */
+               if ( si->backsplashFraction > 0 ) {
                        /* allocate a new point light */
 -                      splash = safe_malloc( sizeof( *splash ) );
 -                      memset( splash, 0, sizeof( *splash ) );
 +                      splash = safe_malloc0( sizeof( *splash ) );
                        splash->next = lights;
                        lights = splash;
  
Simple merge
index 9bc5dd340c75c414b55001c41d0a53fb6f5047a6,66f256b48017a0c9033d214d7b53b59ec849c2c1..c9f26b32c706180c50accfc5c37a567ff9baaa60
@@@ -323,51 -315,22 +324,51 @@@ void AddHomeBasePath( char *path )
                /* -fs_homebase . means that -fs_home is to be used as is */
                strcpy( temp, homePath );
        }
 -      else if ( homePathLen >= 2 && !strcmp( homePath + homePathLen - 2, "/." ) ) {
 -              /* remove trailing /. of homePath */
 -              homePathLen -= 2;
 +      else {
 +              char *tempHomePath;
 +              tempHomePath = homePath;
  
 -              /* concatenate home dir and path */
 -              sprintf( temp, "%.*s/%s", homePathLen, homePath, path );
 +              /* homePath is . on Windows if not user supplied */
 +
 +              #if GDEF_OS_MACOS
 +              /*
 +                 use ${HOME}/Library/Application as ${HOME}
 +                 if home path is not user supplied
 +                 and strip the leading dot from prefix in any case
 +                
 +                 basically it produces
 +                 ${HOME}/Library/Application/unvanquished
 +                 /user/supplied/home/path/unvanquished
 +              */
 +              tempHomePath = macLibraryApplicationSupportPath;
 +              path = path + 1;
 +              #elif GDEF_OS_XDG
 +              /*
 +                 on Linux, check if game uses ${XDG_DATA_HOME}/prefix instead of ${HOME}/.prefix
 +                 if yes and home path is not user supplied
 +                 use XDG_DATA_HOME instead of HOME
 +                 and strip the leading dot
 +
 +                 basically it produces
 +                 ${XDG_DATA_HOME}/unvanquished
 +                 /user/supplied/home/path/unvanquished
 +
 +                 or
 +                 ${HOME}/.q3a
 +                 /user/supplied/home/path/.q3a
 +               */
 +
 +              sprintf( temp, "%s/%s", xdgDataHomePath, ( path + 1 ) );
 +              if ( access( temp, X_OK ) == 0 ) {
 +                      if ( customHomePath == qfalse ) {
 +                              tempHomePath = xdgDataHomePath;
-                       }
+       }
 -      else
 -      {
 -              /* remove leading . of path */
 -              if ( path[0] == '.' ) {
 -                      ++path;
 +                      path = path + 1;
                }
 +              #endif // GDEF_OS_XDG
  
                /* concatenate home dir and path */
 -              sprintf( temp, "%s/%s", homePath, path );
 +              sprintf( temp, "%s/%s", tempHomePath, path );
        }
  
        /* make a hole */
index 720dec29053fc042f0541d74295b7e0cc0d053cf,a230dd002f019045f7ec6b7347f2afcf0c28b92a..e644cc8be83d94971d63b1d0e6342cde8b5993cd
@@@ -1879,9 -1860,14 +1879,14 @@@ int                         ImportLight
  
  void                        SetupSurfaceLightmaps( void );
  void                        StitchSurfaceLightmaps( void );
 -void                        StoreSurfaceLightmaps( qboolean fastAllocate );
 +void                        StoreSurfaceLightmaps( qboolean fastAllocate, qboolean storeForReal );
  
  
+ /* exportents.c */
+ void                        ExportEntities( void );
+ int                         ExportEntitiesMain( int argc, char **argv );
  /* exportents.c */
  void                        ExportEntities( void );
  int                         ExportEntitiesMain( int argc, char **argv );