Esempio n. 1
0
void CHintMessageQueue::Update(CBaseEntity *client)
{
	if (gpGlobals->time > m_tmMessageEnd && m_messages.Count())
	{
		CHintMessage *msg = m_messages[0];
		m_tmMessageEnd = gpGlobals->time + msg->GetDuration();

		UTIL_ShowMessageArgs(msg->m_hintString, client, &msg->m_args, msg->m_isHint);

		delete msg;
		m_messages.Remove(0);
	}
}
Esempio n. 2
0
//--------------------------------------------------------------------------------------------------------------
void CHintMessageQueue::Update()
{
	if ( !m_pPlayer )
		return;

	// test this - send the message as soon as it is ready, 
	// just stomp the old message
	//if ( gpGlobals->curtime > m_tmMessageEnd )
	{
		if ( m_messages.Count() )
		{
			CHintMessage *msg = m_messages[0];
			m_tmMessageEnd = gpGlobals->curtime + msg->GetDuration();
			msg->Send( m_pPlayer );
			delete msg;
			m_messages.Remove( 0 );
		}
	}
}