Mapbase v3.0

- Overhauled matcher system and added expanded wildcard support, meaning "text", "te?t", "blah_test", etc. are now supported instead of only trailing *
- Added support for regular expression matching
- Added the missing matrixinvert.h file, which prevented programmers from compiling vbsp
- Fixed env_global_light brightness
- Added info_player_view_proxy, an entity which mimics a player's view (created for script_intro)
- New UnZoomWithRate and SetZoomRate inputs on env_zoom
- New "Don't change target's angles" flag on logic_measure_movement
- Fixed logic_measure_movement not using ignore origin flags correctly
- Fixed filter_damage_mod secondary filter not recognizing mode correctly
- Fixed DisableGeigerCounter causing NPCs to ignore player, and possibly fixed other adverse effects in similar code
- Added SetEntityName input for setting an entity's targetname
- Added "SetTarget" support to point_posecontroller
- Added "sk_alyx_health" convar for adjustable npc_alyx health, restored/fixed "sk_barney_health" for adjustable npc_barney health
- Added ignore flags and several direction-related inputs to math_vector
- Added pose parameter stuff to logic_modelinfo
- Fixed ChangeWeapon not changing during combat
- Fixed holster/unholster on NPCs without holster/unholster animations
- Fixed func_tank and other "player in the way" code ignoring notarget
- Added SetPoseParameter input to animating entities
- Introduced an experimental chapter system which allows for custom chapter title/restriction management
- Added SetChapterTitle input to worldspawn for dynamic title changing
- Fixed func_tankairboatgun damage credit, added ability to use its damage keyvalues
- Fixed mapbase_rpc_enabled not actually affecting RPC
- Moved some newly found Combine soldier grenade code to ai_grenade for other grenade users
- Fixed some problems with the new shared activities
- Restored an old Mapbase entity as "prop_interactable", an entity which contains all of the functionality of a func_button/func_door in a prop entity
- Added env_microphone pitch scale for scaling the pitch of transmitted sounds
- Added experimental, long-overdue code for scenes to be able to access !target#'s and other scene-related names through AI_INPUT
- Added "mat_specular_disable_on_missing", which "disables" specular reflections when the cubemap texture is missing
- Fixed $envmapmasktransform and $bumptransform on VertexLitGeneric and related shaders
- Areaportal leaks now stop compilation in leaktest
- Replaced "-nodefaultcubemap" with "-defaultcubemap" as the shader changes allow maps to compile without default cubemaps by default with little effect
This commit is contained in:
Blixibon
2020-02-05 19:08:49 +00:00
parent b8611071c5
commit c5f3fa0778
63 changed files with 1909 additions and 335 deletions

View File

