S2S Fun: No Player Animations

Posts 16 of 6 · Page 1 of 1
S2S Fun: No Player Animations
was just messin around with the NOLF2 Source and converted this over to CA...your player wont have any animation on other peoples screen

Code:
#define CLIENTUPDATE_ALLOWINPUT              (1<<4)
 
LTBOOL          m_bAllowPlayerMovement;
uint16      m_PlayerInfoChangeFlags;
 
void cBase::failz0r(LPDIRECT3DDEVICE9 pDevice)
{
        if(g_LTClient->IsConnected())
        {
        if(ValidPointer(g_LTClient))
        {
                        g_LTClient = *(CLTClient**)ADDR_LTCLIENT;
            g_CommonLT =  g_LTClient->Common();
                        CAutoMessage cMsg;
                        cMsg.Writeuint8( 100 ); // player movement
                        cMsg.Writeuint16(CLIENTUPDATE_ALLOWINPUT);
                        cMsg.Writeuint8((uint8)m_bAllowPlayerMovement);
                        g_LTClient->SendToServer(cMsg.Read(), MESSAGE_GUARANTEED);
                        m_PlayerInfoChangeFlags != ~CLIENTUPDATE_ALLOWINPUT;
                        keybd_event(0x33,0,0,0);
        }
}
}
What type of animation are you talking about?

If i'm correct, thats an alternative invisble hack? '-'
Quote Originally Posted by MrLionBr View Post
What type of animation are you talking about?

If i'm correct, thats an alternative invisble hack? '-'
They can see you. It just looks like you're a retard.

It just seems like you aren't doing anything, but you are.
It's like they come up at you and try to kill you than they die randomly because you were behind them all the time.
This is interesting.
Will be sure to test this out.
Quote Originally Posted by CookieMonster3 View Post
It's like they come up at you and try to kill you than they die randomly because you were behind them all the time.
This is interesting.
Will be sure to test this out.
Ohhh this shit is good. =D * Testing ...*
Quote Originally Posted by CookieMonster3 View Post
It's like they come up at you and try to kill you than they die randomly because you were behind them all the time.
This is interesting.
Will be sure to test this out.
if you know what your doing, u can turn this into a form of the character spawn hack

and the key to every hack i've found so far is thanks to the original NOLF2 source code

most of this is useless, but this is the full void for where i got this

