add source-sdk-2013

This commit is contained in:
nillerusr
2022-03-01 23:00:42 +03:00
parent 88b8830e8b
commit edc8d6c584
3288 changed files with 3731 additions and 1062455 deletions
+17 -2
View File
@@ -15,6 +15,7 @@
extern ConVar cl_sidespeed;
extern ConVar cl_forwardspeed;
extern ConVar cl_upspeed;
extern ConVar default_fov;
#ifdef ANDROID
#define TOUCH_DEFAULT "1"
@@ -24,6 +25,8 @@ extern ConVar cl_upspeed;
extern ConVar sensitivity;
#define TOUCH_DEFAULT_CFG "touch_default.cfg"
ConVar touch_enable( "touch_enable", TOUCH_DEFAULT, FCVAR_ARCHIVE );
ConVar touch_forwardzone( "touch_forwardzone", "0.06", FCVAR_ARCHIVE, "forward touch zone" );
ConVar touch_sidezone( "touch_sidezone", "0.06", FCVAR_ARCHIVE, "side touch zone" );
@@ -372,13 +375,25 @@ void CTouchControls::Move( float /*frametime*/, CUserCmd *cmd )
void CTouchControls::IN_Look()
{
C_BasePlayer *pl = C_BasePlayer::GetLocalPlayer();
float diff = 1.0f;
if( pl )
{
float def_fov = default_fov.GetFloat();
float fov = pl->GetFOV();
diff = fov/def_fov;
Msg("diff=%f\n", diff);
}
if( !pitch && !yaw )
return;
QAngle ang;
engine->GetViewAngles( ang );
ang.x += pitch;
ang.y += yaw;
ang.x += pitch*diff;
ang.y += yaw*diff;
engine->SetViewAngles( ang );
pitch = yaw = 0;
}