Пример #1
0
bool CClientWeaponDisc::OnMessage( uint8 messageID, ILTMessage_Read *pMsg )
{
    switch ( messageID )
    {
    case MID_PROJECTILE:
    {
        // projectile message, send to the hanler routine
        bool bMessageHandled = HandleMessageProjectile( messageID, pMsg );
        if ( bMessageHandled )
        {
            return true;
        }
    }
    break;

    default:
    {
        // only projectile messages should be going to the weapon
        ASSERT( 0 );
    }
    break;
    }  // switch( messageID )

    return false;
}
Пример #2
0
uint32 CTronPlayerObj::ObjectMessageFn( HOBJECT hSender,
                                        ILTMessage_Read *pMsg )
{
	pMsg->SeekTo(0);
	uint32 messageID = pMsg->Readuint32();

	switch ( messageID )
	{
		case MID_PROJECTILE:
		{
			bool bMessageHandled;
			bMessageHandled =
					HandleMessageProjectile( hSender, pMsg );
			if ( bMessageHandled )
			{
				return 1;
			}
		}
		break;
	}

	return CPlayerObj::ObjectMessageFn(hSender, pMsg);
}