@@ -1727,9 +1727,41 @@ static TITLECOMMENT gTitleComments[] =
#endif
};
#ifdef MAPBASE
extern CUtlVector<MODTITLECOMMENT> *Mapbase_GetChapterMaps();
extern CUtlVector<MODCHAPTER> *Mapbase_GetChapterList();
#endif
#ifdef _XBOX
void CServerGameDLL::GetTitleName( const char *pMapName, char* pTitleBuff, int titleBuffSize )
{
#ifdef MAPBASE
// Check the world entity for a chapter title
if ( CWorld *pWorld = GetWorldEntity() )
{
const char *pWorldChapter = pWorld->GetChapterTitle();
if ( pWorldChapter && pWorldChapter[0] != '\0' )
{
Q_strncpy( chapterTitle, pWorldChapter, sizeof( chapterTitle ) );
return;
}
}
// Look in the mod's chapter list
CUtlVector<MODTITLECOMMENT> *ModChapterComments = Mapbase_GetChapterMaps();
if (ModChapterComments->Count() > 0)
{
for ( int i = 0; i < ModChapterComments->Count(); i++ )
{
if ( !Q_strnicmp( mapname, ModChapterComments->Element(i).pBSPName, strlen(ModChapterComments->Element(i).pBSPName) ) )
{
Q_strncpy( pTitleBuff, ModChapterComments->Element(i).pTitleName, titleBuffSize );
return;
}
}
}
#endif
// Try to find a matching title comment for this mapname
for ( int i = 0; i < ARRAYSIZE(gTitleComments); i++ )
{
@@ -1740,16 +1772,6 @@ void CServerGameDLL::GetTitleName( const char *pMapName, char* pTitleBuff, int t
}
}
#ifdef MAPBASE
// Check the world entity for a chapter title.
if ( CWorld *pWorld = GetWorldEntity() )
{
const char *pWorldChapter = pWorld->GetChapterTitle();
if ( pWorldChapter && pWorldChapter[0] != '\0' )
Q_strncpy( chapterTitle, pWorldChapter, sizeof( chapterTitle ) );
}
#endif
Q_strncpy( pTitleBuff, pMapName, titleBuffSize );
}
#endif
@@ -1789,7 +1811,35 @@ void CServerGameDLL::GetSaveComment( char *text, int maxlength, float flMinutes,
}
#ifdef MAPBASE
// Check the world entity for a chapter title.
// Look in the mod's chapter list
CUtlVector<MODTITLECOMMENT> *ModChapterComments = Mapbase_GetChapterMaps();
if (ModChapterComments->Count() > 0)
{
for ( int i = 0; i < ModChapterComments->Count(); i++ )
{
if ( !Q_strnicmp( mapname, ModChapterComments->Element(i).pBSPName, strlen(ModChapterComments->Element(i).pBSPName) ) )
{
// found one
int j;
// Got a message, post-process it to be save name friendly
Q_strncpy( comment, ModChapterComments->Element(i).pTitleName, sizeof( comment ) );
pName = comment;
j = 0;
// Strip out CRs
while ( j < 64 && comment[j] )
{
if ( comment[j] == '\n' || comment[j] == '\r' )
comment[j] = 0;
else
j++;
}
break;
}
}
}
// Check the world entity for a chapter title
if ( CWorld *pWorld = GetWorldEntity() )
{
const char *pWorldChapter = pWorld->GetChapterTitle();
@@ -2093,6 +2143,58 @@ void UpdateChapterRestrictions( const char *mapname )
}
#ifdef MAPBASE
// Look in the mod's chapter list
CUtlVector<MODTITLECOMMENT> *ModChapterComments = Mapbase_GetChapterMaps();
if (ModChapterComments->Count() > 0)
{
for ( int i = 0; i < ModChapterComments->Count(); i++ )
{
if ( !Q_strnicmp( mapname, ModChapterComments->Element(i).pBSPName, strlen(ModChapterComments->Element(i).pBSPName) ) )
{
// found
Q_strncpy( chapterTitle, ModChapterComments->Element(i).pTitleName, sizeof( chapterTitle ) );
int j = 0;
while ( j < 64 && chapterTitle[j] )
{
if ( chapterTitle[j] == '\n' || chapterTitle[j] == '\r' )
chapterTitle[j] = 0;
else
j++;
}
// Mods can order their own custom chapter names,
// allowing for more flexible string name usage, multiple names in one chapter, etc.
CUtlVector<MODCHAPTER> *ModChapterList = Mapbase_GetChapterList();
for ( int i = 0; i < ModChapterList->Count(); i++ )
{
if ( !Q_strnicmp( chapterTitle, ModChapterList->Element(i).pChapterName, strlen(chapterTitle) ) )
{
// ok we have the string, see if it's newer
int nNewChapter = ModChapterList->Element(i).iChapter;
int nUnlockedChapter = sv_unlockedchapters.GetInt();
if ( nUnlockedChapter < nNewChapter )
{
// ok we're at a higher chapter, unlock
sv_unlockedchapters.SetValue( nNewChapter );
// HACK: Call up through a better function than this? 7/23/07 - jdw
if ( IsX360() )
{
engine->ServerCommand( "host_writeconfig\n" );
}
}
g_nCurrentChapterIndex = nNewChapter;
return;
}
}
break;
}
}
}
// Check the world entity for a chapter title.
if ( CWorld *pWorld = GetWorldEntity() )
{