Jump to content

[CODE] HL2 Camera


Syran0

Recommended Posts

void phoenix_camera::draw_rear_view_mirror(void)
{
try
{   		
	if( emanager.get_local_player() != NULL )
	{
		vrect_t rect;
		rect.x		= GUI(REARVIEWMIRROR)->x + (BORDER_SIZE >> 1);
		rect.y		= GUI(REARVIEWMIRROR)->y + TITTLE_BAR_SIZE;
		rect.width	= GUI(REARVIEWMIRROR)->w - BORDER_SIZE;
		rect.height = GUI(REARVIEWMIRROR)->h - TITTLE_BAR_SIZE;
		rect.pnext	= NULL;

		CViewSetup myView;
		phoenix_game_call::GetPlayerView(myView);//IBaseClientDLL*

		CViewSetup mirrorView		= myView;
		mirrorView.width			= rect.width;
		mirrorView.height			= rect.height;
		mirrorView.x				= rect.x;
		mirrorView.y				= rect.y;
		mirrorView.origin			= emanager.get_local_player()->GetEyesPos();
		mirrorView.angles			= emanager.get_local_player()->GetEyesAngle();
		mirrorView.angles.y			+= 180;
		mirrorView.fov				= 90.0f;
		phoenix_game_call::RenderViewEx(mirrorView,0,0);//IViewRender*
	}
}
catch (...)
{
	phoenix_debug::add_log("draw_rear_view_mirror(void) error...");
}
}

 

v3n0m4 P7TR1CK
Link to comment
Share on other sites

  • 5 months later...

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now


×
×
  • Create New...