Mapbase v3.1

- Fixed filter_damage_mod blocking all damage which doesn't match the secondary filter regardless of secondary filter mode
- Fixed impulse 101 and other give-related commands leaving behind weapons with occupied slots
- Fixed a crash with scripted_sound's PlaySoundOnEntity when the entity doesn't exist
- Added OnSoundFinished output to ambient_generic
- Added the ability to use custom models/nuggets with item_grubnugget
- Fixed a crash with citizen medics healing nonexistent targets
- Added "SetDistLook" and "SetDistTooFar" inputs for NPCs, allowing manual adjustment of NPC sight distance
- Added keyvalue and input to env_microphone for utilizing a different audio channel
- Added "SetPitchScale" input to env_microphone
- Fixed info_player_view_proxy not using angles
- Fixed dirt variant elite model not being recognized as elite
- Made headcrab hints properly register the start of use (for hint outputs)
- Made RPG use a more realistic firing rate for NPCs which aren't constrained by slow RPG animations, like soldiers
- Added spawnflag for func_breakable_surf to correctly play the break sound
- Added keyvalue for using cheaper warn sound code for combine_mines
- Added "OnSpawnNPC" output for npc_combinedropship when it spawns a soldier, rollermine, or strider
- Added signal gesture activities
- Fixed stunstick not using metrocop knockout/stun code correctly
- Fixed a possible crash involving a NPC's weapon being removed during alt-fire
- Fixed(?) flashlight shadow filters
- Added support for multiple look entities in trigger_look
- Added npc_metropolice alt-firing
- Fixed npc_metropolice using pistol burst firing on weapon_357
- Fixed npc_metropolice not deploying manhacks/throwing grenades in standoffs
- Fixed npc_metropolice not recognizing some crouch activities correctly
- Changed weapon_357 so it runs a tracer each shot from NPCs
- Added SDK_ShatteredGlass, a Mapbase version of ShatteredGlass
- Added "SetSpeedModifier" to NPCs, based on 1upD's shadow walker code
- Made game_convar_mod much more reliable
- Fixed non-mirrored npc_turret_lab refusing to die
- Made npc_turret_lab use SMG1 ammo instead of AR2 ammo
- Fixed block LOS brushes sometimes not working with players (and possibly similar issues)
- Raised maximum renderable entities from 4096 to 16384, based on ficool2's limit research
- Added SDK_ShatteredGlass, a Mapbase version of ShatteredGlass. Can display parallax corrected cubemaps from its unbroken form
- Fixed VBSP breaking func_breakable_surf, etc. when using parallax corrected cubemaps
- Raised maximum VBSP entities from 8192 to 65536, based on ficool2's limit research
- Raised maximum VBSP worldlights from 8192 to 65536, based on ficool2's limit research
- Raised maximum VBSP overlays from 512 to 8192, based on ficool2's limit research
- Other misc. fixes
This commit is contained in:
Blixibon
2020-05-02 02:06:02 +00:00
parent c5f3fa0778
commit af85131deb
51 changed files with 1442 additions and 69 deletions

View File

