Changed the menu code to always show the old quake menu if forceqmenu is set
(even if it lacks the gfx files).
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6848
d7cf8633-e32d-0410-b094-
e92efae38249
continue;
if (maxs1[0] < mins2[0] || maxs1[1] < mins2[1] || maxs1[2] < mins2[2])
continue;
- PRVM_E_INT(ent,prog->fieldoffsets.chain) = PRVM_NUM_FOR_EDICT(chain);
+ PRVM_GETEDICTFIELDVALUE(ent,prog->fieldoffsets.chain)->edict = PRVM_NUM_FOR_EDICT(chain);
chain = ent;
}
continue;
if (maxs1[0] < mins2[0] || maxs1[1] < mins2[1] || maxs1[2] < mins2[2])
continue;
- PRVM_E_INT(ent,prog->fieldoffsets.chain) = PRVM_NUM_FOR_EDICT(chain);
+ PRVM_GETEDICTFIELDVALUE(ent,prog->fieldoffsets.chain)->edict = PRVM_NUM_FOR_EDICT(chain);
chain = ent;
}
#define TYPE_GAME 2
#define TYPE_BOTH 3
+static cvar_t forceqmenu = { 0, "forceqmenu", "0", "enables the quake menu instead of the quakec menu.dat (if present)" };
+
static int NehGameType;
enum m_state_e m_state;
MAIN_ITEMS = 5;
// check if the game data is missing and use a different main menu if so
- m_missingdata = Draw_CachePic (s, true)->tex == r_texture_notexture;
+ m_missingdata = !forceqmenu.integer && Draw_CachePic (s, true)->tex == r_texture_notexture;
if (m_missingdata)
MAIN_ITEMS = 2;
//============================================================================
// Menu router
-static cvar_t forceqmenu = { 0, "forceqmenu", "0", "enables the quake menu instead of the quakec menu.dat (if present)" };
-
void (*MR_KeyEvent) (int key, char ascii, qboolean downevent);
void (*MR_Draw) (void);
void (*MR_ToggleMenu_f) (void);
// prvm_builtin_mem_t *mem_list;
-// now passes as parameter of PRVM_LoadProgs
+// now passed as parameter of PRVM_LoadProgs
// char **required_func;
// int numrequiredfunc;
if (strcmp(t,s))
continue;
- PRVM_E_INT(ent,prog->fieldoffsets.chain) = PRVM_NUM_FOR_EDICT(chain);
+ PRVM_GETEDICTFIELDVALUE(ent,prog->fieldoffsets.chain)->edict = PRVM_NUM_FOR_EDICT(chain);
chain = ent;
}
if (PRVM_E_FLOAT(ent,f) != s)
continue;
- PRVM_E_INT(ent,prog->fieldoffsets.chain) = PRVM_EDICT_TO_PROG(chain);
+ PRVM_GETEDICTFIELDVALUE(ent,prog->fieldoffsets.chain)->edict = PRVM_EDICT_TO_PROG(chain);
chain = ent;
}
if (!((int)PRVM_E_FLOAT(ent,f) & s))
continue;
- PRVM_E_INT(ent,prog->fieldoffsets.chain) = PRVM_EDICT_TO_PROG(chain);
+ PRVM_GETEDICTFIELDVALUE(ent,prog->fieldoffsets.chain)->edict = PRVM_EDICT_TO_PROG(chain);
chain = ent;
}