add cl_gunanglex/cl_gunangley/cl_gunanglez
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2280 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
50c00fb7bc
commit
010a1c2a48
3 changed files with 18 additions and 7 deletions
|
@ -2933,6 +2933,7 @@ void CL_LinkViewModel(void)
|
|||
float alpha;
|
||||
|
||||
extern cvar_t cl_gunx, cl_guny, cl_gunz;
|
||||
extern cvar_t cl_gunanglex, cl_gunangley, cl_gunanglez;
|
||||
|
||||
#ifdef SIDEVIEWS
|
||||
extern qboolean r_secondaryview;
|
||||
|
@ -2977,6 +2978,10 @@ void CL_LinkViewModel(void)
|
|||
ent.origin[1] = -cl_gunx.value;
|
||||
ent.origin[2] = -cl_guny.value;
|
||||
|
||||
ent.angles[0] = cl_gunanglex.value;
|
||||
ent.angles[1] = cl_gunangley.value;
|
||||
ent.angles[2] = cl_gunanglez.value;
|
||||
|
||||
ent.shaderRGBAf[0] = 1;
|
||||
ent.shaderRGBAf[1] = 1;
|
||||
ent.shaderRGBAf[2] = 1;
|
||||
|
|
|
@ -124,6 +124,10 @@ cvar_t cl_gunx = SCVAR("cl_gunx", "0");
|
|||
cvar_t cl_guny = SCVAR("cl_guny", "0");
|
||||
cvar_t cl_gunz = SCVAR("cl_gunz", "0");
|
||||
|
||||
cvar_t cl_gunanglex = SCVAR("cl_gunanglex", "0");
|
||||
cvar_t cl_gunangley = SCVAR("cl_gunangley", "0");
|
||||
cvar_t cl_gunanglez = SCVAR("cl_gunanglez", "0");
|
||||
|
||||
cvar_t allow_download_csprogs = SCVAR("allow_download_csprogs", "0");
|
||||
|
||||
cvar_t cl_muzzleflash = SCVAR("cl_muzzleflash", "1");
|
||||
|
@ -2706,6 +2710,10 @@ void CL_Init (void)
|
|||
Cvar_Register (&cl_guny, cl_controlgroup);
|
||||
Cvar_Register (&cl_gunz, cl_controlgroup);
|
||||
|
||||
Cvar_Register (&cl_gunanglex, cl_controlgroup);
|
||||
Cvar_Register (&cl_gunangley, cl_controlgroup);
|
||||
Cvar_Register (&cl_gunanglez, cl_controlgroup);
|
||||
|
||||
#ifdef WEBCLIENT
|
||||
Cmd_AddCommand ("ftp", CL_FTP_f);
|
||||
#endif
|
||||
|
|
|
@ -1875,9 +1875,9 @@ CL_AddViewWeapon
|
|||
void CLQ2_AddViewWeapon (q2player_state_t *ps, q2player_state_t *ops)
|
||||
{
|
||||
entity_t gun; // view model
|
||||
int i;
|
||||
entity_t *view;
|
||||
extern cvar_t cl_gunx, cl_guny, cl_gunz;
|
||||
extern cvar_t cl_gunanglex, cl_gunangley, cl_gunanglez;
|
||||
|
||||
// allow the gun to be completely removed
|
||||
if (!r_drawviewmodel.value)
|
||||
|
@ -1913,16 +1913,14 @@ void CLQ2_AddViewWeapon (q2player_state_t *ps, q2player_state_t *ops)
|
|||
else
|
||||
gun.shaderRGBAf[3] = 1;
|
||||
|
||||
// set up gun position
|
||||
gun.origin[0] = cl_gunz.value;
|
||||
gun.origin[1] = -cl_gunx.value;
|
||||
gun.origin[2] = -cl_guny.value;
|
||||
|
||||
// set up gun position
|
||||
for (i=0 ; i<3 ; i++)
|
||||
{
|
||||
gun.angles[i] = 0;//LerpAngle (ops->gunangles[i],
|
||||
// ps->gunangles[i], cl.lerpfrac);
|
||||
}
|
||||
gun.angles[0] = cl_gunanglex.value;
|
||||
gun.angles[1] = cl_gunangley.value;
|
||||
gun.angles[2] = cl_gunanglez.value;
|
||||
|
||||
gun.frame = ps->gunframe;
|
||||
if (gun.frame == 0)
|
||||
|
|
Loading…
Reference in a new issue