From 027c09bd6aad8876a00359b9fa2930c17a705b36 Mon Sep 17 00:00:00 2001 From: TimeServ Date: Sat, 18 Jun 2011 05:41:10 +0000 Subject: [PATCH] cl_indepphysics -> cl_threadedphysics, properly register r_rockettrail/r_grenadetrail, fix menu spacing regression git-svn-id: https://svn.code.sf.net/p/fteqw/code/branches/wip@3821 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/client/cl_main.c | 8 ++++---- engine/client/m_items.c | 18 +++++++++--------- engine/client/r_part.c | 3 +++ 3 files changed, 16 insertions(+), 13 deletions(-) diff --git a/engine/client/cl_main.c b/engine/client/cl_main.c index cea4c741a..ff1998c8e 100644 --- a/engine/client/cl_main.c +++ b/engine/client/cl_main.c @@ -85,7 +85,7 @@ cvar_t cl_demospeed = CVARAF("cl_demospeed", "1", "demo_setspeed", 0); cvar_t cl_loopbackprotocol = CVAR("cl_loopbackprotocol", "qw"); -cvar_t cl_indepphysics = CVAR("cl_indepphysics", "0"); +cvar_t cl_threadedphysics = CVAR("cl_threadedphysics", "0"); cvar_t localid = SCVAR("localid", ""); @@ -3087,7 +3087,7 @@ void CL_Init (void) Cvar_Register (&cl_loopbackprotocol, cl_controlgroup); #endif Cvar_Register (&cl_countpendingpl, cl_controlgroup); - Cvar_Register (&cl_indepphysics, cl_controlgroup); + Cvar_Register (&cl_threadedphysics, cl_controlgroup); Cvar_Register (&cl_antibunch, "evil hacks"); Cvar_Register (&hud_tracking_show, "statusbar"); Cvar_Register (&cl_download_mapsrc, cl_controlgroup); @@ -3413,7 +3413,7 @@ float Host_Frame (double time) */ Mod_Think(); //think even on idle (which means small walls and a fast cpu can get more surfaces done. - if ((cl_netfps.value>0 || cls.demoplayback || cl_indepphysics.ival)) + if ((cl_netfps.value>0 || cls.demoplayback || cl_threadedphysics.ival)) { //limit the fps freely, and expect the netfps to cope. maxfpsignoreserver = true; maxfps = cl_maxfps.ival; @@ -3480,7 +3480,7 @@ float Host_Frame (double time) RSpeedRemark(); - CL_UseIndepPhysics(!!cl_indepphysics.ival); + CL_UseIndepPhysics(!!cl_threadedphysics.ival); CL_AllowIndependantSendCmd(false); diff --git a/engine/client/m_items.c b/engine/client/m_items.c index 76fec6477..b86276267 100644 --- a/engine/client/m_items.c +++ b/engine/client/m_items.c @@ -851,8 +851,10 @@ menuedit_t *MC_AddEditCvar_Full(menu_t *menu, int x, int y, char *text, char *na n->caption = (char *)(n+1); strcpy((char *)(n+1), text); n->cvar = cvar; +#ifdef _DEBUG if (!(cvar->flags & CVAR_ARCHIVE)) Con_Printf("Warning: %s is not set for archiving\n", cvar->name); +#endif Q_strncpyz(n->text, cvar->string, sizeof(n->text)); n->common.next = menu->options; @@ -915,13 +917,13 @@ menucheck_t *MC_AddCheckBox(menu_t *menu, int x, int y, const char *text, cvar_t n->var = var; n->bits = bits; - #ifdef _DEBUG +#ifdef _DEBUG if (var) if (!(var->flags & CVAR_ARCHIVE)) Con_Printf("Warning: %s is not set for archiving\n", var->name); else if (var->flags & CVAR_RENDERERLATCH) Con_Printf("Warning: %s requires a vid_restart\n", var->name); - #endif +#endif n->common.next = menu->options; menu->options = (menuoption_t *)n; @@ -2055,10 +2057,10 @@ int MC_AddBulk(struct menu_s *menu, menubulk_t *bulk, int xstart, int xtextend, while (bulk) { - qboolean selectable = true; menuoption_t *control; int x = xtextend; int xleft; + int spacing = 8; if (bulk->text) x -= strlen(bulk->text) * 8; @@ -2074,14 +2076,12 @@ int MC_AddBulk(struct menu_s *menu, menubulk_t *bulk, int xstart, int xtextend, continue; case 0: // white text control = (union menuoption_s *)MC_AddWhiteText(menu, x, y, bulk->text, bulk->rightalign); - selectable = false; break; case 1: // red text control = (union menuoption_s *)MC_AddRedText(menu, x, y, bulk->text, bulk->rightalign); - selectable = false; break; case 2: // spacing - y += bulk->spacing; + spacing = bulk->spacing; break; } break; @@ -2123,7 +2123,7 @@ int MC_AddBulk(struct menu_s *menu, menubulk_t *bulk, int xstart, int xtextend, case 0: y += 4; control = (union menuoption_s *)MC_AddEditCvar(menu, x, y, bulk->text, bulk->cvarname); - y += 4; + spacing += 4; break; case 1: control = (union menuoption_s *)MC_AddEditCvarSlim(menu, x, y, bulk->text, bulk->cvarname); @@ -2138,13 +2138,13 @@ int MC_AddBulk(struct menu_s *menu, menubulk_t *bulk, int xstart, int xtextend, if (bulk->ret) *bulk->ret = control; - if (selectable && !selected) + if (MI_Selectable(control) && !selected) selected = control; if (bulk->tooltip) control->common.tooltip = bulk->tooltip; if (xleft > 0) control->common.extracollide = xleft; - y += 8; + y += spacing; bulk++; } diff --git a/engine/client/r_part.c b/engine/client/r_part.c index 05b00b733..92c9acc8c 100644 --- a/engine/client/r_part.c +++ b/engine/client/r_part.c @@ -160,6 +160,9 @@ void P_InitParticleSystem(void) Cvar_Register(&r_part_contentswitch, particlecvargroupname); Cvar_Register (&gl_part_flame, particlecvargroupname); + + Cvar_Register (&r_rockettrail, particlecvargroupname); + Cvar_Register (&r_grenadetrail, particlecvargroupname); } void P_Shutdown(void)