Make the various build config defines a little more robust.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@6277 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2022-06-26 08:08:43 +00:00
parent dae4ad6ed6
commit 81ab9277ac
7 changed files with 20 additions and 5 deletions

View file

@ -6867,7 +6867,7 @@ void CL_ArgumentOverrides(void)
//note that this does NOT include commandline.
void CL_ExecInitialConfigs(char *resetcommand)
{
#ifdef QUAKESTATS
#ifndef QUAKETC
int qrc, hrc;
#endif
int def;

View file

@ -1948,6 +1948,7 @@ static void SCR_DrawAutoID(vec3_t org, player_info_t *pl, qboolean isteam)
break;
if (r >= 0 && (scr_autoid_weapon_mask.ival&(1<<1)))
{
#ifdef QUAKEHUD
if (scr_autoid_weapon.ival==1)
{
extern apic_t *sb_weapons[7][8];
@ -1970,6 +1971,7 @@ static void SCR_DrawAutoID(vec3_t org, player_info_t *pl, qboolean isteam)
return;
}
}
#endif
if (h < 8)
{

View file

@ -1107,7 +1107,7 @@ STAT_MOVEVARS_AIRACCEL_SIDEWAYS_FRICTION = 255, // DP
MAX_CL_STATS = 256
};
#ifdef QUAKEHUD
#ifdef QUAKESTATS
//
// item flags
//

View file

@ -371,9 +371,11 @@ pbool PDECL ED_CanFree (edict_t *ed)
static void ASMCALL StateOp (pubprogfuncs_t *prinst, float var, func_t func)
{
stdentvars_t *vars = PROG_TO_EDICT(prinst, pr_global_struct->self)->v;
#ifdef HEXEN2
if (progstype == PROG_H2)
vars->nextthink = pr_global_struct->time+0.05;
else
#endif
vars->nextthink = pr_global_struct->time+0.1;
vars->think = func;
vars->frame = var;
@ -1163,7 +1165,7 @@ void PR_LoadGlabalStruct(qboolean muted)
buttonfields[i].offset = -1;
}
#ifdef HEXEN2
#if defined(HEXEN2) && defined(QUAKESTATS)
/*Hexen2 has lots of extra stats, which I don't want special support for, so list them here and send them as for csqc*/
if (progstype == PROG_H2)
{

View file

@ -153,6 +153,13 @@ typedef struct nqglobalvars_s
#define comfieldfloatdep_legacy comfieldfloatdep
#endif
#ifndef QUAKESTATS
#define comfieldfloat_legacystat(n,desc)
#define comfieldfloatdep_legacystat(n,desc,depreason)
#else
#define comfieldfloat_legacystat comfieldfloat
#define comfieldfloatdep_legacystat comfieldfloatdep
#endif
/*my hands are tied when it comes to the layout of this structure
On the server side, the structure *must* match original quakeworld, or we break compatibility with mvdsv's qvm api
@ -339,8 +346,8 @@ and the extension fields are added on the end and can have extra vm-specific stu
comfieldfloat(SendFlags,"Indicates that something in the entity has been changed, and that it needs to be updated to all players that can see it. The engine will clear it at some point, with the cleared bits appearing in the 'changedflags' argument of the SendEntity method.")/*EXT_CSQC_1 (one of the DP guys came up with it)*/\
comfieldfloatdep_legacy(Version,"Obsolete", "Use SendFlags instead.")/*EXT_CSQC (obsolete)*/\
comfieldfloatdep_legacy(clientcolors,NULL, "Doesn't support RGB player colours.")\
comfieldfloat_legacy(viewzoom,NULL)/*DP_VIEWZOOM, stats*/\
comfieldfloat_legacy(items2,"stub. commented by default, to prevent items2 being networked instead of runes.") /*added in quake 1.09 (for hipnotic). legacy because of stats*/\
comfieldfloat_legacystat(viewzoom,NULL)/*DP_VIEWZOOM, stats*/\
comfieldfloat_legacystat(items2,"stub. commented by default, to prevent items2 being networked instead of runes.") /*added in quake 1.09 (for hipnotic). legacy because of stats*/\
svextqcfieldshexen2 \
comfieldfloat(pvsflags,"Reconfigures when the entity is visible to clients")/*EXT_CSQC_1*/\
comfieldfloat(uniquespawnid,"Incremented by 1 whenever the entity is respawned. Persists across remove calls, for when the two-second grace period is insufficient.")/*FTE_ENT_UNIQUESPAWNID*/\

View file

@ -232,7 +232,9 @@ typedef struct server_s
qboolean gamedirchanged;
#ifdef QUAKESTATS
qboolean haveitems2; //use items2 field instead of serverflags for the high bits of STAT_ITEMS
#endif

View file

@ -2937,11 +2937,13 @@ void SV_WritePlayersToClient (client_t *client, client_frame_t *frame, edict_t *
clst.onground = (int)ent->v->flags & FL_ONGROUND;
clst.solid = ent->v->solid && ent->v->solid != SOLID_CORPSE && ent->v->solid != SOLID_TRIGGER;
#ifdef HEXEN2
if (progstype == PROG_H2 && ((int)vent->v->effects & H2EF_NODRAW))
{
clst.effects = 0;
clst.modelindex = 0;
}
#endif
clst.skin = vent->v->skin;
clst.mins = vent->v->mins;