mirror of
https://github.com/YGGverse/hlsdk-portable.git
synced 2025-03-12 13:31:33 +00:00
Enable chatter
This commit is contained in:
parent
3b7ddbfd63
commit
5a1d8fac0e
@ -1003,6 +1003,7 @@ void BotStatement::AppendPhrase(ContextType contextPhrase)
|
||||
|
||||
// Say our statement
|
||||
// m_index refers to the phrase currently being spoken, or -1 if we havent started yet
|
||||
extern int gmsgSayText;
|
||||
|
||||
bool BotStatement::Update()
|
||||
{
|
||||
@ -1171,7 +1172,8 @@ bool BotStatement::Update()
|
||||
else
|
||||
{
|
||||
// me->SendRadioMessage(radioEvent);
|
||||
me->GetChatter()->ResetRadioSilenceDuration();
|
||||
|
||||
//me->GetChatter()->ResetRadioSilenceDuration();
|
||||
duration = 2.0f;
|
||||
}
|
||||
}
|
||||
@ -1181,6 +1183,13 @@ bool BotStatement::Update()
|
||||
me->GetChatter()->ResetRadioSilenceDuration();
|
||||
// me->StartVoiceFeedback(duration + 1.0f);
|
||||
}
|
||||
// print to the sending client
|
||||
char message[256];
|
||||
Q_snprintf( message, 256, "[bot] %s (radio): %s", STRING( me->pev->netname), phrase->GetName() );
|
||||
MESSAGE_BEGIN( MSG_ALL, gmsgSayText, NULL );
|
||||
WRITE_BYTE( ENTINDEX(me->edict()) );
|
||||
WRITE_STRING( message );
|
||||
MESSAGE_END();
|
||||
}
|
||||
}
|
||||
|
||||
@ -1606,12 +1615,12 @@ BotStatement *BotChatterInterface::GetActiveStatement()
|
||||
bool BotChatterInterface::ShouldSpeak() const
|
||||
{
|
||||
// don't talk to non-existent friends
|
||||
if (m_me->GetFriendsRemaining() == 0)
|
||||
return false;
|
||||
//if (m_me->GetFriendsRemaining() == 0)
|
||||
//return false;
|
||||
|
||||
// if everyone is together, no need to tell them what's going on
|
||||
if (m_me->GetNearbyFriendCount() == m_me->GetFriendsRemaining())
|
||||
return false;
|
||||
//if (m_me->GetNearbyFriendCount() == m_me->GetFriendsRemaining())
|
||||
//return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user