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

@@ -195,6 +195,10 @@ ConVar sv_player_display_usercommand_errors( "sv_player_display_usercommand_err
ConVar player_debug_print_damage( "player_debug_print_damage", "0", FCVAR_CHEAT, "When true, print amount and type of all damage received by player to console." );
#ifdef MAPBASE
ConVar player_use_visibility_cache( "player_use_visibility_cache", "0", FCVAR_NONE, "Allows the player to use the visibility cache." );
#endif
void CC_GiveCurrentAmmo( void )
{
@@ -5749,6 +5753,25 @@ CBaseEntity *CBasePlayer::GiveNamedItem( const char *pszName, int iSubType )
DispatchSpawn( pent );
#ifdef MAPBASE
if ( pWeapon )
{
for (int i=0;i<MAX_WEAPONS;i++)
{
if ( m_hMyWeapons[i].Get() && m_hMyWeapons[i]->GetSlot() == pWeapon->GetSlot() && m_hMyWeapons[i]->GetPosition() == pWeapon->GetPosition() )
{
// Make sure it matches the subtype
if ( m_hMyWeapons[i]->GetSubType() == iSubType )
{
// Don't use this weapon if the slot is already occupied
UTIL_Remove( pWeapon );
return NULL;
}
}
}
}
#endif
if ( pent != NULL && !(pent->IsMarkedForDeletion()) )
{
pent->Touch( this );
@@ -7651,6 +7674,23 @@ void CBasePlayer::PlayWearableAnimsForPlaybackEvent( wearableanimplayback_t iPla
}
#endif // USES_ECON_ITEMS
#ifdef MAPBASE
bool CBasePlayer::ShouldUseVisibilityCache( CBaseEntity *pEntity )
{
// In CBaseEntity::FVisible(), players are allowed to see through CONTENTS_BLOCKLOS, which is used for
// nodraw, block LOS brushes, etc. This is so some code doesn't erronesouly assume the player can't see
// an entity (when the player can, in fact, see it) and therefore do something the player is not supposed to see.
//
// However, to reduce the number of traces FVisible() runs, CBaseCombatCharacter uses a "visibility cache" shared
// by all entities derived from it. The player is normally a part of this visibility cache, so when it runs a trace
// through a CONTENTS_BLOCKLOS surface, the visibility cache assumes entities can now see through it and therefore
// NPCs to see through the brush which should normally block their LOS.
//
// This solution stops the player from using the visibility cache altogether, toggled by a convar.
return player_use_visibility_cache.GetBool();
}
#endif
//================================================================================
// TEAM HANDLING
//================================================================================