Mapbase v4.3

- Fixed a crash with multiple trigger_look targets
- Fixed an issue where some zombie submodel server ragdolls are not solid to the world
- Fixed a crash with certain instance classes being loaded in a savegame before the class is registered
- Added some of Tony Sergi's missing Source 2007 fixes (contributed by Kris)
- Added "ClientCommand" hook for VScript to allow handling of unknown console commands
- Added "PlayerRunCommand" hook for VScript to control player movement
- Added new button-related script functions for players (GetButtons, DisableButtons, etc.)
- Added CUserCmd accessor in VScript for the "PlayerRunCommand" hook
- Added "GetWaterLevel" function for VScript
- Exposed "Ignite" to VScript for controlling how a fire starts
- Fixed NPCs being unable to unholster weapons
- Fixed Mapbase crashing when Steam isn't running
- Fixed issues with angled/updating sky_camera save/restore
- Added VBSP "-skyboxcubemap" parameter to enable skybox default cubemaps + "-defaultcubemapres" to control their resolution
- Added ability to disable VScript in a map (and fixed a few potential complications from disabling VScript)
- Made clientside VScript only initialize after world is spawned in order to receive serverside script language in time
- Added tons of VScript functions to CBaseAnimating related to bodygroups, sequences, etc.
- Added VScript functions to players for getting user ID and player name, similar to logic_playerinfo
- Added a few L4D2 script functions missing from the ASW SDK
- Added "Localize" singleton with a single "GetTokenAsUTF8" function for getting localization strings
- Disabled r_hunkalloclightmaps by the request of various users (apparently this completely removes the "Engine hunk overflow" error and allows for really high-res lightmaps)
- Fixed npc_antlionguard NPC_TranslateActivity not hooking into base class (allows for VScript manipulation)
- Added various unused antlion guard activities to npc_antlionguard AI, allowing for usage as registered activities
- Added keyvalue to set LOS mask on combine_mine
- Added +USE bounding box limiter to prop_interactable
This commit is contained in:
Blixibon
2020-07-16 15:43:30 +00:00
parent f636089003
commit 63323222fe
76 changed files with 1575 additions and 359 deletions

View File

@@ -283,7 +283,15 @@ void VTFNameToHDRVTFName( const char *pSrcName, char *pDest, int maxLen, bool bH
Q_strncpy( pDot, ".hdr.vtf", maxLen - ( pDot - pDest ) );
}
#ifdef MAPBASE
extern bool g_bSkyboxCubemaps;
extern int g_iDefaultCubemapSize;
#define DEFAULT_CUBEMAP_SIZE g_iDefaultCubemapSize
#else
#define DEFAULT_CUBEMAP_SIZE 32
#endif
void CreateDefaultCubemaps( bool bHDR )
{
@@ -346,9 +354,17 @@ void CreateDefaultCubemaps( bool bHDR )
int iSize = pDstCubemap->ComputeMipSize( iMip );
int iSrcMipSize = pSrcVTFTextures[iFace]->ComputeMipSize( iMip + iMipLevelOffset );
#ifdef MAPBASE
if (!g_bSkyboxCubemaps)
{
memset( pDstBits, 0, iSize );
continue;
}
#else
// !!! FIXME: Set this to black until HDR cubemaps are built properly!
memset( pDstBits, 0, iSize );
continue;
#endif
if ( ( pSrcVTFTextures[iFace]->Width() == 4 ) && ( pSrcVTFTextures[iFace]->Height() == 4 ) ) // If texture is 4x4 square
{
@@ -436,6 +452,14 @@ void CreateDefaultCubemaps( bool bHDR )
pDstCubemap->ConvertImageFormat( originalFormat, false );
}
#ifdef MAPBASE
// Apply a seam fix
pDstCubemap->ConvertImageFormat( IMAGE_FORMAT_RGBA8888, false );
pDstCubemap->MatchCubeMapBorders( 1, IMAGE_FORMAT_RGBA8888, false );
pDstCubemap->MatchCubeMapBorders( 2, originalFormat, false );
#endif
// Write the puppy out!
char dstVTFFileName[1024];
if( bHDR )

View File

@@ -62,6 +62,8 @@ bool g_bAllowDetailCracks = false;
bool g_bNoVirtualMesh = false;
#ifdef MAPBASE
bool g_bNoDefaultCubemaps = true;
bool g_bSkyboxCubemaps = false;
int g_iDefaultCubemapSize = 32;
#endif
float g_defaultLuxelSize = DEFAULT_LUXEL_SIZE;
@@ -1156,13 +1158,28 @@ int RunVBSP( int argc, char **argv )
EnableFullMinidumps( true );
}
#ifdef MAPBASE
// Thanks to Mapbase's shader changes, default cubemaps are no longer needed.
// Thanks to Mapbase's shader changes, default all-black cubemaps are no longer needed.
// The command has been switched from "-nodefaultcubemap" to "-defaultcubemap",
// meaning maps are compiled without them by default.
else if ( !Q_stricmp( argv[i], "-defaultcubemap" ) )
{
g_bNoDefaultCubemaps = false;
}
// Default cubemaps are supposed to show the sky texture, but Valve disabled this
// because they didn't get it working for HDR cubemaps. As a result, all default
// cubemaps appear as all-black textures. However, this parameter has been added to
// re-enable skybox cubemaps for LDR cubemaps. (HDR skybox cubemaps are not supported)
else if ( !Q_stricmp( argv[i], "-skyboxcubemap" ) )
{
g_bNoDefaultCubemaps = false;
g_bSkyboxCubemaps = true;
}
else if ( !Q_stricmp( argv[i], "-defaultcubemapres" ) )
{
g_iDefaultCubemapSize = atoi( argv[i + 1] );
Msg( "Default cubemap size = %i\n", g_iDefaultCubemapSize );
i++;
}
#endif
else if (argv[i][0] == '-')
{