mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-22 03:51:32 +00:00
Misc dull tweaks.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5946 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
3d1014efe4
commit
b3f387a548
4 changed files with 33 additions and 19 deletions
|
@ -304,13 +304,14 @@ void IN_DeviceIDs_f(void)
|
|||
|
||||
float IN_DetermineMouseRate(void)
|
||||
{
|
||||
float time = Sys_DoubleTime();
|
||||
static float timer;
|
||||
double time = Sys_DoubleTime();
|
||||
static double timer;
|
||||
static float last;
|
||||
if (fabs(time - timer) > 1)
|
||||
float interval = time - timer;
|
||||
if (fabs(interval) >= 1)
|
||||
{
|
||||
timer = time;
|
||||
last = ptr[0].updates;
|
||||
last = ptr[0].updates/interval;
|
||||
ptr[0].updates = 0;
|
||||
}
|
||||
return last;
|
||||
|
|
|
@ -117,7 +117,6 @@ typedef struct
|
|||
//#define CF_SV_RESERVED CF_CL_ABSVOLUME
|
||||
#define CF_NOREVERB 32 // disables reverb on this channel, if possible.
|
||||
#define CF_FOLLOW 64 // follows the owning entity (stops moving if we lose track)
|
||||
//#define CF_RESERVEDN 128 // reserved for things that should be networked.
|
||||
#define CF_NOREPLACE 128 // start sound event is ignored if there's already a sound playing on that entchannel (probably paired with CF_FORCELOOP).
|
||||
|
||||
#define CF_SV_UNICAST 256 // serverside only. the sound is sent to msg_entity only.
|
||||
|
|
|
@ -271,6 +271,7 @@ void Cvar_List_f (void)
|
|||
int listflags = 0, cvarflags = 0;
|
||||
int total = 0;
|
||||
char strtmp[512];
|
||||
char *col;
|
||||
static char *cvarlist_help =
|
||||
"cvarlist list all cvars matching given parameters\n"
|
||||
"Syntax: cvarlist [-FLdhlrv] [-f flag] [-g group] [cvar]\n"
|
||||
|
@ -467,23 +468,32 @@ showhelp:
|
|||
|
||||
// print cvar name
|
||||
if (!cmd->defaultstr || !strcmp(cmd->string, cmd->defaultstr))
|
||||
Con_Printf(S_COLOR_GREEN "%s", cmd->name); //cvar has default value, woo.
|
||||
col = S_COLOR_GREEN; //cvar has default value, woo.
|
||||
else if (cmd->flags & CVAR_ARCHIVE)
|
||||
Con_Printf(S_COLOR_RED "%s", cmd->name); //cvar will persist. oh noes.
|
||||
col = S_COLOR_RED; //cvar will persist. oh noes.
|
||||
else
|
||||
Con_Printf(S_COLOR_YELLOW "%s", cmd->name); //cvar is changed, but won't be saved to a config so w/e.
|
||||
col = S_COLOR_YELLOW; //cvar is changed, but won't be saved to a config so w/e.
|
||||
if (cmd->flags & CVAR_NOUNSAFEEXPAND)
|
||||
Con_Printf("^[%s%s\\type\\%s\\tip\\"S_COLOR_YELLOW"%s^]", col, cmd->name, cmd->name, cmd->description?cmd->description:""); //cvar is changed, but won't be saved to a config so w/e.
|
||||
else
|
||||
Con_Printf("^[%s%s\\type\\%s %s\\tip\\Default: %s\nCurrent: %s\n\n"S_COLOR_YELLOW"%s^]", col, cmd->name, cmd->name,cmd->string, cmd->defaultstr,cmd->string, cmd->description?cmd->description:""); //cvar is changed, but won't be saved to a config so w/e.
|
||||
total++;
|
||||
|
||||
// print current value
|
||||
if (listflags & CLF_VALUES)
|
||||
if (cmd->flags & CVAR_NOUNSAFEEXPAND)
|
||||
;
|
||||
else
|
||||
{
|
||||
if (*cmd->string)
|
||||
Con_Printf(" %s", cmd->string);
|
||||
}
|
||||
if (listflags & CLF_VALUES)
|
||||
{
|
||||
if (*cmd->string)
|
||||
Con_Printf(" %s", cmd->string);
|
||||
}
|
||||
|
||||
// print default value
|
||||
if (cmd->defaultstr && (listflags & CLF_DEFAULT))
|
||||
Con_Printf(", default \"%s\"", cmd->defaultstr);
|
||||
// print default value
|
||||
if (cmd->defaultstr && (listflags & CLF_DEFAULT))
|
||||
Con_Printf(", default \"%s\"", cmd->defaultstr);
|
||||
}
|
||||
|
||||
// print alternate name
|
||||
if ((listflags & CLF_ALTNAME) && cmd->name2)
|
||||
|
@ -506,7 +516,9 @@ showhelp:
|
|||
// print latched value
|
||||
if (listflags & CLF_LATCHES)
|
||||
{
|
||||
if (cmd->latched_string)
|
||||
if (cmd->flags & CVAR_NOUNSAFEEXPAND)
|
||||
;
|
||||
else if (cmd->latched_string)
|
||||
Con_Printf(", latched as \"%s\"", cmd->latched_string);
|
||||
}
|
||||
|
||||
|
|
|
@ -491,9 +491,11 @@ void MSV_MapCluster_Setup(const char *landingmap, qboolean use_database, qboolea
|
|||
SV_WipeServerState();
|
||||
|
||||
//this is the new-player map.
|
||||
Q_strncpyz(sv.modelname, landingmap, sizeof(sv.modelname));
|
||||
if (!*sv.modelname)
|
||||
Q_strncpyz(sv.modelname, "start", sizeof(sv.modelname));
|
||||
Q_strncpyz(svs.name, landingmap, sizeof(svs.name));
|
||||
if (!*svs.name)
|
||||
Q_strncpyz(svs.name, "start", sizeof(svs.name));
|
||||
|
||||
Q_strncpyz(sv.modelname, svs.name, sizeof(sv.modelname));
|
||||
|
||||
if (use_database)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue