vphysics_bullet/Physics_PlayerController.cpp
int CPlayerController::GetShadowPosition(Vector *position, QAngle *angles) {
	btRigidBody *pObject = m_pObject->GetObject();

	btTransform transform;
	((btMassCenterMotionState *)pObject->getMotionState())->getGraphicTransform(transform);

	if (position) ConvertPosToHL(transform.getOrigin(), *position);
	if (angles) ConvertRotationToHL(transform.getBasis(), *angles);

	// Yep. We're returning a variable totally unrelated to the shadow's position.
	// Returns whether the physics object was updated this frame or not
	return 1;
}
// Amazing! It absolutely does not matter what values we return here (except for the return value)
// The one implementation in the 2013 SDK that calls this discards the position we return!
// Also the angles parameter is unused because our controller cannot rotate
Amazing. It absolutely does not matter what values we return here (except for the return value)
The one implementation in the 2013 SDK that calls this discards the position we return.
Also the angles parameter is unused because our controller cannot rotate
Amazing . It absolutely does not matter what values we return here ( except for the return value ) The one implementation in the 2013 SDK that calls this discards the position we return . Also the angles parameter is unused because our controller cannot rotate
int CPlayerController::GetShadowPosition(Vector *position, QAngle *angles) {
	btRigidBody *pObject = m_pObject->GetObject();
	btTransform transform;
	((btMassCenterMotionState *)pObject->getMotionState())->getGraphicTransform(transform);
	if (position) ConvertPosToHL(transform.getOrigin(), *position);
	if (angles) ConvertRotationToHL(transform.getBasis(), *angles);
	return 1;
}
int CPlayerController :: GetShadowPosition ( Vector * position , QAngle * angles ) { btRigidBody * pObject = m_pObject -> GetObject ( ) ; btTransform transform ; ( ( btMassCenterMotionState * ) pObject -> getMotionState ( ) ) -> getGraphicTransform ( transform ) ; if ( position ) ConvertPosToHL ( transform . getOrigin ( ) , * position ) ; if ( angles ) ConvertRotationToHL ( transform . getBasis ( ) , * angles ) ; return 1 ; }
Amazing!
Amazing!
// Yep. We're returning a variable totally unrelated to the shadow's position. // Returns whether the physics object was updated this frame or not