mirror of
https://git.code.sf.net/p/quake/newtree
synced 2024-11-10 14:52:08 +00:00
Rename V_CalcRoll to SV_CalcRoll;
CVAR_FIXME cleanup.
This commit is contained in:
parent
538e021faf
commit
5096ce59c3
1 changed files with 5 additions and 79 deletions
|
@ -53,36 +53,20 @@ edict_t *sv_player;
|
|||
|
||||
usercmd_t cmd;
|
||||
|
||||
/* cvar_t cl_rollspeed = {"cl_rollspeed", "200"};
|
||||
CVAR_FIXME */
|
||||
cvar_t *cl_rollspeed;
|
||||
/* cvar_t cl_rollangle = {"cl_rollangle", "2.0"};
|
||||
CVAR_FIXME */
|
||||
cvar_t *cl_rollangle;
|
||||
/* cvar_t sv_spectalk = {"sv_spectalk", "1"};
|
||||
CVAR_FIXME */
|
||||
cvar_t *sv_spectalk;
|
||||
|
||||
/* cvar_t sv_mapcheck = {"sv_mapcheck", "1"};
|
||||
CVAR_FIXME */
|
||||
cvar_t *sv_mapcheck;
|
||||
|
||||
/* cvar_t sv_timekick = {"sv_timekick", "3", false, true};
|
||||
CVAR_FIXME */
|
||||
cvar_t *sv_timekick;
|
||||
/* cvar_t sv_timekick_fuzz = {"sv_timekick_fuzz", "10"};
|
||||
CVAR_FIXME */
|
||||
cvar_t *sv_timekick_fuzz;
|
||||
/* cvar_t sv_timekick_interval = {"sv_timekick_interval", "30"};
|
||||
CVAR_FIXME */
|
||||
cvar_t *sv_timekick_interval;
|
||||
|
||||
extern vec3_t player_mins;
|
||||
|
||||
extern int fp_messages, fp_persecond, fp_secondsdead;
|
||||
extern char fp_msg[];
|
||||
/* extern cvar_t pausable;
|
||||
CVAR_FIXME */
|
||||
extern cvar_t *pausable;
|
||||
|
||||
void SV_FullClientUpdateToClient (client_t *client, client_t *cl);
|
||||
|
@ -309,8 +293,6 @@ void SV_PreSpawn_f (void)
|
|||
|
||||
// Con_DPrintf("Client check = %d\n", check);
|
||||
|
||||
/* if (sv_mapcheck.value && check != sv.worldmodel->checksum &&
|
||||
CVAR_FIXME */
|
||||
if (sv_mapcheck->value && check != sv.worldmodel->checksum &&
|
||||
check != sv.worldmodel->checksum2) {
|
||||
SV_ClientPrintf (host_client, PRINT_HIGH,
|
||||
|
@ -419,13 +401,9 @@ void SV_Spawn_f (void)
|
|||
val = GetEdictFieldValue(ent, "gravity");
|
||||
if (val)
|
||||
val->_float = 1.0;
|
||||
/* host_client->maxspeed = sv_maxspeed.value;
|
||||
CVAR_FIXME */
|
||||
host_client->maxspeed = sv_maxspeed->value;
|
||||
val = GetEdictFieldValue(ent, "maxspeed");
|
||||
if (val)
|
||||
/* val->_float = sv_maxspeed.value;
|
||||
CVAR_FIXME */
|
||||
val->_float = sv_maxspeed->value;
|
||||
|
||||
//
|
||||
|
@ -707,48 +685,28 @@ SV_BeginDownload_f
|
|||
void SV_BeginDownload_f(void)
|
||||
{
|
||||
char *name;
|
||||
/* extern cvar_t allow_download;
|
||||
CVAR_FIXME */
|
||||
extern cvar_t *allow_download;
|
||||
/* extern cvar_t allow_download_skins;
|
||||
CVAR_FIXME */
|
||||
extern cvar_t *allow_download_skins;
|
||||
/* extern cvar_t allow_download_models;
|
||||
CVAR_FIXME */
|
||||
extern cvar_t *allow_download_models;
|
||||
/* extern cvar_t allow_download_sounds;
|
||||
CVAR_FIXME */
|
||||
extern cvar_t *allow_download_sounds;
|
||||
/* extern cvar_t allow_download_maps;
|
||||
CVAR_FIXME */
|
||||
extern cvar_t *allow_download_maps;
|
||||
extern int file_from_pak; // ZOID did file come from pak?
|
||||
|
||||
name = Cmd_Argv(1);
|
||||
// hacked by zoid to allow more conrol over download
|
||||
// first off, no .. or global allow check
|
||||
/* if (strstr (name, "..") || !allow_download.value
|
||||
CVAR_FIXME */
|
||||
if (strstr (name, "..") || !allow_download->value
|
||||
// leading dot is no good
|
||||
|| *name == '.'
|
||||
// leading slash bad as well, must be in subdir
|
||||
|| *name == '/'
|
||||
// next up, skin check
|
||||
/* || (strncmp(name, "skins/", 6) == 0 && !allow_download_skins.value)
|
||||
CVAR_FIXME */
|
||||
|| (strncmp(name, "skins/", 6) == 0 && !allow_download_skins->value)
|
||||
// now models
|
||||
/* || (strncmp(name, "progs/", 6) == 0 && !allow_download_models.value)
|
||||
CVAR_FIXME */
|
||||
|| (strncmp(name, "progs/", 6) == 0 && !allow_download_models->value)
|
||||
// now sounds
|
||||
/* || (strncmp(name, "sound/", 6) == 0 && !allow_download_sounds.value)
|
||||
CVAR_FIXME */
|
||||
|| (strncmp(name, "sound/", 6) == 0 && !allow_download_sounds->value)
|
||||
// now maps (note special case for maps, must not be in pak)
|
||||
/* || (strncmp(name, "maps/", 6) == 0 && !allow_download_maps.value)
|
||||
CVAR_FIXME */
|
||||
|| (strncmp(name, "maps/", 6) == 0 && !allow_download_maps->value)
|
||||
// MUST be in a subdirectory
|
||||
|| !strstr (name, "/") )
|
||||
|
@ -821,8 +779,6 @@ void SV_Say (qboolean team)
|
|||
t1[31] = 0;
|
||||
}
|
||||
|
||||
/* if (host_client->spectator && (!sv_spectalk.value || team))
|
||||
CVAR_FIXME */
|
||||
if (host_client->spectator && (!sv_spectalk->value || team))
|
||||
snprintf (text, sizeof(text), "[SPEC] %s: ", host_client->name);
|
||||
else if (team)
|
||||
|
@ -875,8 +831,6 @@ void SV_Say (qboolean team)
|
|||
{
|
||||
if (client->state != cs_spawned)
|
||||
continue;
|
||||
/* if (host_client->spectator && !sv_spectalk.value)
|
||||
CVAR_FIXME */
|
||||
if (host_client->spectator && !sv_spectalk->value)
|
||||
if (!client->spectator)
|
||||
continue;
|
||||
|
@ -1003,8 +957,6 @@ void SV_Pause_f (void)
|
|||
{
|
||||
char st[sizeof(host_client->name) + 32];
|
||||
|
||||
/* if (!pausable.value) {
|
||||
CVAR_FIXME */
|
||||
if (!pausable->value) {
|
||||
SV_ClientPrintf (host_client, PRINT_HIGH, "Pause not allowed.\n");
|
||||
return;
|
||||
|
@ -1281,12 +1233,12 @@ USER CMD EXECUTION
|
|||
|
||||
/*
|
||||
===============
|
||||
V_CalcRoll
|
||||
SV_CalcRoll
|
||||
|
||||
Used by view and sv_user
|
||||
===============
|
||||
*/
|
||||
float V_CalcRoll (vec3_t angles, vec3_t velocity)
|
||||
float SV_CalcRoll (vec3_t angles, vec3_t velocity)
|
||||
{
|
||||
vec3_t forward, right, up;
|
||||
float sign;
|
||||
|
@ -1298,15 +1250,9 @@ float V_CalcRoll (vec3_t angles, vec3_t velocity)
|
|||
sign = side < 0 ? -1 : 1;
|
||||
side = fabs(side);
|
||||
|
||||
/* value = cl_rollangle.value;
|
||||
CVAR_FIXME */
|
||||
value = cl_rollangle->value;
|
||||
|
||||
/* if (side < cl_rollspeed.value)
|
||||
CVAR_FIXME */
|
||||
if (side < cl_rollspeed->value)
|
||||
/* side = side * value / cl_rollspeed.value;
|
||||
CVAR_FIXME */
|
||||
side = side * value / cl_rollspeed->value;
|
||||
else
|
||||
side = value;
|
||||
|
@ -1471,26 +1417,16 @@ void SV_RunCmd (usercmd_t *ucmd, qboolean inside)
|
|||
if (!inside) {
|
||||
host_client->msecs += ucmd->msec;
|
||||
|
||||
/* if ((sv_timekick.value >= 1) &&
|
||||
CVAR_FIXME */
|
||||
if ((sv_timekick->value >= 1) &&
|
||||
/* (tmp_time = realtime - host_client->last_check) >= sv_timekick_interval.value) {
|
||||
CVAR_FIXME */
|
||||
(tmp_time = realtime - host_client->last_check) >= sv_timekick_interval->value) {
|
||||
/* tmp_time *= (1000 + sv_timekick_fuzz.value);
|
||||
CVAR_FIXME */
|
||||
tmp_time *= (1000 + sv_timekick_fuzz->value);
|
||||
if (host_client->msecs > (int) tmp_time) {
|
||||
host_client->msec_cheating++;
|
||||
SV_BroadcastPrintf( PRINT_HIGH,
|
||||
va("%s thinks %d msecs pass in %f msecs. (Strike %d/%d)\n",
|
||||
host_client->name, host_client->msecs, tmp_time,
|
||||
/* host_client->msec_cheating, (int)sv_timekick.value));
|
||||
CVAR_FIXME */
|
||||
host_client->msec_cheating, (int)sv_timekick->value));
|
||||
|
||||
/* if (host_client->msec_cheating >= sv_timekick.value) {
|
||||
CVAR_FIXME */
|
||||
if (host_client->msec_cheating >= sv_timekick->value) {
|
||||
SV_BroadcastPrintf(PRINT_HIGH, va("Strike %d for %s!!\n",
|
||||
host_client->msec_cheating, host_client->name));
|
||||
|
@ -1531,13 +1467,11 @@ void SV_RunCmd (usercmd_t *ucmd, qboolean inside)
|
|||
// show 1/3 the pitch angle and all the roll angle
|
||||
if (sv_player->v.health > 0) {
|
||||
if (!sv_player->v.fixangle) {
|
||||
sv_player->v.angles[PITCH] = -sv_player->v.v_angle[PITCH
|
||||
]/3;
|
||||
sv_player->v.angles[PITCH] = -sv_player->v.v_angle[PITCH]/3;
|
||||
sv_player->v.angles[YAW] = sv_player->v.v_angle[YAW];
|
||||
}
|
||||
sv_player->v.angles[ROLL] =
|
||||
V_CalcRoll (sv_player->v.angles, sv_player->v.velocity)*
|
||||
4;
|
||||
SV_CalcRoll (sv_player->v.angles, sv_player->v.velocity)*4;
|
||||
}
|
||||
|
||||
host_frametime = min(0.1, ucmd->msec * 0.001);
|
||||
|
@ -1820,17 +1754,9 @@ SV_UserInit
|
|||
*/
|
||||
void SV_UserInit (void)
|
||||
{
|
||||
/* Cvar_RegisterVariable (&cl_rollspeed);
|
||||
CVAR_FIXME */
|
||||
cl_rollspeed = Cvar_Get("cl_rollspeed", "200", CVAR_NONE, "None");
|
||||
/* Cvar_RegisterVariable (&cl_rollangle);
|
||||
CVAR_FIXME */
|
||||
cl_rollangle = Cvar_Get("cl_rollangle", "2.0", CVAR_NONE, "None");
|
||||
/* Cvar_RegisterVariable (&sv_spectalk);
|
||||
CVAR_FIXME */
|
||||
cl_rollangle = Cvar_Get("cl_rollangle", "2", CVAR_NONE, "None");
|
||||
sv_spectalk = Cvar_Get("sv_spectalk", "1", CVAR_NONE, "None");
|
||||
/* Cvar_RegisterVariable (&sv_mapcheck);
|
||||
CVAR_FIXME */
|
||||
sv_mapcheck = Cvar_Get("sv_mapcheck", "1", CVAR_NONE, "None");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue