Mapbase v6.0

- Fixed path_track paths saving as pointers instead of handles
- Fixed player animations not falling to base class correctly
- Fixed logic_externaldata creating garbage in trailing spaces
- Added "SetHandModelSkin" input
- Added unique colors for various types of console message, adjustable via convars
- Added the ability to use map-specific weapon scripts
- Added a way to display (placeholder) text entirely from Faceposer scenes
- Added "autobreak" keyvalue to game_text, which automatically breaks long text into different lines
- Added the ability to change a game_text's font (very limited)
- Added LightToggle input to point_spotlight
- Added Enable/DisableSprites on npc_manhack
- Added ai_goal_police behavior from metrocops to Combine soldiers and citizens
- Added func_precipitation particle rain systems from the Alien Swarm SDK
- Added new func_precipitation spawnflags for controlling behavior in particle types
- Added "mapbase_version" cvar which shows the version of Mapbase a mod might be running on
- Fixed an oversight with NPC crouch activities which was causing npc_metropolice to stop firing in standoffs
- Added toggleable patches to npc_combine AI which make soldiers less likely to stand around without shooting or rush to melee when not needed
- Added key for custom logo font on env_credits scripts
- Added SetSpeed and SetPushDir inputs for trigger_push
- Added a bunch of I/O/KV to func_fish_pool to allow for more control over the fish
- Added OnLostEnemy/Player support for npc_combine_camera
- Added enhanced save/restore for the Response System, toggleable via convar
- Added a convar which allows users to disable weapon autoswitching when picking up ammo
- Split VScript base script into its own file
- Added VScript descriptions for NPC squads and the manager class which handles them
- Moved several classes, functions, etc. to the VScript library itself for future usage in other projects, like VBSP
- Added VScript to VBSP with basic map file interfacing
- Made some VScript documentation more clear due to deprecation of online documentation
- Added VScript "hook" registration, creating a standardized system which shows up in script_help documentation
- Added VScript-driven custom weapons
- Added clientside VScript scopes
- Added a bunch of weapon-related VScript functions
- Split a bunch of cluttered VScript stuff into different files
- Added VScript functions for "following" entities/bonemerging
- Added VScript functions for grenades
- Added a few more VScript trigger functions
- Added OnDeath hook for VScript
- Fixed documentation for aliased functions in VScript
- Fixed $bumpmask not working on SDK_LightmappedGeneric
- Made vertex blend swapping in Hammer use a constant instead of a combo (makes it easier to compile the shader, especially for $bumpmask's sake)
- Fixed brush phong, etc. causing SDK_WorldVertexTransition to stop working
- Added limited support for $envmapmask in the bumpmapping shader
- Fixed more issues with parallax corrected cubemaps and instances
- Made instance variable recursion consistent with VMFII
This commit is contained in:
Blixibon
2020-11-26 02:26:55 +00:00
parent 3b5b3a9ccb
commit eb014cce6c
125 changed files with 8058 additions and 2767 deletions

View File

@@ -782,6 +782,58 @@ bool CBaseFlex::StartSceneEvent( CSceneEventInfo *info, CChoreoScene *scene, CCh
case CChoreoEvent::EXPRESSION: // These are handled client-side
return true;
#ifdef MAPBASE
case CChoreoEvent::GENERIC:
{
// This is handled in CBaseFlex so that any flex entity--including players--could use this text.
if (stricmp(event->GetParameters(), "AI_GAMETEXT") == 0)
{
// game_text-based lines, for placeholders
if ( event->GetParameters2() )
{
info->m_nType = 12; // SCENE_AI_GAMETEXT
hudtextparms_t textParams;
textParams.holdTime = event->GetDuration();
textParams.fadeinTime = 0.5f;
textParams.fadeoutTime = 0.5f;
if ( GetGameTextSpeechParams( textParams ) )
{
CRecipientFilter filter;
filter.AddAllPlayers();
filter.MakeReliable();
UserMessageBegin( filter, "HudMsg" );
WRITE_BYTE ( textParams.channel & 0xFF );
WRITE_FLOAT( textParams.x );
WRITE_FLOAT( textParams.y );
WRITE_BYTE ( textParams.r1 );
WRITE_BYTE ( textParams.g1 );
WRITE_BYTE ( textParams.b1 );
WRITE_BYTE ( textParams.a1 );
WRITE_BYTE ( textParams.r2 );
WRITE_BYTE ( textParams.g2 );
WRITE_BYTE ( textParams.b2 );
WRITE_BYTE ( textParams.a2 );
WRITE_BYTE ( textParams.effect );
WRITE_FLOAT( textParams.fadeinTime );
WRITE_FLOAT( textParams.fadeoutTime );
WRITE_FLOAT( textParams.holdTime );
WRITE_FLOAT( textParams.fxTime );
WRITE_STRING( event->GetParameters2() );
WRITE_STRING( "" ); // No custom font
WRITE_BYTE ( Q_strlen( event->GetParameters2() ) );
MessageEnd();
}
return true;
}
}
return false;
}
#endif
}
return false;
@@ -2033,6 +2085,70 @@ float CBaseFlex::PlayAutoGeneratedSoundScene( const char *soundname )
}
#endif
#ifdef MAPBASE
//-----------------------------------------------------------------------------
// Purpose: Parameters for scene event AI_GameText
//-----------------------------------------------------------------------------
bool CBaseFlex::GetGameTextSpeechParams( hudtextparms_t &params )
{
params.channel = 3;
params.x = -1;
params.y = 0.6;
params.effect = 0;
params.r1 = 255;
params.g1 = 255;
params.b1 = 255;
ScriptVariant_t varTable;
if (g_pScriptVM->GetValue(m_ScriptScope, "m_GameTextSpeechParams", &varTable) && varTable.m_type == FIELD_HSCRIPT)
{
int nIterator = -1;
ScriptVariant_t varKey, varValue;
while ((nIterator = g_pScriptVM->GetKeyValue( varTable.m_hScript, nIterator, &varKey, &varValue )) != -1)
{
if (FStrEq( varKey.m_pszString, "color" ))
{
params.r1 = varValue.m_pVector->x;
params.g1 = varValue.m_pVector->y;
params.b1 = varValue.m_pVector->z;
}
else if (FStrEq( varKey.m_pszString, "color2" ))
{
params.r2 = varValue.m_pVector->x;
params.g2 = varValue.m_pVector->y;
params.b2 = varValue.m_pVector->z;
}
else if (FStrEq( varKey.m_pszString, "channel" ))
{
params.channel = varValue.m_int;
}
else if (FStrEq( varKey.m_pszString, "x" ))
{
params.x = varValue.m_float;
}
else if (FStrEq( varKey.m_pszString, "y" ))
{
params.y = varValue.m_float;
}
else if (FStrEq( varKey.m_pszString, "effect" ))
{
params.effect = varValue.m_int;
}
else if (FStrEq( varKey.m_pszString, "fxtime" ))
{
params.fxTime = varValue.m_float;
}
g_pScriptVM->ReleaseValue( varKey );
g_pScriptVM->ReleaseValue( varValue );
}
}
return true;
}
#endif
//--------------------------------------------------------------------------------------------------
// Returns the script instance of the scene entity associated with our oldest ("top level") scene event