mirror of
https://github.com/YGGverse/hlsdk-portable.git
synced 2025-01-24 05:34:18 +00:00
Merge pull request #68 from FreeSlave/gs_deadangles
Enable camera rotation on death in Gold Source
This commit is contained in:
commit
151c0eb303
@ -161,6 +161,7 @@ bool isMouseRelative = false;
|
|||||||
extern globalvars_t *gpGlobals;
|
extern globalvars_t *gpGlobals;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
int CL_IsDead( void );
|
||||||
extern Vector dead_viewangles;
|
extern Vector dead_viewangles;
|
||||||
|
|
||||||
void V_StopPitchDrift( void )
|
void V_StopPitchDrift( void )
|
||||||
@ -823,7 +824,17 @@ void GoldSourceInput::IN_MouseMove ( float frametime, usercmd_t *cmd)
|
|||||||
int mx, my;
|
int mx, my;
|
||||||
vec3_t viewangles;
|
vec3_t viewangles;
|
||||||
|
|
||||||
gEngfuncs.GetViewAngles( (float *)viewangles );
|
if( gHUD.m_iIntermission )
|
||||||
|
return; // we can't move during intermission
|
||||||
|
|
||||||
|
if( CL_IsDead() )
|
||||||
|
{
|
||||||
|
viewangles = dead_viewangles; // HACKHACK: see below
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
gEngfuncs.GetViewAngles( viewangles );
|
||||||
|
}
|
||||||
|
|
||||||
if ( in_mlook.state & 1)
|
if ( in_mlook.state & 1)
|
||||||
{
|
{
|
||||||
@ -880,8 +891,14 @@ void GoldSourceInput::IN_MouseMove ( float frametime, usercmd_t *cmd)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
gEngfuncs.SetViewAngles( (float *)viewangles );
|
// HACKHACK: change viewangles directly in viewcode,
|
||||||
|
// so viewangles when player is dead will not be changed on server
|
||||||
|
if( !CL_IsDead() )
|
||||||
|
{
|
||||||
|
gEngfuncs.SetViewAngles( viewangles );
|
||||||
|
}
|
||||||
|
|
||||||
|
dead_viewangles = viewangles; // keep them actual
|
||||||
/*
|
/*
|
||||||
//#define TRACE_TEST
|
//#define TRACE_TEST
|
||||||
#if defined( TRACE_TEST )
|
#if defined( TRACE_TEST )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user