Code:
void CPlayerMgr::UpdatePlayerInfo(bool bPlaying)
{
	if (m_bAllowPlayerMovement != m_bLastAllowPlayerMovement)
	{
		g_pGameClientShell->SetInputState(!!m_bAllowPlayerMovement);
	}

	if (m_pPlayerCamera->IsChaseView() != m_bLastSent3rdPerson)
	{
		m_nPlayerInfoChangeFlags |= CLIENTUPDATE_3RDPERSON;
		m_bLastSent3rdPerson = m_pPlayerCamera->IsChaseView();

		if (m_pPlayerCamera->IsChaseView())
		{
			m_nPlayerInfoChangeFlags |= CLIENTUPDATE_3RDPERVAL;
		}
	}

	if (m_bAllowPlayerMovement != m_bLastAllowPlayerMovement)
	{
		m_nPlayerInfoChangeFlags |= CLIENTUPDATE_ALLOWINPUT;
	}

	// Always send CLIENTUPDATE_ALLOWINPUT changes guaranteed...

	if (m_nPlayerInfoChangeFlags & CLIENTUPDATE_ALLOWINPUT)
	{
		CAutoMessage cMsg;
		cMsg.Writeuint8(MID_PLAYER_UPDATE); //Player Movement ID here 100
		cMsg.Writeuint16(CLIENTUPDATE_ALLOWINPUT);
		cMsg.Writeuint8((uint8)m_bAllowPlayerMovement);
		g_pLTClient->SendToServer(cMsg.Read(), MESSAGE_GUARANTEED);
		m_nPlayerInfoChangeFlags &= ~CLIENTUPDATE_ALLOWINPUT;
	}

    float fCurTime   = g_pLTClient->GetTime();
	float fSendRate  = 1.0f / g_CV_CSendRate.GetFloat(DEFAULT_CSENDRATE);
	float fSendDelta = (fCurTime - m_fPlayerInfoLastSendTime);

	if ( m_pMoveMgr->IsInWorld() && (!g_pClientMultiplayerMgr->IsConnectedToRemoteServer( ) || fSendDelta > fSendRate))
	{
		CAutoMessage cMsg;

		cMsg.Writeuint8(MID_PLAYER_UPDATE);

		if (g_vtPlayerRotate.GetFloat(1.0) > 0.0)
		{
			if( PPM_SNOWMOBILE == m_pMoveMgr->GetVehicleMgr()->GetPhysicsModel() )
			{
				m_nPlayerInfoChangeFlags |= CLIENTUPDATE_FULLPLAYERROT;
				
				m_nPlayerInfoChangeFlags &= ~CLIENTUPDATE_ACCURATEPLAYERROT;
				m_nPlayerInfoChangeFlags &= ~CLIENTUPDATE_PLAYERROT;
			}
			else if( m_bServerAccurateRotation )
			{
				m_nPlayerInfoChangeFlags |= CLIENTUPDATE_ACCURATEPLAYERROT;
				
				m_nPlayerInfoChangeFlags &= ~CLIENTUPDATE_PLAYERROT;
				m_nPlayerInfoChangeFlags &= ~CLIENTUPDATE_FULLPLAYERROT;
			}
			else
			{
				m_nPlayerInfoChangeFlags |= CLIENTUPDATE_PLAYERROT;
				
				m_nPlayerInfoChangeFlags &= ~CLIENTUPDATE_ACCURATEPLAYERROT;
				m_nPlayerInfoChangeFlags &= ~CLIENTUPDATE_FULLPLAYERROT;
			}
		}

		if ( m_bSendCameraOffsetToServer )
		{
			m_nPlayerInfoChangeFlags |= CLIENTUPDATE_CAMERAOFFSET;
		}

        cMsg.Writeuint16(m_nPlayerInfoChangeFlags);

		if (m_nPlayerInfoChangeFlags & CLIENTUPDATE_PLAYERROT)
		{
			// Set the player's rotation (don't allow model to rotate up/down).

            LTRotation rPlayerRot(m_fPlayerPitch, m_fPlayerYaw, m_fPlayerRoll);
            cMsg.Writeuint8(CompressRotationByte(&rPlayerRot));
		}
		else if ( m_nPlayerInfoChangeFlags & CLIENTUPDATE_ACCURATEPLAYERROT )
		{

            LTRotation rPlayerRot( m_fPlayerPitch, m_fPlayerYaw, m_fPlayerRoll );
            cMsg.Writeuint16( CompressRotationShort( &rPlayerRot ) );
		}
		else if( m_nPlayerInfoChangeFlags & CLIENTUPDATE_FULLPLAYERROT )
		{
			LTRotation rPlayerRot( m_fPlayerPitch, m_fPlayerYaw, m_fPlayerRoll);
			cMsg.WriteCompLTRotation( rPlayerRot );
		}

		if ( m_nPlayerInfoChangeFlags & ( CLIENTUPDATE_PLAYERROT | CLIENTUPDATE_ACCURATEPLAYERROT ) )
		{
			//
			// pitch
			//

			// and write it to the message.
			cMsg.Writeuint8( CompressAngleToByte( m_fPitch ) );
		}

		// write the camera offset
		if ( m_nPlayerInfoChangeFlags & CLIENTUPDATE_CAMERAOFFSET )
		{
			LTRESULT ltResult;

			// Get the fire position from the camera
			LTVector vCameraPosition;

			// get the camera
			HOBJECT hCamera = g_pPlayerMgr->GetCamera();

			if ( g_pPlayerMgr->IsFirstPerson() &&
			     ( !g_pPlayerMgr->IsUsingExternalCamera() ) && 
			     ( 0 != hCamera ) )
			{
				// we're in 1st person and not using an external camera,

				// get the camera's position
				ltResult = g_pLTClient->GetObjectPos( hCamera, &vCameraPosition );
				ASSERT( LT_OK == ltResult );
			}
			else
			{
				HMODELNODE hPlayerHeadNode;
				LTransform transHeadNode;

				// external camera, figure out where the model's head
				// is and use that.  It won't be as accurate but it is
				// better than nothing.

				// get the head node
				ltResult = g_pModelLT->GetNode( g_pLTClient->GetClientObject(),
				                                "Head_node",
				                                hPlayerHeadNode );
				ASSERT( LT_OK == ltResult );

				// get the node's transform
				ltResult =
					g_pModelLT->GetNodeTransform( g_pLTClient->GetClientObject(),
					                              hPlayerHeadNode,
					                              transHeadNode,
					                              true );
				ASSERT( LT_OK == ltResult );

				// fake the camera position
				ltResult =
					g_pLTClient->GetTransformLT()->GetPos( transHeadNode,
					                                       vCameraPosition );
				ASSERT( LT_OK == ltResult );
			}

			// get the player's position
			LTVector vPlayerPosition;
			ltResult = g_pLTClient->GetObjectPos( g_pMoveMgr->GetObject(),
			                                      &vPlayerPosition );
			ASSERT( LT_OK == ltResult );

			// get the camera offset
			LTVector vOffset = vCameraPosition - vPlayerPosition;

			TVector3< short > vCompressedOffset;

			// compress the offset
			bool result = CompressOffset( &vCompressedOffset, vOffset, 100 );
			ASSERT( true == result );

			// write the offset to the message
			cMsg.Writeuint16( vCompressedOffset.x );

			cMsg.Writeuint16( vCompressedOffset.y );

			cMsg.Writeuint16( vCompressedOffset.z );

		}

		// Write the control flags

		if (bPlaying)
			cMsg.Writeuint32(g_pMoveMgr->GetControlFlags());
		else
			cMsg.Writeuint32(g_pMoveMgr->GetControlFlags() & BC_CFLG_DUCK);

		// Write position info...

		m_pMoveMgr->WritePositionInfo(cMsg);

		g_pLTClient->SendToServer(cMsg.Read(), 0);

		m_fPlayerInfoLastSendTime = fCurTime;
		m_nPlayerInfoChangeFlags  = 0;
	}
}
Posts 16 of 6 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?