Mapbase v2.0; bulk commit

- Added custom map compile tools (vbsp, vvis, vrad)
- Changed blink fix (shouldn't change anything in-game)
- Added auto-completion to ent_create, npc_create, and the main set of "npc_" debug commands
- Added ent_create_aimed, an ent_create equivalent of npc_create_aimed
- Made hunters start using the "vs. player" melee animation against smaller NPCs that look weird with the "stab" attack
- Added "explosion_sparks" convar, which fixes broken code for giving explosions sparks (disabled by default because of how different it looks)
- Made interaction code capable of being dispatched on any entity, not just combat characters
- Added npc_barnacle_ignite convar, which lets barnacles be ignited by flares
- Fixed certain NPCs getting out of the way for the player when they hate them
- Fixed auto-generated "speak" scene responses not using parameters that work on real VCDs
- Made "stop_on_nonidle" capable of being used in any mod, not just HL2 episodic mods
- Selectable color for ragdoll boogie/point_ragdollboogie
- Fixed PickupWeaponInstant not firing weapon pickup outputs
- Introduced inputs and keyvalues for "lerping" to math_counter_advanced
- Fixed ClearConsole on logic_console
- logic_convar should now detect client convars correctly
- New NormalizeAngles input on math_vector
- logic_modelinfo LookupActivity input
- math_generate fixed and expanded to be more like math_counter
- Added a WIP game logging system for playtesting maps
- Introduced logic_playerinfo, an entity that can read a player's name or ID
- Fixed some new filters not working with filter_multi
- Added radius pickup spawnflag to func_physbox
- Added "Preserve name" spawnflag to weapons
- Added cc_achievement_debug message for when an achievement doesn't exist
- Made npc_combine_s not speak while in logic_choreographed_scenes
- Fixed zombie torsos/legs/headcrabs not being serverside when zombie is forced to server ragdoll
- Expanded and cleaned up npc_zombie_custom
- Fixed func_commandredirects not cleaning up correctly and sometimes crashing the game
- Allowed player squad commands to go through +USE-held objects
- Added a bunch of I/O/KV to trigger_waterydeath for better configuration
- Changed save comment system to use the chapter title from world properties, and the ability to suppress the title popup that normally results from it
- Adjusted game_convar_mod for MP planning
- Removed the func_precipitation custom particle/splash code for now, as it was causing problems
- Fixed env_global_light not accepting lightcolor
- Added "Additional Buttons" to player_speedmod
- Added save comment to RPC
- Added env_projectedtexture attenuation
- Added scripted_sequence OnPreIdleSequence
- Added OnCrab to zombies
- Added skill_changed game event (may need further testing)
- Added a fix for viewmodels flipping under extreme FOV values
- Added code that allows mappers to change the skin on shotgunners without it usually flipping back randomly
- Fixed a very, very, very major shader performance issue
- New SetAbsOrigin/Angles inputs on all entities, analogous to SetLocalOrigin/Angles
- Code improvements for I/O involving angles
- logic_entity_position improvements/fixes, including a new OutAngles output that outputs the angles on position calls
- Alternate collision/player avoidance spawnflag obsoletion enforcement disabled
- Enable/DisableHazardLights inputs on the EP2 jalopy, equivalent to the keyvalue
- Miscellaneous shader formatting adjustments and fixes
- Fixed AlwaysDrawOff on env_projectedtexture not being a valid input
This commit is contained in:
Blixibon
2019-12-14 04:20:02 +00:00
parent a1dba884a3
commit dc7f20acc8
97 changed files with 2845 additions and 485 deletions

View File

@@ -44,6 +44,12 @@ BEGIN_DATADESC( CEnvProjectedTexture )
DEFINE_KEYFIELD( m_flBrightnessScale, FIELD_FLOAT, "brightnessscale" ),
DEFINE_FIELD( m_LightColor, FIELD_COLOR32 ),
DEFINE_KEYFIELD( m_flColorTransitionTime, FIELD_FLOAT, "colortransitiontime" ),
#ifdef MAPBASE
DEFINE_FIELD( m_flConstantAtten, FIELD_FLOAT ),
DEFINE_FIELD( m_flLinearAtten, FIELD_FLOAT ),
DEFINE_FIELD( m_flQuadraticAtten, FIELD_FLOAT ),
DEFINE_KEYFIELD( m_flShadowAtten, FIELD_FLOAT, "shadowatten" ),
#endif
DEFINE_INPUTFUNC( FIELD_VOID, "TurnOn", InputTurnOn ),
DEFINE_INPUTFUNC( FIELD_VOID, "TurnOff", InputTurnOff ),
@@ -66,9 +72,14 @@ BEGIN_DATADESC( CEnvProjectedTexture )
DEFINE_INPUTFUNC( FIELD_INTEGER, "SetSpotlightFrame", InputSetSpotlightFrame ),
DEFINE_INPUTFUNC( FIELD_FLOAT, "SetBrightness", InputSetBrightness ),
DEFINE_INPUTFUNC( FIELD_FLOAT, "SetColorTransitionTime", InputSetColorTransitionTime ),
DEFINE_INPUTFUNC( FIELD_FLOAT, "SetQuadratic", InputSetQuadratic ),
DEFINE_INPUTFUNC( FIELD_FLOAT, "SetLinear", InputSetLinear ),
DEFINE_INPUTFUNC( FIELD_FLOAT, "SetConstant", InputSetConstant ),
DEFINE_INPUTFUNC( FIELD_FLOAT, "SetShadowAtten", InputSetShadowAtten ),
DEFINE_INPUTFUNC( FIELD_FLOAT, "SetNearZ", InputSetNearZ ),
DEFINE_INPUTFUNC( FIELD_FLOAT, "SetFarZ", InputSetFarZ ),
DEFINE_INPUTFUNC( FIELD_VOID, "AlwaysDrawOn", InputAlwaysDrawOn ),
DEFINE_INPUTFUNC( FIELD_VOID, "AlwaysDrawOff", InputAlwaysDrawOff ),
DEFINE_INPUTFUNC( FIELD_VOID, "StopFollowingTarget", InputStopFollowingTarget ),
DEFINE_INPUTFUNC( FIELD_VOID, "StartFollowingTarget", InputStartFollowingTarget ),
#endif
@@ -100,6 +111,10 @@ IMPLEMENT_SERVERCLASS_ST( CEnvProjectedTexture, DT_EnvProjectedTexture )
SendPropFloat( SENDINFO( m_flFarZ ), 18, SPROP_ROUNDDOWN, 0.0f, 1500.0f ),
SendPropInt( SENDINFO( m_nShadowQuality ), 1, SPROP_UNSIGNED ), // Just one bit for now
#ifdef MAPBASE
SendPropFloat( SENDINFO( m_flConstantAtten ) ),
SendPropFloat( SENDINFO( m_flLinearAtten ) ),
SendPropFloat( SENDINFO( m_flQuadraticAtten ) ),
SendPropFloat( SENDINFO( m_flShadowAtten ) ),
SendPropBool( SENDINFO( m_bAlwaysDraw ) ),
// Not needed on the client right now, change when it actually is needed
@@ -128,11 +143,21 @@ CEnvProjectedTexture::CEnvProjectedTexture( void )
m_nSpotlightTextureFrame = 0;
m_flBrightnessScale = 1.0f;
m_LightColor.Init( 255, 255, 255, 255 );
#ifdef MAPBASE
m_flColorTransitionTime = 0.0f;
#else
m_flColorTransitionTime = 0.5f;
#endif
m_flAmbient = 0.0f;
m_flNearZ = 4.0f;
m_flFarZ = 750.0f;
m_nShadowQuality = 0;
#ifdef MAPBASE
m_flQuadraticAtten = 0.0f;
m_flLinearAtten = 100.0f;
m_flConstantAtten = 0.0f;
m_flShadowAtten = 0.0f;
#endif
}
void UTIL_ColorStringToLinearFloatColor( Vector &color, const char *pString )
@@ -195,6 +220,20 @@ bool CEnvProjectedTexture::KeyValue( const char *szKeyName, const char *szValue
Q_strcpy( m_SpotlightTextureName.GetForModify(), szValue );
#endif
}
#ifdef MAPBASE
else if ( FStrEq( szKeyName, "constant_attn" ) )
{
m_flConstantAtten = CorrectConstantAtten( atof( szValue ) );
}
else if ( FStrEq( szKeyName, "linear_attn" ) )
{
m_flLinearAtten = CorrectLinearAtten( atof( szValue ) );
}
else if ( FStrEq( szKeyName, "quadratic_attn" ) )
{
m_flQuadraticAtten = CorrectQuadraticAtten( atof( szValue ) );
}
#endif
else
{
return BaseClass::KeyValue( szKeyName, szValue );
@@ -215,6 +254,26 @@ bool CEnvProjectedTexture::GetKeyValue( const char *szKeyName, char *szValue, in
Q_snprintf( szValue, iMaxLen, "%s", m_SpotlightTextureName.Get() );
return true;
}
#ifdef MAPBASE
else if ( FStrEq( szKeyName, "constant_attn" ) )
{
// Undo correction
Q_snprintf( szValue, iMaxLen, "%f", m_flConstantAtten *= 2.0f );
return true;
}
else if ( FStrEq( szKeyName, "linear_attn" ) )
{
// Undo correction
Q_snprintf( szValue, iMaxLen, "%f", m_flLinearAtten *= 0.01f );
return true;
}
else if ( FStrEq( szKeyName, "quadratic_attn" ) )
{
// Undo correction
Q_snprintf( szValue, iMaxLen, "%f", m_flQuadraticAtten *= 0.0001f );
return true;
}
#endif
return BaseClass::GetKeyValue( szKeyName, szValue, iMaxLen );
}