Raised This Month: $ Target: $400
 0% 

Curious about trapping stuff sent client <-> server


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Trp. Jed
Member
Join Date: Aug 2004
Old 09-19-2004 , 18:58  
Reply With Quote #4

Actually, I just found this in weapons.cpp:

Code:
void CBasePlayerWeapon::SendWeaponAnim( int iAnim, int skiplocal, int body )
{
	if ( UseDecrement() )
		skiplocal = 1;
	else
		skiplocal = 0;

	m_pPlayer->pev->weaponanim = iAnim;

#if defined( CLIENT_WEAPONS )
	if ( skiplocal && ENGINE_CANSKIP( m_pPlayer->edict() ) )
		return;
#endif

	MESSAGE_BEGIN( MSG_ONE, SVC_WEAPONANIM, NULL, m_pPlayer->pev );
		WRITE_BYTE( iAnim );						// sequence number
		WRITE_BYTE( pev->body );					// weaponmodel bodygroup.
	MESSAGE_END();
}
So it seems that the server(?) sends a message type to the client to tell it to change the sequence and body group. So is it possible to trap this kind of messages?

I wondered if register_event would do it actually. I've seen event "23" being hooked which is a SVC_TEMPENTITY. In this case SVC_WEAPONANIM is 30, so if I register and event for that I guess I could read out the values being sent? That sound about right?
Trp. Jed is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 17:15.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode