added some cvar descriptions.

flagged some cvars as archived.
cfg_save writes cvar descriptions
cfg_save writes buttons
fix nq dwarf bug
crosshaircolor 0x00ff00 now works.
snd_device none inhibits any fallback device.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4903 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2015-06-15 20:11:27 +00:00
parent 13a9b36bb3
commit bf63109ad3
22 changed files with 249 additions and 92 deletions

View File

@ -52,7 +52,7 @@ static void QDECL CL_AutoTrackChanged(cvar_t *v, char *oldval)
}
// track high fragger
cvar_t cl_autotrack = CVARCD("cl_autotrack", "auto", CL_AutoTrackChanged, "Specifies the default tracking mode at the start of the map. Use the 'autotrack' command to reset/apply an auto-tracking mode without changing the default.\nValid values are: high, ^hkiller^h, mod, user. Other values are treated as weighting scripts for mvd playback, where available.");
cvar_t cl_hightrack = SCVAR("cl_hightrack", "0");
cvar_t cl_hightrack = CVARD("cl_hightrack", "0", "Obsolete. If you want hightrack, use '[cl_]autotrack high' instead.");
//cvar_t cl_camera_maxpitch = {"cl_camera_maxpitch", "10" };
//cvar_t cl_camera_maxyaw = {"cl_camera_maxyaw", "30" };

View File

@ -298,7 +298,6 @@ void IN_JumpUp (void)
KeyUp(&in_jump);
}
void IN_Button3Down(void) {KeyDown(&in_button3);}
void IN_Button3Up(void) {KeyUp(&in_button3);}
void IN_Button4Down(void) {KeyDown(&in_button4);}
@ -316,6 +315,64 @@ float in_rotate;
void IN_Rotate_f (void) {in_rotate += atoi(Cmd_Argv(1));}
void IN_WriteButtons(vfsfile_t *f, qboolean all)
{
int s,b;
struct
{
kbutton_t *button;
char *name;
} buttons [] =
{
{&in_mlook, "mlook"},
{&in_klook, "klook"},
{&in_left, "left"},
{&in_right, "right"},
{&in_forward, "forward"},
{&in_back, "back"},
{&in_lookup, "lookup"},
{&in_lookdown, "lookdown"},
{&in_moveleft, "moveleft"},
{&in_moveright, "moveright"},
{&in_strafe, "strafe"},
{&in_speed, "speed"},
{&in_use, "use"},
{&in_jump, "jump"},
{&in_attack, "attack"},
{&in_rollleft, "rollleft"},
{&in_rollright, "rollright"},
{&in_up, "up"},
{&in_down, "down"},
{&in_button3, "button3"},
{&in_button4, "button4"},
{&in_button5, "button5"},
{&in_button6, "button6"},
{&in_button7, "button7"},
{&in_button8, "button8"}
};
s = 0;
VFS_PRINTF(f, "\n//Player 1 buttons\n");
for (b = 0; b < countof(buttons); b++)
{
if (buttons[b].button->state[s]&1)
VFS_PRINTF(f, "+%s\n", buttons[b].name);
else if (b || all)
VFS_PRINTF(f, "-%s\n", buttons[b].name);
}
for (; s < MAX_SPLITS; s++)
{
VFS_PRINTF(f, "\n//Player %i buttons\n", s+1);
for (b = 0; b < countof(buttons); b++)
{
if (buttons[b].button->state[s]&1)
VFS_PRINTF(f, "+p%i %s\n", s+1, buttons[b].name);
else if (b || all)
VFS_PRINTF(f, "-p%i %s\n", s+1, buttons[b].name);
}
}
}
//is this useful?
//This function incorporates Tonik's impulse 8 7 6 5 4 3 2 1 to select the prefered weapon on the basis of having it.

View File

@ -70,7 +70,7 @@ cvar_t lookspring = CVARF("lookspring","0", CVAR_ARCHIVE);
cvar_t lookstrafe = CVARF("lookstrafe","0", CVAR_ARCHIVE);
cvar_t sensitivity = CVARF("sensitivity","10", CVAR_ARCHIVE);
cvar_t cl_staticsounds = CVAR("cl_staticsounds", "1");
cvar_t cl_staticsounds = CVAR("cl_staticsounds", "1", CVAR_ARCHIVE);
cvar_t m_pitch = CVARF("m_pitch","0.022", CVAR_ARCHIVE);
cvar_t m_yaw = CVARF("m_yaw","0.022", CVAR_ARCHIVE);

View File

@ -3504,7 +3504,7 @@ void CLNQ_ParseClientdata (void)
if (bits & SU_VIEWHEIGHT)
CL_SetStatInt(0, STAT_VIEWHEIGHT, MSG_ReadChar ());
else if (CPNQ_IS_DP || cls.protocol_nq == CPNQ_DP5)
else// if (CPNQ_IS_DP || cls.protocol_nq == CPNQ_DP5)
CL_SetStatInt(0, STAT_VIEWHEIGHT, DEFAULT_VIEWHEIGHT);
if (bits & SU_IDEALPITCH)

View File

@ -302,10 +302,32 @@ void SCR_StringToRGB (char *rgbstring, float *rgb, float rgbinputscale)
{
char *t;
rgbinputscale = 1/rgbinputscale;
//hex values
if (!strncmp(rgbstring, "0x", 2))
{
char *end;
unsigned int val = strtoul(rgbstring+2, &end, 16);
if (end == rgbstring + 5)
{
rgb[0] = ((val&0xf00)>>8)/15.0;
rgb[1] = ((val&0x0f0)>>4)/15.0;
rgb[2] = ((val&0x00f)>>0)/15.0;
}
else if (end == rgbstring + 8)
{
rgb[0] = ((val&0xff0000)>>12)/255.0;
rgb[1] = ((val&0x00ff00)>> 8)/255.0;
rgb[2] = ((val&0x0000ff)>> 0)/255.0;
}
else
rgb[0] = rgb[1] = rgb[2] = 1;
return ;
}
t = strstr(rgbstring, " ");
if (!t) // use standard coloring
if (!t) // palette index
{
qbyte *pal;
int i = atoi(rgbstring);
@ -321,7 +343,7 @@ void SCR_StringToRGB (char *rgbstring, float *rgb, float rgbinputscale)
VectorScale(rgb, 1/255.0, rgb);
}
else // use RGB coloring
else // use RGB coloring (input is scaled from 0-rgbinputscale)
{
t++;
rgb[0] = atof(rgbstring);
@ -331,6 +353,8 @@ void SCR_StringToRGB (char *rgbstring, float *rgb, float rgbinputscale)
rgb[2] = atof(t+1);
else
rgb[2] = 0.0;
rgbinputscale = 1/rgbinputscale;
VectorScale(rgb, rgbinputscale, rgb);
} // i contains the crosshair color
}

View File

@ -113,7 +113,7 @@ void VARGS Stats_Message(char *msg, ...);
qboolean Stats_TrackerImageLoaded(char *in)
{
qboolean error;
int error;
return Font_TrackerValid(unicode_decode(&error, in, &in, true));
}
static char *Stats_GenTrackerImageString(char *in)

View File

@ -2328,36 +2328,38 @@ void Key_Event (int devid, int key, unsigned int unicode, qboolean down)
dc = keybindings[bkey][modifierstate];
bl = bindcmdlevel[bkey][modifierstate];
}
}
if (!button) //no buttons to click,
{
bkey = IN_TranslateMButtonPress(devid);
if (bkey)
else
{
dc = keybindings[bkey][modifierstate];
bl = bindcmdlevel[bkey][modifierstate];
}
else if (!Key_MouseShouldBeFree())
{
key_repeats[key] = 0;
return;
bkey = IN_TranslateMButtonPress(devid);
if (bkey)
{
dc = keybindings[bkey][modifierstate];
bl = bindcmdlevel[bkey][modifierstate];
}
else if (!Key_MouseShouldBeFree())
{
key_repeats[key] = 0;
return;
}
}
}
}
if (!dc)
dc = "";
if (dc[0] == '+')
if (dc)
{
uc = va("-%s%s %i\n", p, dc+1, bkey);
dc = va("+%s%s %i\n", p, dc+1, bkey);
if (dc[0] == '+')
{
uc = va("-%s%s %i\n", p, dc+1, bkey);
dc = va("+%s%s %i\n", p, dc+1, bkey);
}
else
{
uc = NULL;
dc = va("%s%s\n", p, dc);
}
}
else
{
uc = NULL;
dc = va("%s%s\n", p, dc);
}
//don't mess up if we ran out of devices, just silently release the one that it conflicted with (and only if its in conflict).
if (releasecommand[key][devid%MAX_INDEVS] && (!uc || strcmp(uc, releasecommand[key][devid%MAX_INDEVS])))
@ -2366,7 +2368,8 @@ void Key_Event (int devid, int key, unsigned int unicode, qboolean down)
Z_Free(releasecommand[key][devid%MAX_INDEVS]);
releasecommand[key][devid%MAX_INDEVS] = NULL;
}
Cbuf_AddText (dc, bl);
if (dc)
Cbuf_AddText (dc, bl);
if (uc)
releasecommand[key][devid%MAX_INDEVS] = Z_StrDup(uc);
releasecommandlevel[key][devid%MAX_INDEVS] = bl;

View File

@ -220,6 +220,7 @@ extern qboolean chat_team;
void Key_Event (int devid, int key, unsigned int unicode, qboolean down);
void Key_Init (void);
void IN_WriteButtons(vfsfile_t *f, qboolean all);
void Key_WriteBindings (struct vfsfile_s *f);
void Key_SetBinding (int keynum, int modifier, char *binding, int cmdlevel);
void Key_ClearStates (void);

View File

@ -3460,7 +3460,7 @@ void TTS_SayAsciiString(char *stringtosay)
TTS_SayUnicodeString(bigbuffer);
}
cvar_t tts_mode = CVAR("tts_mode", "1");
cvar_t tts_mode = CVARD("tts_mode", "1", "Text to speech\n0: off\n1: Read only chat messages with a leading 'tts ' prefix.\n2: Read all chat messages\n3: Read every single console print.");
void TTS_SayChatString(char **stringtosay)
{
if (!strncmp(*stringtosay, "tts ", 4))

View File

@ -62,7 +62,7 @@ cvar_t gl_shadeq1_name = CVARD ("gl_shadeq1_name", "*", "Rename all surfac
extern cvar_t r_vertexlight;
extern cvar_t r_forceprogramify;
cvar_t mod_md3flags = CVAR ("mod_md3flags", "1");
cvar_t mod_md3flags = CVARD ("mod_md3flags", "1", "The flags field of md3s was never officially defined. If this is set to 1, the flags will be treated identically to mdl files. Otherwise they will be ignored. Naturally, this is required to provide rotating pickups in quake.");
cvar_t r_ambient = CVARF ("r_ambient", "0",
CVAR_CHEAT);
@ -73,8 +73,8 @@ cvar_t r_bouncysparks = CVARFD ("r_bouncysparks", "0",
cvar_t r_drawentities = CVAR ("r_drawentities", "1");
cvar_t r_drawflat = CVARF ("r_drawflat", "0",
CVAR_ARCHIVE | CVAR_SEMICHEAT | CVAR_RENDERERCALLBACK | CVAR_SHADERSYSTEM);
cvar_t r_wireframe = CVARF ("r_wireframe", "0",
CVAR_CHEAT);
cvar_t r_wireframe = CVARFD ("r_wireframe", "0",
CVAR_CHEAT, "Developer feature where everything is drawn with wireframe over the top. Only active where cheats are permitted.");
cvar_t r_wireframe_smooth = CVAR ("r_wireframe_smooth", "0");
cvar_t r_refract_fbo = CVARD ("r_refract_fbo", "1", "Use an fbo for refraction. If 0, just renders as a portal and uses a copy of the current framebuffer.");
cvar_t gl_miptexLevel = CVAR ("gl_miptexLevel", "0");
@ -90,8 +90,8 @@ cvar_t r_fastskycolour = CVARF ("r_fastskycolour", "0",
CVAR_RENDERERCALLBACK|CVAR_SHADERSYSTEM);
cvar_t r_fb_bmodels = CVARAF("r_fb_bmodels", "1",
"gl_fb_bmodels", CVAR_SEMICHEAT|CVAR_RENDERERLATCH);
cvar_t r_fb_models = CVARAF ("r_fb_models", "1",
"gl_fb_models", CVAR_SEMICHEAT);
cvar_t r_fb_models = CVARAFD ("r_fb_models", "1",
"gl_fb_models", CVAR_SEMICHEAT, "Force all non-player models to be fullbright in deathmatch. Because if you don't enable these cheats then you'll go splat because everone else uses them. QuakeWorld players suck.");
cvar_t r_skin_overlays = SCVARF ("r_skin_overlays", "1",
CVAR_SEMICHEAT|CVAR_RENDERERLATCH);
cvar_t r_globalskin_first = CVARFD ("r_globalskin_first", "100", CVAR_RENDERERLATCH, "Specifies the first .skin value that is a global skin. Entities within this range will use the shader/image called 'gfx/skinSKIN.lmp' instead of their regular skin. See also: r_globalskin_count.");
@ -115,12 +115,12 @@ cvar_t r_lightstylesmooth = CVARF ("r_lightstylesmooth", "0", CVAR_ARCHIVE)
cvar_t r_lightstylesmooth_limit = SCVAR ("r_lightstylesmooth_limit", "2");
cvar_t r_lightstylespeed = SCVAR ("r_lightstylespeed", "10");
cvar_t r_lightstylescale = SCVAR ("r_lightstylescale", "1");
cvar_t r_hdr_irisadaptation = SCVAR ("r_hdr_irisadaptation", "0");
cvar_t r_hdr_irisadaptation_multiplier = SCVAR ("r_hdr_irisadaptation_multiplier", "2");
cvar_t r_hdr_irisadaptation_minvalue = SCVAR ("r_hdr_irisadaptation_minvalue", "0.5");
cvar_t r_hdr_irisadaptation_maxvalue = SCVAR ("r_hdr_irisadaptation_maxvalue", "4");
cvar_t r_hdr_irisadaptation_fade_down = SCVAR ("r_hdr_irisadaptation_fade_down", "0.5");
cvar_t r_hdr_irisadaptation_fade_up = SCVAR ("r_hdr_irisadaptation_fade_up", "0.1");
cvar_t r_hdr_irisadaptation = CVARF ("r_hdr_irisadaptation", "0", CVAR_ARCHIVE);
cvar_t r_hdr_irisadaptation_multiplier = CVAR ("r_hdr_irisadaptation_multiplier", "2");
cvar_t r_hdr_irisadaptation_minvalue = CVAR ("r_hdr_irisadaptation_minvalue", "0.5");
cvar_t r_hdr_irisadaptation_maxvalue = CVAR ("r_hdr_irisadaptation_maxvalue", "4");
cvar_t r_hdr_irisadaptation_fade_down = CVAR ("r_hdr_irisadaptation_fade_down", "0.5");
cvar_t r_hdr_irisadaptation_fade_up = CVAR ("r_hdr_irisadaptation_fade_up", "0.1");
cvar_t r_loadlits = CVARF ("r_loadlit", "1", CVAR_ARCHIVE);
cvar_t r_menutint = SCVARF ("r_menutint", "0.68 0.4 0.13",
CVAR_RENDERERCALLBACK);
@ -142,7 +142,7 @@ cvar_t r_stainfadetime = SCVAR ("r_stainfadetime", "1");
cvar_t r_stains = CVARFC("r_stains", IFMINIMAL("0","0.75"),
CVAR_ARCHIVE,
Cvar_Limiter_ZeroToOne_Callback);
cvar_t r_postprocshader = CVARD("r_postprocshader", "", "Specifies a shader to use as a post-processing shader");
cvar_t r_postprocshader = CVARD("r_postprocshader", "", "Specifies a custom shader to use as a post-processing shader");
cvar_t r_wallcolour = CVARAF ("r_wallcolour", "128 128 128",
"r_wallcolor", CVAR_RENDERERCALLBACK|CVAR_SHADERSYSTEM);//FIXME: broken
//cvar_t r_walltexture = CVARF ("r_walltexture", "",
@ -155,8 +155,8 @@ cvar_t r_slimealpha = CVARF ("r_slimealpha", "",
CVAR_ARCHIVE | CVAR_SHADERSYSTEM);
cvar_t r_telealpha = CVARF ("r_telealpha", "",
CVAR_ARCHIVE | CVAR_SHADERSYSTEM);
cvar_t r_waterwarp = CVARF ("r_waterwarp", "1",
CVAR_ARCHIVE);
cvar_t r_waterwarp = CVARFD ("r_waterwarp", "1",
CVAR_ARCHIVE, "Enables fullscreen warp, preferably via glsl. -1 specifies to force the fov warp fallback instead which can give a smidge more performance.");
cvar_t r_replacemodels = CVARFD ("r_replacemodels", IFMINIMAL("","md3 md2"),
CVAR_ARCHIVE, "A list of filename extensions to attempt to use instead of mdl.");
@ -214,19 +214,19 @@ cvar_t vid_fullscreen = CVARF ("vid_fullscreen", "0",
#else
//these cvars will be given their names when they're registered, based upon whether -plugin was used. this means code can always use vid_fullscreen without caring, but gets saved properly.
cvar_t vid_fullscreen = CVARAFD (NULL, "1", "vid_fullscreen",
CVAR_ARCHIVE | CVAR_RENDERERLATCH, "Whether to use fullscreen or not.");
CVAR_ARCHIVE | CVAR_RENDERERLATCH, "Whether to use fullscreen or not. A value of 2 specifies fullscreen windowed (aka borderless window) mode.");
cvar_t vid_fullscreen_alternative = CVARFD (NULL, "1",
CVAR_ARCHIVE, "Whether to use fuollscreen or not. This cvar is saved to your config but not otherwise used in this operating mode.");
CVAR_ARCHIVE, "Whether to use fullscreen or not. This cvar is saved to your config but not otherwise used in this operating mode.");
#endif
cvar_t vid_height = CVARFD ("vid_height", "0",
CVAR_ARCHIVE | CVAR_RENDERERLATCH, "The screen height to attempt to use, in physical pixels. 0 means use desktop resolution.");
cvar_t vid_multisample = CVARF ("vid_multisample", "0",
CVAR_ARCHIVE | CVAR_RENDERERLATCH);
cvar_t vid_multisample = CVARFD ("vid_multisample", "0",
CVAR_ARCHIVE | CVAR_RENDERERLATCH, "Set to 4 or so for multisample antialiasing (msaa).");
cvar_t vid_refreshrate = CVARF ("vid_displayfrequency", "0",
CVAR_ARCHIVE | CVAR_RENDERERLATCH);
cvar_t vid_srgb = CVARFD ("vid_srgb", "0",
CVAR_ARCHIVE, "The framebuffer should use sRGB colourspace. This has the effect of brightening the screen");
cvar_t vid_wndalpha = CVAR ("vid_wndalpha", "1");
cvar_t vid_wndalpha = CVARD ("vid_wndalpha", "1", "When running windowed, specifies the window's transparency level.");
//more readable defaults to match conwidth/conheight.
cvar_t vid_width = CVARFD ("vid_width", "0",
CVAR_ARCHIVE | CVAR_RENDERERLATCH, "The screen width to attempt to use, in physical pixels. 0 means use desktop resolution.");
@ -294,7 +294,7 @@ cvar_t gl_conback = CVARFDC ("gl_conback", "",
cvar_t gl_font = CVARFD ("gl_font", "",
CVAR_RENDERERCALLBACK, ("Specifies the font file to use. a value such as FONT:ALTFONT specifies an alternative font to be used when ^^a is used.\n"
"When using TTF fonts, you will likely need to scale text to at least 150% - vid_conautoscale 1.5 will do this.\n"
"TTF fonts may be loaded from your windows directory. \'gl_font cour:couri\' loads eg: c:\\windows\\fonts\\cour.ttf, and uses the italic version of courier for alternative text."
"TTF fonts may be loaded from your windows directory. \'gl_font cour?col=1,1,1:couri?col=0,1,0\' loads eg: c:\\windows\\fonts\\cour.ttf, and uses the italic version of courier for alternative text, with specific colour tints."
));
cvar_t gl_lateswap = CVAR ("gl_lateswap", "0");
cvar_t gl_lerpimages = CVARFD ("gl_lerpimages", "1", CVAR_ARCHIVE, "Enables smoother resampling for images which are not power-of-two, when the drivers do not support non-power-of-two textures.");

View File

@ -74,9 +74,9 @@ cvar_t loadas8bit = CVARAFD( "s_loadas8bit", "0",
"loadas8bit", CVAR_ARCHIVE,
"Downsample sounds on load as lower quality 8-bit sound.");
cvar_t ambient_level = CVARAF( "s_ambientlevel", "0.3",
"ambient_level", 0);
"ambient_level", CVAR_ARCHIVE);
cvar_t ambient_fade = CVARAF( "s_ambientfade", "100",
"ambient_fade", 0);
"ambient_fade", CVAR_ARCHIVE);
cvar_t snd_noextraupdate = CVARAF( "s_noextraupdate", "0",
"snd_noextraupdate", 0);
cvar_t snd_show = CVARAF( "s_show", "0",
@ -84,7 +84,7 @@ cvar_t snd_show = CVARAF( "s_show", "0",
cvar_t snd_khz = CVARAFD( "s_khz", "48",
"snd_khz", CVAR_ARCHIVE, "Sound speed, in kilohertz. Common values are 11, 22, 44, 48. Values above 1000 are explicitly in hertz.");
cvar_t snd_inactive = CVARAFD( "s_inactive", "1",
"snd_inactive", 0,
"snd_inactive", CVAR_ARCHIVE,
"Play sound while application is inactive (ex. tabbed out). Needs a snd_restart if changed."
); //set if you want sound even when tabbed out.
cvar_t _snd_mixahead = CVARAFD( "s_mixahead", "0.1",
@ -100,7 +100,7 @@ cvar_t snd_buffersize = CVARAF( "s_buffersize", "0",
cvar_t snd_samplebits = CVARAF( "s_bits", "16",
"snd_samplebits", CVAR_ARCHIVE);
cvar_t snd_playersoundvolume = CVARAFD( "s_localvolume", "1",
"snd_localvolume", 0,
"snd_localvolume", CVAR_ARCHIVE,
"Sound level for sounds local or originating from the player such as firing and pain sounds."); //sugested by crunch
cvar_t snd_playbackrate = CVARFD( "snd_playbackrate", "1", CVAR_CHEAT, "Debugging cvar that changes the playback rate of all new sounds.");
@ -113,7 +113,7 @@ cvar_t snd_linearresample_stream = CVARAF( "s_linearresample_stream", "0",
cvar_t snd_mixerthread = CVARAD( "s_mixerthread", "1",
"snd_mixerthread", "When enabled sound mixing will be run on a separate thread. Currently supported only by directsound. Other drivers may unconditionally thread audio. Set to 0 only if you have issues.");
cvar_t snd_device = CVARAFD( "s_device", "",
"snd_device", CVAR_ARCHIVE, "This is the sound device(s) to use, in the form of driver:device. If desired, multiple devices can be listed in space-seperated (quoted) tokens. _s_device_opts contains any enumerated options. In all seriousness, use the menu to set this if you wish to keep your hair.");
"snd_device", CVAR_ARCHIVE, "This is the sound device(s) to use, in the form of driver:device.\nIf desired, multiple devices can be listed in space-seperated (quoted) tokens. _s_device_opts contains any enumerated options.\nIn all seriousness, use the menu to set this if you wish to keep your hair.");
cvar_t snd_device_opts = CVARFD( "_s_device_opts", "", CVAR_NOSET, "The possible audio output devices, in \"value\" \"description\" pairs, for gamecode to read.");
#ifdef VOICECHAT
@ -123,7 +123,7 @@ cvar_t snd_voip_capturedevice_opts = CVARFD("_cl_voip_capturedevice_opts", "", C
int voipbutton; //+voip, no longer part of cl_voip_send to avoid it getting saved
cvar_t snd_voip_send = CVARFD("cl_voip_send", "0", CVAR_ARCHIVE, "Sends voice-over-ip data to the server whenever it is set.\n0: only send voice if +voip is pressed.\n1: voice activation.\n2: constantly send.\n+4: Do not send to game, only to rtp sessions.");
cvar_t snd_voip_test = CVARD("cl_voip_test", "0", "If 1, enables you to hear your own voice directly, bypassing the server and thus without networking latency, but is fine for checking audio levels. Note that sv_voip_echo can be set if you want to include latency and packetloss considerations, but setting that cvar requires server admin access and is thus much harder to use.");
cvar_t snd_voip_vad_threshhold = CVARD("cl_voip_vad_threshhold", "15", "This is the threshhold for voice-activation-detection when sending voip data");
cvar_t snd_voip_vad_threshhold = CVARFD("cl_voip_vad_threshhold", "15", CVAR_ARCHIVE, "This is the threshhold for voice-activation-detection when sending voip data");
cvar_t snd_voip_vad_delay = CVARD("cl_voip_vad_delay", "0.3", "Keeps sending voice data for this many seconds after voice activation would normally stop");
cvar_t snd_voip_capturingvol = CVARAFD("cl_voip_capturingvol", "0.5", NULL, CVAR_ARCHIVE, "Volume multiplier applied while capturing, to avoid your audio from being heard by others. Does not affect game volume when other speak (minimum of cl_voip_capturingvol and cl_voip_ducking is used).");
cvar_t snd_voip_showmeter = CVARAFD("cl_voip_showmeter", "1", NULL, CVAR_ARCHIVE, "Shows your speech volume above the standard hud. 0=hide, 1=show when transmitting, 2=ignore voice-activation disable");
@ -1706,6 +1706,7 @@ S_Startup
void S_ClearRaw(void);
void S_Startup (void)
{
qboolean nodefault = false;
char *s;
if (!snd_initialized)
@ -1724,12 +1725,17 @@ void S_Startup (void)
if (!*com_token)
break;
sep = strchr(com_token, ':');
if (sep)
*sep++ = 0;
SNDDMA_Init(com_token, sep);
if (!Q_strcasecmp(com_token, "none"))
nodefault = true;
else
{
sep = strchr(com_token, ':');
if (sep)
*sep++ = 0;
SNDDMA_Init(com_token, sep);
}
}
if (!sndcardinfo)
if (!sndcardinfo && !nodefault)
SNDDMA_Init(NULL, NULL);
sound_started = true;

View File

@ -94,10 +94,11 @@ void INS_ReInit(void)
void INS_Shutdown(void)
{
}
JNIEXPORT void JNICALL Java_com_fteqw_FTEDroidEngine_keypress(JNIEnv *env, jobject obj,
JNIEXPORT int JNICALL Java_com_fteqw_FTEDroidEngine_keypress(JNIEnv *env, jobject obj,
jint down, jint keycode, jint unicode)
{
IN_KeyEvent(0, down, keycode, unicode);
return true;
}
JNIEXPORT void JNICALL Java_com_fteqw_FTEDroidEngine_motion(JNIEnv *env, jobject obj,
jint act, jint ptrid, jfloat x, jfloat y, jfloat size)

View File

@ -2067,8 +2067,6 @@ void Cmd_ExecuteString (char *text, int level)
char dest[8192];
Cmd_ExecLevel = level;
text = Cmd_ExpandString(text, dest, sizeof(dest), level, !Cmd_IsInsecure()?true:false, true);
Cmd_TokenizeString (text, level == RESTRICT_LOCAL?true:false, false);
@ -2085,7 +2083,7 @@ void Cmd_ExecuteString (char *text, int level)
break; //yes, I know we found it... (but it's the wrong case, go for an alias or cvar instead FIRST)
if ((cmd->restriction?cmd->restriction:rcon_level.ival) > level)
Con_TPrintf("%s was restricted.\n", cmd_argv[0]);
Con_TPrintf("cmd '%s' was restricted.\n", cmd_argv[0]);
else if (!cmd->function)
{
#ifdef VM_CG
@ -2109,7 +2107,12 @@ void Cmd_ExecuteString (char *text, int level)
Cmd_ForwardToServer ();
}
else
{
int olev = Cmd_ExecLevel;
Cmd_ExecLevel = level;
cmd->function ();
Cmd_ExecLevel = olev;
}
return;
}
}
@ -2130,7 +2133,7 @@ void Cmd_ExecuteString (char *text, int level)
if ((a->restriction?a->restriction:rcon_level.ival) > level)
{
Con_TPrintf("%s was restricted.\n", cmd_argv[0]);
Con_TPrintf("alias '%s' was restricted.\n", cmd_argv[0]);
return;
}
if (a->execlevel)
@ -2165,11 +2168,16 @@ void Cmd_ExecuteString (char *text, int level)
if (cmd) //go for skipped ones
{
if ((cmd->restriction?cmd->restriction:rcon_level.ival) > level)
Con_TPrintf("%s was restricted.\n", cmd_argv[0]);
Con_TPrintf("'%s' was restricted.\n", cmd_argv[0]);
else if (!cmd->function)
Cmd_ForwardToServer ();
else
{
int olev = Cmd_ExecLevel;
Cmd_ExecLevel = level;
cmd->function ();
Cmd_ExecLevel = olev;
}
return;
}
@ -2997,6 +3005,7 @@ void Cmd_WriteConfig_f(void)
VFS_WRITE(f, "// FTE config file\n\n", 20);
#ifndef SERVERONLY
Key_WriteBindings (f);
IN_WriteButtons(f, all);
CL_SaveInfo(f);
#else
VFS_WRITE(f, "// Dedicated Server config\n\n", 28);

View File

@ -5087,7 +5087,7 @@ static void COM_WorkerTest_f(void)
}
cvar_t worker_flush = CVARD("worker_flush", "1", "Is set, process the entire load queue, loading stuff faster but at the risk of stalling.");
cvar_t worker_flush = CVARD("worker_flush", "1", "If set, process the entire load queue, loading stuff faster but at the risk of stalling.");
static void COM_InitWorkerThread(void)
{
int i;

View File

@ -1225,6 +1225,7 @@ qboolean Cvar_Command (int level)
cvar_t *v;
char *str;
char buffer[65536];
int olev;
// check variables
v = Cvar_FindVar (Cmd_Argv(0));
@ -1291,9 +1292,9 @@ qboolean Cvar_Command (int level)
return true;
}
#ifndef SERVERONLY
if (Cmd_ExecLevel > RESTRICT_SERVER)
if (level > RESTRICT_SERVER)
{ //directed at a secondary player.
CL_SendClientCommand(true, "%i setinfo %s %s", Cmd_ExecLevel - RESTRICT_SERVER-1, v->name, COM_QuotedString(str, buffer, sizeof(buffer), false));
CL_SendClientCommand(true, "%i setinfo %s %s", level - RESTRICT_SERVER-1, v->name, COM_QuotedString(str, buffer, sizeof(buffer), false));
return true;
}
@ -1324,10 +1325,59 @@ qboolean Cvar_Command (int level)
}
}
#endif
olev = Cmd_ExecLevel;
Cmd_ExecLevel = 0;//just to try to detect any bugs that could happen from this
Cvar_Set (v, str); //will use all, quote included
Cmd_ExecLevel = olev;
return true;
}
static char *Cvar_AddDescription(char *buffer, size_t sizeofbuffer, const char *line, const char *cvardesc)
{
if (!cvardesc || !*cvardesc || strlen(line)+100 > sizeofbuffer)
Q_snprintfz(buffer, sizeofbuffer, "%s\n", line);
else
{
//fixme: de-funstring.
char *out = buffer, *outend = out+sizeofbuffer-2; // 2 for \n\0
int i,pad;
Q_snprintfz(out, outend-out, "%s", line);
out += strlen(out);
pad = (strlen(line)+8) & ~7;
if (pad < 24)
pad = 24;
for(i = out-buffer; i < pad; i++)
*out++ = ' ';
*out++ = '/';
*out++ = '/';
for (;;)
{
if (!*cvardesc || out == outend)
{
*out++ = '\n';
break;
}
if (*cvardesc == '\n')
{
cvardesc++;
*out++ = '\n';
if (out + pad + 2 >= outend)
break;
for(i = 0; i < pad; i++)
*out++ = ' ';
*out++ = '/';
*out++ = '/';
}
else
*out++ = *cvardesc++;
}
*out = 0;
}
return buffer;
}
/*
============
@ -1370,12 +1420,13 @@ void Cvar_WriteVariables (vfsfile_t *f, qboolean all)
if (var->flags & CVAR_USERCREATED)
{
if (var->flags & CVAR_ARCHIVE)
s = va("seta %s %s\n", var->name, COM_QuotedString(val, buffer, sizeof(buffer), false));
s = va("seta %s %s", var->name, COM_QuotedString(val, buffer, sizeof(buffer), false));
else
s = va("set %s %s\n", var->name, COM_QuotedString(val, buffer, sizeof(buffer), false));
s = va("set %s %s", var->name, COM_QuotedString(val, buffer, sizeof(buffer), false));
}
else
s = va("%s %s\n", var->name, COM_QuotedString(val, buffer, sizeof(buffer), false));
s = va("%s %s", var->name, COM_QuotedString(val, buffer, sizeof(buffer), false));
s = Cvar_AddDescription(buffer, sizeof(buffer), s, var->description);
VFS_WRITE(f, s, strlen(s));
}
}

View File

@ -102,6 +102,7 @@ qboolean NET_EnsureRoute(struct ftenet_connections_s *collection, char *routenam
qboolean NET_CompareAdr (netadr_t *a, netadr_t *b);
qboolean NET_CompareBaseAdr (netadr_t *a, netadr_t *b);
void NET_AdrToStringResolve (netadr_t *adr, void (*resolved)(void *ctx, void *data, size_t a, size_t b), void *ctx, size_t a, size_t b);
char *NET_AdrToString (char *s, int len, netadr_t *a);
char *NET_BaseAdrToString (char *s, int len, netadr_t *a);
size_t NET_StringToSockaddr2 (const char *s, int defaultport, struct sockaddr_qstorage *sadr, int *addrfamily, int *addrsize, size_t addrcount);

View File

@ -15,12 +15,12 @@
static char *cvargroup_progs = "Progs variables";
cvar_t sv_gameplayfix_blowupfallenzombies = CVARD("sv_gameplayfix_blowupfallenzombies", "0", "Allow findradius to find non-solid entities. This may break certain mods.");
cvar_t pr_droptofloorunits = CVAR("pr_droptofloorunits", "");
cvar_t pr_droptofloorunits = CVARD("pr_droptofloorunits", "256", "Distance that droptofloor is allowed to drop to be considered successul.");
cvar_t pr_brokenfloatconvert = CVAR("pr_brokenfloatconvert", "0");
cvar_t pr_tempstringcount = CVAR("pr_tempstringcount", "");//"16");
cvar_t pr_tempstringsize = CVAR("pr_tempstringsize", "4096");
cvar_t pr_tempstringcount = CVARD("pr_tempstringcount", "", "Obsolete. Set to 16 if you want to recycle+reuse the same 16 tempstring references and break lots of mods.");
cvar_t pr_tempstringsize = CVARD("pr_tempstringsize", "4096", "Obsolete");
cvar_t pr_sourcedir = CVARD("pr_sourcedir", "src", "Subdirectory where your qc source is located. Used by the internal compiler and qc debugging functionality.");
cvar_t pr_enable_uriget = CVAR("pr_enable_uriget", "1");
cvar_t pr_enable_uriget = CVARD("pr_enable_uriget", "1", "Allows gamecode to make direct http requests");
cvar_t pr_enable_profiling = CVARD("pr_enable_profiling", "0", "Enables profiling support. Will run more slowly. Change the map and then use the profile_ssqc/profile_csqc commands to see the results.");
int tokenizeqc(const char *str, qboolean dpfuckage);

View File

@ -9,6 +9,8 @@ bind volup +showteamscores
// Appearance settings
brightness "0.2"
contrast "1.2"
vid_conautoscale "4" // Text/Menu size. 2 is the default. 4 is bigger
vid_conheight "300" //not using autoscale as it can make the menu unusable.
vid_conautoscale "0" // Text/Menu size. 2 is the default. 4 is bigger
exec configs/touch.cfg

View File

@ -572,9 +572,9 @@ public class FTEDroidActivity extends Activity
setFocusableInTouchMode(true);
}
private void sendKey(final boolean presseddown, final int qcode, final int unicode)
private boolean sendKey(final boolean presseddown, final int qcode, final int unicode)
{
FTEDroidEngine.keypress(presseddown?1:0, qcode, unicode);
return 0!=FTEDroidEngine.keypress(presseddown?1:0, qcode, unicode);
}
@Override
public boolean onTouchEvent(MotionEvent event)
@ -670,16 +670,16 @@ public class FTEDroidActivity extends Activity
public boolean onKeyDown(int keyCode, KeyEvent event)
{
int uc = event.getUnicodeChar();
sendKey(true, mapKey(keyCode, uc), uc);
return true;
int qc = mapKey(keyCode, uc);
return sendKey(true, qc, uc);
}
@Override
public boolean onKeyUp(int keyCode, KeyEvent event)
{
int uc = event.getUnicodeChar();
sendKey(false, mapKey(keyCode, uc), uc);
return true;
int qc = mapKey(keyCode, uc);
return sendKey(false, qc, uc);
}
/*

View File

@ -6,7 +6,7 @@ public class FTEDroidEngine
public static native int frame(float ax, float ay, float az);
public static native int openfile(String filename);
public static native int getvibrateduration(); //in ms
public static native void keypress(int down, int qkey, int unicode);
public static native int keypress(int down, int qkey, int unicode);
public static native void motion(int act, int pointerid, float x, float y, float size);
public static native int paintaudio(byte[] stream, int len);
public static native int audioinfo(int arg);

View File

@ -49,13 +49,13 @@ shader_t *crepuscular_shader;
cvar_t r_shadow_shadowmapping_nearclip = CVAR("r_shadow_shadowmapping_nearclip", "1");
cvar_t r_shadow_shadowmapping_bias = CVAR("r_shadow_shadowmapping_bias", "0.03");
cvar_t r_shadow_scissor = CVAR("r_shadow_scissor", "1");
cvar_t r_shadow_scissor = CVARD("r_shadow_scissor", "1", "constrains stencil shadows to the onscreen box that contains the maxmium extents of the light. This avoids unnecessary work.");
cvar_t r_shadow_realtime_world = CVARF ("r_shadow_realtime_world", "0", CVAR_ARCHIVE);
cvar_t r_shadow_realtime_world = CVARFD ("r_shadow_realtime_world", "0", CVAR_ARCHIVE, "Enables the use of static/world realtime lights.");
cvar_t r_shadow_realtime_world_shadows = CVARF ("r_shadow_realtime_world_shadows", "1", CVAR_ARCHIVE);
cvar_t r_shadow_realtime_world_lightmaps = CVARF ("r_shadow_realtime_world_lightmaps", "0", 0);
cvar_t r_shadow_realtime_dlight = CVARF ("r_shadow_realtime_dlight", "1", CVAR_ARCHIVE);
cvar_t r_shadow_realtime_dlight_shadows = CVARF ("r_shadow_realtime_dlight_shadows", "1", CVAR_ARCHIVE);
cvar_t r_shadow_realtime_world_lightmaps = CVARFD ("r_shadow_realtime_world_lightmaps", "0", 0, "Specifies how much of the map's normal lightmap to retain when using world realtime lights. 0 completely replaces lighting.");
cvar_t r_shadow_realtime_dlight = CVARFD ("r_shadow_realtime_dlight", "1", CVAR_ARCHIVE, "Enables the use of dynamic realtime lights, allowing explosions to use bumpmaps etc properly.");
cvar_t r_shadow_realtime_dlight_shadows = CVARFD ("r_shadow_realtime_dlight_shadows", "1", CVAR_ARCHIVE, "Allows dynamic realtime lights to cast shadows as they move.");
cvar_t r_shadow_realtime_dlight_ambient = CVAR ("r_shadow_realtime_dlight_ambient", "0");
cvar_t r_shadow_realtime_dlight_diffuse = CVAR ("r_shadow_realtime_dlight_diffuse", "1");
cvar_t r_shadow_realtime_dlight_specular = CVAR ("r_shadow_realtime_dlight_specular", "4"); //excessive, but noticable. its called stylized, okay? shiesh, some people
@ -63,7 +63,7 @@ cvar_t r_editlights_import_radius = CVAR ("r_editlights_import_radius", "1");
cvar_t r_editlights_import_ambient = CVAR ("r_editlights_import_ambient", "0");
cvar_t r_editlights_import_diffuse = CVAR ("r_editlights_import_diffuse", "1");
cvar_t r_editlights_import_specular = CVAR ("r_editlights_import_specular", "1"); //excessive, but noticable. its called stylized, okay? shiesh, some people
cvar_t r_shadow_shadowmapping = CVARD ("r_shadow_shadowmapping", "1", "Enables soft shadows");
cvar_t r_shadow_shadowmapping = CVARD ("r_shadow_shadowmapping", "1", "Enables soft shadows instead of stencil shadows.");
cvar_t r_shadow_shadowmapping_precision = CVARD ("r_shadow_shadowmapping_precision", "1", "Scales the shadowmap detail level up or down.");
extern cvar_t r_shadow_shadowmapping_nearclip;
extern cvar_t r_shadow_shadowmapping_bias;

View File

@ -1130,7 +1130,9 @@ int GLVID_SetMode (rendererstate_t *info, unsigned char *palette)
{
int temp;
qboolean stat;
#ifdef WTHREAD
void *cond;
#endif
#ifndef NPFTE
MSG msg;
#endif