Added default game_text speech color for every major HL2 character

This commit is contained in:
Blixibon 2021-04-23 00:17:08 -05:00
parent bb250dbae6
commit 62a6481d0d
11 changed files with 59 additions and 9 deletions

View File

@ -905,6 +905,15 @@ bool CAI_Expresser::SpeakDispatchResponse( AIConcept_t &concept, AI_Response *re
textParams.fadeinTime = 0.5f; textParams.fadeinTime = 0.5f;
textParams.fadeoutTime = 0.5f; textParams.fadeoutTime = 0.5f;
textParams.channel = 3;
textParams.x = -1;
textParams.y = 0.6;
textParams.effect = 0;
textParams.r1 = 255;
textParams.g1 = 255;
textParams.b1 = 255;
if (ai_speech_print_mode.GetBool() && GetOuter()->GetGameTextSpeechParams( textParams )) if (ai_speech_print_mode.GetBool() && GetOuter()->GetGameTextSpeechParams( textParams ))
{ {
CRecipientFilter filter; CRecipientFilter filter;

View File

@ -799,6 +799,15 @@ bool CBaseFlex::StartSceneEvent( CSceneEventInfo *info, CChoreoScene *scene, CCh
textParams.fadeinTime = 0.5f; textParams.fadeinTime = 0.5f;
textParams.fadeoutTime = 0.5f; textParams.fadeoutTime = 0.5f;
textParams.channel = 3;
textParams.x = -1;
textParams.y = 0.6;
textParams.effect = 0;
textParams.r1 = 255;
textParams.g1 = 255;
textParams.b1 = 255;
if ( GetGameTextSpeechParams( textParams ) ) if ( GetGameTextSpeechParams( textParams ) )
{ {
CRecipientFilter filter; CRecipientFilter filter;
@ -2091,15 +2100,6 @@ float CBaseFlex::PlayAutoGeneratedSoundScene( const char *soundname )
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
bool CBaseFlex::GetGameTextSpeechParams( hudtextparms_t &params ) 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; ScriptVariant_t varTable;
if (g_pScriptVM->GetValue(m_ScriptScope, "m_GameTextSpeechParams", &varTable) && varTable.m_type == FIELD_HSCRIPT) if (g_pScriptVM->GetValue(m_ScriptScope, "m_GameTextSpeechParams", &varTable) && varTable.m_type == FIELD_HSCRIPT)
{ {

View File

@ -37,6 +37,11 @@ public:
Class_T Classify ( void ); Class_T Classify ( void );
void HandleAnimEvent( animevent_t *pEvent ); void HandleAnimEvent( animevent_t *pEvent );
int GetSoundInterests ( void ); int GetSoundInterests ( void );
#ifdef MAPBASE
// Use Magnusson's default subtitle color (209,178,178)
bool GetGameTextSpeechParams( hudtextparms_t &params ) { params.r1 = 209; params.g1 = 178; params.b1 = 178; return BaseClass::GetGameTextSpeechParams( params ); }
#endif
}; };
LINK_ENTITY_TO_CLASS( npc_magnusson, CNPC_Magnusson ); LINK_ENTITY_TO_CLASS( npc_magnusson, CNPC_Magnusson );

View File

@ -36,6 +36,9 @@ public:
// Now that all allies can holster/unholster, this is a precaution in case it breaks anything. // Now that all allies can holster/unholster, this is a precaution in case it breaks anything.
// Try OnFoundEnemy > UnholsterWeapon if you want Alyx to automatically unholster in non-episodic HL2 maps. // Try OnFoundEnemy > UnholsterWeapon if you want Alyx to automatically unholster in non-episodic HL2 maps.
bool CanUnholsterWeapon() { return false; } bool CanUnholsterWeapon() { return false; }
// Use Alyx's default subtitle color (255,212,255)
bool GetGameTextSpeechParams( hudtextparms_t &params ) { params.r1 = 255; params.g1 = 212; params.b1 = 255; return BaseClass::GetGameTextSpeechParams( params ); }
#endif #endif
EHANDLE m_hEmpTool; EHANDLE m_hEmpTool;

View File

@ -57,6 +57,9 @@ public:
#ifdef MAPBASE #ifdef MAPBASE
// This skips CAI_PlayerAlly's CanFlinch() function since Episodic Alyx can flinch to begin with. // This skips CAI_PlayerAlly's CanFlinch() function since Episodic Alyx can flinch to begin with.
virtual bool CanFlinch( void ) { return CAI_BaseActor::CanFlinch(); } virtual bool CanFlinch( void ) { return CAI_BaseActor::CanFlinch(); }
// Use Alyx's default subtitle color (255,212,255)
bool GetGameTextSpeechParams( hudtextparms_t &params ) { params.r1 = 255; params.g1 = 212; params.b1 = 255; return BaseClass::GetGameTextSpeechParams( params ); }
#endif #endif
virtual float GetJumpGravity() const { return 1.8f; } virtual float GetJumpGravity() const { return 1.8f; }

View File

@ -81,6 +81,11 @@ public:
void GatherConditions(); void GatherConditions();
void UseFunc( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value ); void UseFunc( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value );
#ifdef MAPBASE
// Use Barney's default subtitle color (215,255,255)
bool GetGameTextSpeechParams( hudtextparms_t &params ) { params.r1 = 215; params.g1 = 255; params.b1 = 255; return BaseClass::GetGameTextSpeechParams( params ); }
#endif
CAI_FuncTankBehavior m_FuncTankBehavior; CAI_FuncTankBehavior m_FuncTankBehavior;
COutputEvent m_OnPlayerUse; COutputEvent m_OnPlayerUse;

View File

@ -34,6 +34,11 @@ public:
void HandleAnimEvent( animevent_t *pEvent ); void HandleAnimEvent( animevent_t *pEvent );
int GetSoundInterests ( void ); int GetSoundInterests ( void );
bool UseSemaphore( void ); bool UseSemaphore( void );
#ifdef MAPBASE
// Use Breen's default subtitle color (188,188,188)
bool GetGameTextSpeechParams( hudtextparms_t &params ) { params.r1 = 188; params.g1 = 188; params.b1 = 188; return BaseClass::GetGameTextSpeechParams( params ); }
#endif
}; };
LINK_ENTITY_TO_CLASS( npc_breen, CNPC_Breen ); LINK_ENTITY_TO_CLASS( npc_breen, CNPC_Breen );

View File

@ -37,6 +37,11 @@ public:
int GetSoundInterests( void ); int GetSoundInterests( void );
void SetupWithoutParent( void ); void SetupWithoutParent( void );
void PrescheduleThink( void ); void PrescheduleThink( void );
#ifdef MAPBASE
// Use Eli's default subtitle color (255,208,172)
bool GetGameTextSpeechParams( hudtextparms_t &params ) { params.r1 = 255; params.g1 = 208; params.b1 = 172; return BaseClass::GetGameTextSpeechParams( params ); }
#endif
}; };
LINK_ENTITY_TO_CLASS( npc_eli, CNPC_Eli ); LINK_ENTITY_TO_CLASS( npc_eli, CNPC_Eli );

View File

@ -35,6 +35,11 @@ public:
Class_T Classify ( void ); Class_T Classify ( void );
void HandleAnimEvent( animevent_t *pEvent ); void HandleAnimEvent( animevent_t *pEvent );
int GetSoundInterests ( void ); int GetSoundInterests ( void );
#ifdef MAPBASE
// Use Kleiner's default subtitle color (255,255,200)
bool GetGameTextSpeechParams( hudtextparms_t &params ) { params.r1 = 255; params.g1 = 255; params.b1 = 200; return BaseClass::GetGameTextSpeechParams( params ); }
#endif
}; };
LINK_ENTITY_TO_CLASS( npc_kleiner, CNPC_Kleiner ); LINK_ENTITY_TO_CLASS( npc_kleiner, CNPC_Kleiner );

