mirror of
https://github.com/nzp-team/fteqw.git
synced 2025-02-16 17:01:44 +00:00
fix a few bugs and quirks. yay.
including one that crashes while playing ctf demos. oops. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4936 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
198410cfe7
commit
2d6952b84e
5 changed files with 36 additions and 9 deletions
|
@ -1135,7 +1135,6 @@ void M_Init_Internal (void)
|
|||
#endif
|
||||
Cmd_AddCommand ("menu_single", M_Menu_SinglePlayer_f);
|
||||
Cmd_AddCommand ("menu_multi", M_Menu_MultiPlayer_f);
|
||||
Cmd_AddCommand ("menu_demo", M_Menu_Demos_f);
|
||||
|
||||
Cmd_AddCommand ("menu_keys", M_Menu_Keys_f);
|
||||
Cmd_AddCommand ("help", M_Menu_Help_f);
|
||||
|
@ -1148,8 +1147,6 @@ void M_Init_Internal (void)
|
|||
Cmd_AddCommand ("modelviewer", M_Menu_ModelViewer_f);
|
||||
|
||||
#ifdef CL_MASTER
|
||||
Cmd_AddCommand ("menu_servers", M_Menu_ServerList2_f);
|
||||
|
||||
Cmd_AddCommand ("menu_slist", M_Menu_ServerList2_f);
|
||||
#endif
|
||||
Cmd_AddCommand ("menu_setup", M_Menu_Setup_f);
|
||||
|
@ -1207,7 +1204,6 @@ void M_DeInit_Internal (void)
|
|||
#endif
|
||||
Cmd_RemoveCommand ("menu_single");
|
||||
Cmd_RemoveCommand ("menu_multi");
|
||||
Cmd_RemoveCommand ("menu_demo");
|
||||
|
||||
Cmd_RemoveCommand ("menu_keys");
|
||||
Cmd_RemoveCommand ("help");
|
||||
|
@ -1218,7 +1214,6 @@ void M_DeInit_Internal (void)
|
|||
Cmd_RemoveCommand ("menu_mediafiles");
|
||||
|
||||
#ifdef CL_MASTER
|
||||
Cmd_RemoveCommand ("menu_servers");
|
||||
Cmd_RemoveCommand ("menu_slist");
|
||||
#endif
|
||||
Cmd_RemoveCommand ("menu_setup");
|
||||
|
@ -1285,6 +1280,15 @@ void M_Init (void)
|
|||
Cmd_AddCommand("fps_preset", FPS_Preset_f);
|
||||
Cmd_AddCommand("menupop", M_MenuPop_f);
|
||||
|
||||
//server browser is kinda complex, and has clipboard integration which we need to sandbox a little
|
||||
#ifdef CL_MASTER
|
||||
Cmd_AddCommand ("menu_servers", M_Menu_ServerList2_f);
|
||||
#endif
|
||||
//demo menu is allowed to see outside of the quakedir. you can't replicate that in qc's sandbox.
|
||||
Cmd_AddCommand ("menu_demo", M_Menu_Demos_f);
|
||||
|
||||
|
||||
|
||||
Cvar_Register(&m_preset_chosen, "Menu thingumiebobs");
|
||||
Cvar_Register(&m_helpismedia, "Menu thingumiebobs");
|
||||
|
||||
|
|
|
@ -2718,6 +2718,17 @@ static void QCBUILTIN PF_cl_setcursormode (pubprogfuncs_t *prinst, struct global
|
|||
}
|
||||
}
|
||||
|
||||
static void QCBUILTIN PF_cl_getcursormode (pubprogfuncs_t *prinst, struct globalvars_s *pr_globals)
|
||||
{
|
||||
world_t *world = prinst->parms->user;
|
||||
if (G_FLOAT(OFS_PARM0))
|
||||
G_FLOAT(OFS_RETURN) = Key_MouseShouldBeFree();
|
||||
else if (key_dest_absolutemouse & world->keydestmask)
|
||||
G_FLOAT(OFS_RETURN) = TRUE;
|
||||
else
|
||||
G_FLOAT(OFS_RETURN) = FALSE;
|
||||
}
|
||||
|
||||
//get the input commands, and stuff them into some globals.
|
||||
static void QCBUILTIN PF_cs_getinputstate (pubprogfuncs_t *prinst, struct globalvars_s *pr_globals)
|
||||
{
|
||||
|
@ -5115,6 +5126,7 @@ static struct {
|
|||
{"getkeybind", PF_cl_getkeybind, 342}, // #342 string(float keynum) getkeybind (EXT_CSQC)
|
||||
|
||||
{"setcursormode", PF_cl_setcursormode, 343}, // #343 This is originally a DP extension
|
||||
{"getcursormode", PF_cl_getcursormode, 0}, // #343 This is originally a DP extension
|
||||
{"getmousepos", PF_cl_getmousepos, 344}, // #344 This is a DP extension
|
||||
|
||||
{"getinputstate", PF_cs_getinputstate, 345}, // #345 float(float framenum) getinputstate (EXT_CSQC)
|
||||
|
|
|
@ -1672,7 +1672,7 @@ static void SCR_DrawAutoID(vec3_t org, player_info_t *pl, qboolean isteam)
|
|||
h = 8;
|
||||
y += (h-8)/2;
|
||||
|
||||
for (r = 7; r>=0; r--)
|
||||
for (r = countof(wbitnames)-1; r>=0; r--)
|
||||
if (items & (1<<r))
|
||||
break;
|
||||
R2D_ImageColours(1, 1, 1, 1);
|
||||
|
|
|
@ -152,6 +152,12 @@ char *Cvar_FlagToName(int flag)
|
|||
return "shadersystem";
|
||||
case CVAR_NOSAVE:
|
||||
return "nosave";
|
||||
case CVAR_TELLGAMECODE:
|
||||
return "autocvar";
|
||||
case CVAR_CONFIGDEFAULT:
|
||||
return "";
|
||||
case CVAR_NORESET:
|
||||
return "noreset";
|
||||
}
|
||||
|
||||
return NULL;
|
||||
|
@ -191,6 +197,9 @@ void Cvar_List_f (void)
|
|||
"Cvar flags are:"
|
||||
;
|
||||
|
||||
if (Cmd_Argc() == 1)
|
||||
goto showhelp;
|
||||
|
||||
gsearch = search = NULL;
|
||||
for (i = 1; i < Cmd_Argc(); i++)
|
||||
{
|
||||
|
@ -270,6 +279,7 @@ void Cvar_List_f (void)
|
|||
listflags |= CLF_FLAGS;
|
||||
break;
|
||||
case 'h':
|
||||
showhelp:
|
||||
// list options
|
||||
Con_Printf("%s", cvarlist_help);
|
||||
|
||||
|
|
|
@ -9467,7 +9467,7 @@ BuiltinList_t BuiltinList[] = { //nq qw h2 ebfs
|
|||
{"fgets", PF_fgets, 0, 0, 0, 112, "string(filestream fhandle)"}, // (FRIK_FILE)
|
||||
{"fputs", PF_fputs, 0, 0, 0, 113, "void(filestream fhandle, string s, optional string s2, optional string s3, optional string s4, optional string s5, optional string s6, optional string s7)"}, // (FRIK_FILE)
|
||||
{"strlen", PF_strlen, 0, 0, 0, 114, "float(string s)"}, // (FRIK_FILE)
|
||||
{"strcat", PF_strcat, 0, 0, 0, 115, "string(string s1, optional string s2, optional string s3, optional string s4, optional string s5, optional string s6, optional string s7, string s8)"}, // (FRIK_FILE)
|
||||
{"strcat", PF_strcat, 0, 0, 0, 115, "string(string s1, optional string s2, optional string s3, optional string s4, optional string s5, optional string s6, optional string s7, optional string s8)"}, // (FRIK_FILE)
|
||||
{"substring", PF_substring, 0, 0, 0, 116, "string(string s, float start, float length)"}, // (FRIK_FILE)
|
||||
{"stov", PF_stov, 0, 0, 0, 117, "vector(string s)"}, // (FRIK_FILE)
|
||||
#ifdef QCGC
|
||||
|
@ -9712,6 +9712,7 @@ BuiltinList_t BuiltinList[] = { //nq qw h2 ebfs
|
|||
{"getkeybind", PF_Fixme, 0, 0, 0, 342, D("string(float keynum)", "Returns the current binding for the given key (returning only the command executed when no modifiers are pressed).")},// (EXT_CSQC)
|
||||
|
||||
{"setcursormode", PF_Fixme, 0, 0, 0, 343, D("void(float usecursor, optional string cursorimage, optional vector hotspot, optional float scale)", "Pass TRUE if you want the engine to release the mouse cursor (absolute input events + touchscreen mode). Pass FALSE if you want the engine to grab the cursor (relative input events + standard looking). If the image name is specified, the engine will use that image for a cursor (use an empty string to clear it again), in a way that will not conflict with the console. Images specified this way will be hardware accelerated, if supported by the platform/port.")},
|
||||
{"getcursormode", PF_Fixme, 0, 0, 0, 0, D("float(float effective)", "Reports the cursor mode this module previously attempted to use. If 'effective' is true, reports the cursor mode currently active (if was overriden by a different module which has precidence, for instance, or if there is only a touchscreen and no mouse).")},
|
||||
{"getmousepos", PF_Fixme, 0, 0, 0, 344, D("vector()", "Nasty convoluted DP extension. Typically returns deltas instead of positions. Use CSQC_InputEvent for such things in csqc mods.")}, // #344 This is a DP extension
|
||||
|
||||
{"getinputstate", PF_Fixme, 0, 0, 0, 345, D("float(float inputsequencenum)", "Looks up an input frame from the log, setting the input_* globals accordingly.\nThe sequence number range used for prediction should normally be servercommandframe < sequence <= clientcommandframe.\nThe sequence equal to clientcommandframe will change between input frames.")},// (EXT_CSQC)
|
||||
|
@ -10642,8 +10643,8 @@ void PR_DumpPlatform_f(void)
|
|||
{"input_cursor_trace_endpos", "vector", CS/*|QW|NQ*/},
|
||||
{"input_cursor_trace_entnum", "float", CS/*|QW|NQ*/},
|
||||
|
||||
{"trace_brush_id", "float", QW|NQ|CS},
|
||||
{"trace_brush_faceid", "float", QW|NQ|CS},
|
||||
{"trace_brush_id", "int", QW|NQ|CS},
|
||||
{"trace_brush_faceid", "int", QW|NQ|CS},
|
||||
|
||||
#define comfieldfloat(name,desc) {#name, ".float", FL, desc},
|
||||
#define comfieldvector(name,desc) {#name, ".vector", FL, desc},
|
||||
|
|
Loading…
Reference in a new issue