mirror of
https://git.code.sf.net/p/quake/nuq
synced 2024-11-22 04:01:11 +00:00
getting closer to a linking nuq-ded
This commit is contained in:
parent
5330a869a1
commit
60afa90414
3 changed files with 49 additions and 36 deletions
|
@ -87,40 +87,6 @@ float v_dmg_time, v_dmg_roll, v_dmg_pitch;
|
|||
extern int in_forward, in_forward2, in_back;
|
||||
|
||||
|
||||
/*
|
||||
===============
|
||||
V_CalcRoll
|
||||
|
||||
Used by view and sv_user
|
||||
===============
|
||||
*/
|
||||
vec3_t forward, right, up;
|
||||
|
||||
float V_CalcRoll (vec3_t angles, vec3_t velocity)
|
||||
{
|
||||
float sign;
|
||||
float side;
|
||||
float value;
|
||||
|
||||
AngleVectors (angles, forward, right, up);
|
||||
side = DotProduct (velocity, right);
|
||||
sign = side < 0 ? -1 : 1;
|
||||
side = fabs(side);
|
||||
|
||||
value = cl_rollangle->value;
|
||||
// if (cl.inwater)
|
||||
// value *= 6;
|
||||
|
||||
if (side < cl_rollspeed->value)
|
||||
side = side * value / cl_rollspeed->value;
|
||||
else
|
||||
side = value;
|
||||
|
||||
return side*sign;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
===============
|
||||
V_CalcBob
|
||||
|
|
|
@ -36,12 +36,17 @@
|
|||
#include "cvar.h"
|
||||
#include "host.h"
|
||||
#include "keys.h"
|
||||
#include "client.h"
|
||||
|
||||
int m_return_state;
|
||||
qboolean m_return_onerror;
|
||||
char m_return_reason[32];
|
||||
enum {m_none, m_main, m_singleplayer, m_load, m_save, m_multiplayer, m_setup, m_net, m_options, m_video, m_keys, m_help, m_quit, m_serialconfig, m_modemconfig, m_lanconfig, m_gameoptions, m_search, m_slist} m_state;
|
||||
keydest_t key_dest;
|
||||
client_static_t cls;
|
||||
client_state_t cl;
|
||||
vec3_t vright,vup,vleft,vpn;
|
||||
float scr_centertime_off;
|
||||
|
||||
void
|
||||
Con_Printf(char *fmt, ...)
|
||||
|
@ -80,3 +85,13 @@ void
|
|||
SCR_EndLoadingPlaque(void)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
Draw_BeginDisc(void)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
Draw_EndDisc(void)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -42,7 +42,7 @@ edict_t *sv_player;
|
|||
|
||||
cvar_t *sv_edgefriction;
|
||||
|
||||
static vec3_t forward, right, up;
|
||||
vec3_t forward, right, up;
|
||||
|
||||
vec3_t wishdir;
|
||||
float wishspeed;
|
||||
|
@ -57,7 +57,8 @@ qboolean onground;
|
|||
usercmd_t cmd;
|
||||
|
||||
cvar_t *sv_idealpitchscale;
|
||||
|
||||
cvar_t *cl_rollspeed;
|
||||
cvar_t *cl_rollangle;
|
||||
|
||||
/*
|
||||
===============
|
||||
|
@ -642,3 +643,34 @@ void SV_RunClients (void)
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
===============
|
||||
V_CalcRoll
|
||||
|
||||
Used by view and sv_user
|
||||
===============
|
||||
*/
|
||||
|
||||
float V_CalcRoll (vec3_t angles, vec3_t velocity)
|
||||
{
|
||||
float sign;
|
||||
float side;
|
||||
float value;
|
||||
|
||||
AngleVectors (angles, forward, right, up);
|
||||
side = DotProduct (velocity, right);
|
||||
sign = side < 0 ? -1 : 1;
|
||||
side = fabs(side);
|
||||
|
||||
value = cl_rollangle->value;
|
||||
// if (cl.inwater)
|
||||
// value *= 6;
|
||||
|
||||
if (side < cl_rollspeed->value)
|
||||
side = side * value / cl_rollspeed->value;
|
||||
else
|
||||
side = value;
|
||||
|
||||
return side*sign;
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue