Thirdperson-OrangeBox

From Valve Developer Community
Revision as of 05:25, 26 October 2010 by R4pt0r (talk | contribs) (→‎Spawning players in thirdperson: added <tt> tags to the sv_cheats convar)
Jump to navigation Jump to search

Enabling thirdperson

in the developer console,

sv_cheats 1
thirdperson

Spawning players in thirdperson

Make the following changes to in_camera.cpp:

  • change
void CInput::Init_Camera( void )
{
	m_CameraIsOrthographic = false;
}

to

void CInput::Init_Camera( void )
{
	m_CameraIsOrthographic = false;
	m_fCameraInThirdPerson = true;
}


Then, to keep Source from changing it back to firstperson, disable the sv_cheats check by commenting out the following lines in CAM_Think

// If cheats have been disabled, pull us back out of third-person view.
	 if ( sv_cheats && !sv_cheats->GetBool() )
	{
		CAM_ToFirstPerson();
		return;
	}

change to:

/*  We're using a third-person camera, don't mess with it
// If cheats have been disabled, pull us back out of third-person view.
	 if ( sv_cheats && !sv_cheats->GetBool() )
	{
		CAM_ToFirstPerson();
		return;
	}
*/

Credits:

AndreZero and Bluestrike http://developer.valvesoftware.com/wiki/Talk:Third-person_camera#Start_the_player_in_Third_Person

Stub

This article or section is a stub. You can help by expanding it.