@@ -10,6 +10,8 @@
#include "SystemConvarMod.h"
ConVar g_debug_convarmod( "g_debug_convarmod", "0" );
BEGIN_SIMPLE_DATADESC( modifiedconvars_t )
DEFINE_ARRAY( pszConvar, FIELD_CHARACTER, MAX_MODIFIED_CONVAR_STRING ),
DEFINE_ARRAY( pszCurrentValue, FIELD_CHARACTER, MAX_MODIFIED_CONVAR_STRING ),
@@ -121,6 +123,11 @@ void CVEnt_Activate(CMapbaseCVarModEntity *modent)
pszCommands = szTmp;
}
CV_InitMod();
if (m_ModEntities.Find(modent) == m_ModEntities.InvalidIndex())
m_ModEntities.AddToTail( modent );
if (modent->m_bUseServer)
{
SetChangingCVars( modent );
@@ -160,6 +167,8 @@ void CVEnt_Deactivate(CMapbaseCVarModEntity *modent)
}
}
modent->m_ModifiedConvars.Purge();
if (m_bModActive)
{
m_ModEntities.FindAndRemove(modent);
@@ -198,6 +207,8 @@ BEGIN_DATADESC( CMapbaseCVarModEntity )
DEFINE_INPUTFUNC( FIELD_VOID, "Activate", InputActivate ),
DEFINE_INPUTFUNC( FIELD_VOID, "Deactivate", InputDeactivate ),
DEFINE_THINKFUNC( CvarModActivate ),
END_DATADESC()
@@ -230,10 +241,21 @@ void CMapbaseCVarModEntity::Spawn( void )
if (HasSpawnFlags(SF_CVARMOD_START_ACTIVATED))
{
CVEnt_Activate(this);
if (!m_bUseServer && !UTIL_GetLocalPlayer())
{
// The local player doesn't exist yet, so we should wait until they do
SetContextThink( &CMapbaseCVarModEntity::CvarModActivate, gpGlobals->curtime, NULL );
}
else
CVEnt_Activate(this);
}
}
void CMapbaseCVarModEntity::CvarModActivate()
{
CVEnt_Activate(this);
}
void CMapbaseCVarModEntity::OnRestore( void )
{
BaseClass::OnRestore();
@@ -246,7 +268,8 @@ void CMapbaseCVarModEntity::OnRestore( void )
ConVar *pConVar = (ConVar *)cvar->FindVar( m_ModifiedConvars[i].pszConvar );
if ( pConVar )
{
//Msg(" %s Restoring Convar %s: value %s (org %s)\n", GetDebugName(), m_ModifiedConvars[i].pszConvar, m_ModifiedConvars[i].pszCurrentValue, m_ModifiedConvars[i].pszOrgValue );
if (g_debug_convarmod.GetBool())
Msg(" %s Restoring Convar %s: value %s (org %s)\n", GetDebugName(), m_ModifiedConvars[i].pszConvar, m_ModifiedConvars[i].pszCurrentValue, m_ModifiedConvars[i].pszOrgValue );
pConVar->SetValue( m_ModifiedConvars[i].pszCurrentValue );
}
}
@@ -276,14 +299,16 @@ bool CMapbaseCVarModEntity::NewCVar( ConVarRef *var, const char *pOldString, CBa
if (modent == this)
{
Q_strncpy( modvar.pszCurrentValue, var->GetString(), MAX_MODIFIED_CONVAR_STRING );
//Msg(" %s Updating Convar %s: value %s (org %s)\n", GetDebugName(), modvar.pszConvar, modvar.pszCurrentValue, modvar.pszOrgValue );
if (g_debug_convarmod.GetBool())
Msg(" %s Updating Convar %s: value %s (org %s)\n", GetDebugName(), modvar.pszConvar, modvar.pszCurrentValue, modvar.pszOrgValue );
return true;
}
else
{
// A different entity is using this CVar now, remove ours
m_ModifiedConvars.Remove(i);
//Msg(" %s Removing Convar %s: value %s (org %s)\n", GetDebugName(), modvar.pszConvar, modvar.pszCurrentValue, modvar.pszOrgValue );
if (g_debug_convarmod.GetBool())
Msg(" %s Removing Convar %s: value %s (org %s)\n", GetDebugName(), modvar.pszConvar, modvar.pszCurrentValue, modvar.pszOrgValue );
return false;
}
}
@@ -299,14 +324,15 @@ bool CMapbaseCVarModEntity::NewCVar( ConVarRef *var, const char *pOldString, CBa
Q_strncpy( newConvar.pszOrgValue, pOldString, MAX_MODIFIED_CONVAR_STRING );
m_ModifiedConvars.AddToTail( newConvar );
/*
Msg(" %s changed '%s' to '%s' (was '%s')\n", GetDebugName(), var->GetName(), var->GetString(), pOldString );
Msg(" Convars stored: %d\n", m_ModifiedConvars.Count() );
for ( int i = 0; i < m_ModifiedConvars.Count(); i++ )
if (g_debug_convarmod.GetBool())
{
Msg(" Convar %d: %s, value %s (org %s)\n", i, m_ModifiedConvars[i].pszConvar, m_ModifiedConvars[i].pszCurrentValue, m_ModifiedConvars[i].pszOrgValue );
Msg(" %s changed '%s' to '%s' (was '%s')\n", GetDebugName(), var->GetName(), var->GetString(), pOldString );
Msg(" Convars stored: %d\n", m_ModifiedConvars.Count() );
for ( int i = 0; i < m_ModifiedConvars.Count(); i++ )
{
Msg(" Convar %d: %s, value %s (org %s)\n", i, m_ModifiedConvars[i].pszConvar, m_ModifiedConvars[i].pszCurrentValue, m_ModifiedConvars[i].pszOrgValue );
}
}
*/
return true;
}