mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2024-11-10 07:21:58 +00:00
Disable QC extensions that conflict with the rerelease (only when running progs.dat files from said rerelease).
This commit is contained in:
parent
65aa0920fe
commit
f58cee89e8
5 changed files with 35 additions and 9 deletions
|
@ -7476,7 +7476,17 @@ qboolean PR_Can_Ent_Scale(unsigned int prot, unsigned int pext1, unsigned int pe
|
|||
qboolean PR_CanPrecacheAnyTime(unsigned int prot, unsigned int pext1, unsigned int pext2)
|
||||
{
|
||||
qcvm->precacheanytime = true;
|
||||
return true;
|
||||
return qcvm->precacheanytime;
|
||||
}
|
||||
qboolean PR_CanPushRotate(unsigned int prot, unsigned int pext1, unsigned int pext2)
|
||||
{
|
||||
qcvm->brokenpushrotate = false;
|
||||
return !qcvm->brokenpushrotate;
|
||||
}
|
||||
qboolean PR_Can_EF_Red_Blue(unsigned int prot, unsigned int pext1, unsigned int pext2)
|
||||
{
|
||||
qcvm->brokeneffects = false;
|
||||
return !qcvm->brokeneffects;
|
||||
}
|
||||
static struct
|
||||
{
|
||||
|
@ -7488,8 +7498,8 @@ static struct
|
|||
{"DP_CON_SETA"},
|
||||
{"DP_CSQC_QUERYRENDERENTITY"},
|
||||
{"DP_EF_NOSHADOW"},
|
||||
{"DP_EF_BLUE"},
|
||||
{"DP_EF_RED"},
|
||||
{"DP_EF_BLUE", PR_Can_EF_Red_Blue},
|
||||
{"DP_EF_RED", PR_Can_EF_Red_Blue},
|
||||
{"DP_ENT_ALPHA", PR_Can_Ent_Alpha}, //already in quakespasm, supposedly.
|
||||
{"DP_ENT_COLORMOD", PR_Can_Ent_ColorMod},
|
||||
{"DP_ENT_SCALE", PR_Can_Ent_Scale},
|
||||
|
@ -7543,6 +7553,7 @@ static struct
|
|||
{"DP_SV_POINTSOUND"},
|
||||
{"DP_SV_PRECACHEANYTIME", PR_CanPrecacheAnyTime},
|
||||
{"DP_SV_PRINT"},
|
||||
{"DP_SV_ROTATINGBMODEL", PR_CanPushRotate},
|
||||
{"DP_SV_SETCOLOR"},
|
||||
{"DP_SV_SPAWNFUNC_PREFIX"},
|
||||
{"DP_SV_WRITEUNTERMINATEDSTRING"},
|
||||
|
@ -7887,9 +7898,16 @@ void PR_EnableExtensions(ddef_t *pr_globaldefs)
|
|||
qcvm->numbuiltins = i;
|
||||
if (!pr_checkextension.value && qcvm == &sv.qcvm)
|
||||
{
|
||||
qcvm->brokenpushrotate = true;
|
||||
Con_DPrintf("not enabling qc extensions\n");
|
||||
return;
|
||||
}
|
||||
if (PR_FindExtGlobal(ev_float, "FL_ISBOT"))
|
||||
{
|
||||
qcvm->brokenpushrotate = true;
|
||||
qcvm->brokenbouncemissile = true;
|
||||
qcvm->brokeneffects = true;
|
||||
}
|
||||
|
||||
#define QCEXTFUNC(n,t) qcvm->extfuncs.n = PR_FindExtFunction(#n);
|
||||
QCEXTFUNCS_COMMON
|
||||
|
@ -8319,6 +8337,8 @@ void PR_DumpPlatform_f(void)
|
|||
fprintf(f, "const float EF_MUZZLEFLASH = %i;\n", EF_MUZZLEFLASH);
|
||||
fprintf(f, "const float EF_BRIGHTLIGHT = %i;\n", EF_BRIGHTLIGHT);
|
||||
fprintf(f, "const float EF_DIMLIGHT = %i;\n", EF_DIMLIGHT);
|
||||
fprintf(f, "const float EF_BLUE = %i;\n", EF_BLUE);
|
||||
fprintf(f, "const float EF_RED = %i;\n", EF_RED);
|
||||
fprintf(f, "const float EF_FULLBRIGHT = %i;\n", EF_FULLBRIGHT);
|
||||
fprintf(f, "const float EF_NOSHADOW = %i;\n", EF_NOSHADOW);
|
||||
fprintf(f, "const float EF_NOMODELFLAGS = %i;\n", EF_NOMODELFLAGS);
|
||||
|
|
|
@ -374,7 +374,9 @@ struct qcvm_s
|
|||
qboolean cursorforced;
|
||||
void *cursorhandle; //video code.
|
||||
qboolean nogameaccess; //simplecsqc isn't allowed to poke properties of the actual game (to prevent cheats when there's no restrictions on what it can access)
|
||||
qboolean brokenbouncemissile; //2021 rerelease redefined it, breaking any mod that depends on it.
|
||||
qboolean brokenbouncemissile; //2021 rerelease redefined it, breaking any mod that depends on it.
|
||||
qboolean brokenpushrotate; //2021 rerelease fucks over avelocity on movetype_push.
|
||||
qboolean brokeneffects; //2021 rerelease redefined EF_RED and EF_BLUE.
|
||||
qboolean precacheanytime; //mod queried for support. this is used to spam warnings to anyone that doesn't bother checking for it first. this annoyance is to reduce compat issues.
|
||||
|
||||
//was static inside pr_edict
|
||||
|
|
|
@ -1031,7 +1031,9 @@ sendremove:
|
|||
|
||||
pr_global_struct->self = EDICT_TO_PROG(ed);
|
||||
G_INT(OFS_PARM0) = EDICT_TO_PROG(client->edict);
|
||||
G_FLOAT(OFS_PARM1) = bits & SENDFLAG_USABLE;
|
||||
G_FLOAT(OFS_PARM1+0) = (bits>>0) & 0xffffff;
|
||||
G_FLOAT(OFS_PARM1+1) = (bits>>24) & 0xffffff;
|
||||
G_FLOAT(OFS_PARM1+2) = 0;//(bits>>48) & SENDFLAG_USABLE;
|
||||
PR_ExecuteProgram(GetEdictFieldEval(ed, SendEntity)->function);
|
||||
if (G_FLOAT(OFS_RETURN))
|
||||
{
|
||||
|
@ -1135,6 +1137,8 @@ void SV_BuildEntityState(edict_t *ent, entity_state_t *state)
|
|||
else
|
||||
state->tagindex = 0;
|
||||
state->effects = ent->v.effects;
|
||||
if (qcvm->brokeneffects)
|
||||
state->effects &= ~0xf0u;
|
||||
if ((val = GetEdictFieldValue(ent, qcvm->extfields.modelflags)))
|
||||
state->effects |= ((unsigned int)val->_float)<<24;
|
||||
if (!ent->v.movetype || ent->v.movetype == MOVETYPE_STEP)
|
||||
|
|
|
@ -681,7 +681,7 @@ void SV_PushMove (edict_t *pusher, float movetime)
|
|||
int mark; //johnfitz
|
||||
float solid_backup;
|
||||
|
||||
if ((pusher->v.avelocity[0] || pusher->v.avelocity[1] || pusher->v.avelocity[2]) && pr_checkextension.value)
|
||||
if ((pusher->v.avelocity[0] || pusher->v.avelocity[1] || pusher->v.avelocity[2]) && !qcvm->brokenpushrotate)
|
||||
{ //spike -- added this block for proper rotations
|
||||
mark = Hunk_LowMark ();
|
||||
if (SV_PushMoveAngles (pusher, movetime))
|
||||
|
|
|
@ -439,7 +439,7 @@ void SV_LinkEdict (edict_t *ent, qboolean touch_triggers)
|
|||
return;
|
||||
|
||||
// set the abs box
|
||||
if ((ent->v.solid == SOLID_BSP||ent->v.solid == SOLID_EXT_BSPTRIGGER) && (ent->v.angles[0] || ent->v.angles[1] || ent->v.angles[2]) && pr_checkextension.value)
|
||||
if ((ent->v.solid == SOLID_BSP||ent->v.solid == SOLID_EXT_BSPTRIGGER) && (ent->v.angles[0] || ent->v.angles[1] || ent->v.angles[2]) && !qcvm->brokenpushrotate)
|
||||
{ // expand for rotation the lame way. hopefully there's an origin brush in there.
|
||||
int i;
|
||||
float v1,v2;
|
||||
|
@ -839,7 +839,7 @@ trace_t SV_ClipMoveToEntity (edict_t *ent, vec3_t start, vec3_t mins, vec3_t max
|
|||
VectorSubtract (end, offset, end_l);
|
||||
|
||||
// trace a line through the apropriate clipping hull
|
||||
if ((ent->v.solid == SOLID_BSP || ent->v.solid == SOLID_EXT_BSPTRIGGER) && (ent->v.angles[0]||ent->v.angles[1]||ent->v.angles[2]) && pr_checkextension.value && qcvm->edicts != ent) //don't rotate the world entity's collisions (its not networked, and some maps are buggy, resulting in screwed collisions)
|
||||
if ((ent->v.solid == SOLID_BSP || ent->v.solid == SOLID_EXT_BSPTRIGGER) && (ent->v.angles[0]||ent->v.angles[1]||ent->v.angles[2]) && !qcvm->brokenpushrotate && qcvm->edicts != ent) //don't rotate the world entity's collisions (its not networked, and some maps are buggy, resulting in screwed collisions)
|
||||
{
|
||||
#define DotProductTranspose(v,m,a) ((v)[0]*(m)[0][a] + (v)[1]*(m)[1][a] + (v)[2]*(m)[2][a])
|
||||
vec3_t axis[3], start_r, end_r, tmp;
|
||||
|
@ -1074,7 +1074,7 @@ static void World_ClipToNetwork ( moveclip_t *clip )
|
|||
VectorSubtract (clip->end, offset, end_l);
|
||||
|
||||
// trace a line through the apropriate clipping hull
|
||||
if (touch->netstate.solidsize == ES_SOLID_BSP && (touch->angles[0]||touch->angles[1]||touch->angles[2]) && pr_checkextension.value) //don't rotate the world entity's collisions (its not networked, and some maps are buggy, resulting in screwed collisions)
|
||||
if (touch->netstate.solidsize == ES_SOLID_BSP && (touch->angles[0]||touch->angles[1]||touch->angles[2]) && !qcvm->brokenpushrotate) //don't rotate the world entity's collisions (its not networked, and some maps are buggy, resulting in screwed collisions)
|
||||
{
|
||||
#define DotProductTranspose(v,m,a) ((v)[0]*(m)[0][a] + (v)[1]*(m)[1][a] + (v)[2]*(m)[2][a])
|
||||
vec3_t axis[3], start_r, end_r, tmp;
|
||||
|
|
Loading…
Reference in a new issue