View File

@ -41,6 +41,11 @@ public:
bool CreateBehaviors( void ); bool CreateBehaviors( void );
int SelectSchedule( void ); int SelectSchedule( void );
#ifdef MAPBASE
// Use Mossman's default subtitle color (220,255,198)
bool GetGameTextSpeechParams( hudtextparms_t &params ) { params.r1 = 220; params.g1 = 255; params.b1 = 198; return BaseClass::GetGameTextSpeechParams( params ); }
#endif
private: private:
CAI_FollowBehavior m_FollowBehavior; CAI_FollowBehavior m_FollowBehavior;
}; };

View File

@ -138,6 +138,11 @@ public:
// used so a grub can notify me that I stepped on it. Says a line. // used so a grub can notify me that I stepped on it. Says a line.
void OnSquishedGrub( const CBaseEntity *pGrub ); void OnSquishedGrub( const CBaseEntity *pGrub );
#ifdef MAPBASE
// Use the vortigaunts' default subtitle color (188,241,174)
bool GetGameTextSpeechParams( hudtextparms_t &params ) { params.r1 = 188; params.g1 = 241; params.b1 = 174; return BaseClass::GetGameTextSpeechParams( params ); }
#endif
private: private:
int NumAntlionsInRadius( float flRadius ); int NumAntlionsInRadius( float flRadius );