vec3_t mins, maxs, start, stop;
trace_t trace;
int x, y;
- float mid, bottom;
+ float mid, bottom, stepheight;
VM_SAFEPARMCOUNT(1, VM_CL_checkbottom);
ent = PRVM_G_EDICT(OFS_PARM0);
PRVM_G_FLOAT(OFS_RETURN) = 0;
+ stepheight = sv_stepheight.value + PRVM_clientedictfloat(ent, stepheight_delta);
VectorAdd (PRVM_clientedictvector(ent, origin), PRVM_clientedictvector(ent, mins), mins);
VectorAdd (PRVM_clientedictvector(ent, origin), PRVM_clientedictvector(ent, maxs), maxs);
// the midpoint must be within 16 of the bottom
start[0] = stop[0] = (mins[0] + maxs[0])*0.5;
start[1] = stop[1] = (mins[1] + maxs[1])*0.5;
- stop[2] = start[2] - 2*sv_stepheight.value;
+ stop[2] = start[2] - 2*stepheight;
trace = CL_TraceLine(start, stop, MOVE_NORMAL, ent, CL_GenericHitSuperContentsMask(ent), 0, 0, collision_extendmovelength.value, true, true, NULL, true, false);
if (trace.fraction == 1.0)
if (trace.fraction != 1.0 && trace.endpos[2] > bottom)
bottom = trace.endpos[2];
- if (trace.fraction == 1.0 || mid - trace.endpos[2] > sv_stepheight.value)
+ if (trace.fraction == 1.0 || mid - trace.endpos[2] > stepheight)
return;
}
vec3_t mins, maxs, start, stop;
trace_t trace;
int x, y;
- float mid, bottom;
+ float mid, bottom, stepheight;
+ stepheight = sv_stepheight.value + PRVM_clientedictfloat(ent, stepheight_delta);
VectorAdd (PRVM_clientedictvector(ent, origin), PRVM_clientedictvector(ent, mins), mins);
VectorAdd (PRVM_clientedictvector(ent, origin), PRVM_clientedictvector(ent, maxs), maxs);
// the midpoint must be within 16 of the bottom
start[0] = stop[0] = (mins[0] + maxs[0])*0.5;
start[1] = stop[1] = (mins[1] + maxs[1])*0.5;
- stop[2] = start[2] - 2*sv_stepheight.value;
+ stop[2] = start[2] - 2*stepheight;
trace = CL_TraceLine(start, stop, MOVE_NOMONSTERS, ent, CL_GenericHitSuperContentsMask(ent), 0, 0, collision_extendmovelength.value, true, false, NULL, true, false);
if (trace.fraction == 1.0)
if (trace.fraction != 1.0 && trace.endpos[2] > bottom)
bottom = trace.endpos[2];
- if (trace.fraction == 1.0 || mid - trace.endpos[2] > sv_stepheight.value)
+ if (trace.fraction == 1.0 || mid - trace.endpos[2] > stepheight)
return false;
}
static qboolean CL_movestep (prvm_edict_t *ent, vec3_t move, qboolean relink, qboolean noenemy, qboolean settrace)
{
prvm_prog_t *prog = CLVM_prog;
- float dz;
+ float dz, stepheight;
vec3_t oldorg, neworg, end, traceendpos;
vec3_t mins, maxs, start;
trace_t trace;
int i, svent;
prvm_edict_t *enemy;
+ stepheight = sv_stepheight.value + PRVM_clientedictfloat(ent, stepheight_delta);
+
// try the move
VectorCopy(PRVM_clientedictvector(ent, mins), mins);
VectorCopy(PRVM_clientedictvector(ent, maxs), maxs);
}
// push down from a step height above the wished position
- neworg[2] += sv_stepheight.value;
+ neworg[2] += stepheight;
VectorCopy (neworg, end);
- end[2] -= sv_stepheight.value*2;
+ end[2] -= stepheight*2;
trace = CL_TraceBox(neworg, mins, maxs, end, MOVE_NORMAL, ent, CL_GenericHitSuperContentsMask(ent), 0, 0, collision_extendmovelength.value, true, true, &svent, true);
if (settrace)
if (trace.startsolid)
{
- neworg[2] -= sv_stepheight.value;
+ neworg[2] -= stepheight;
trace = CL_TraceBox(neworg, mins, maxs, end, MOVE_NORMAL, ent, CL_GenericHitSuperContentsMask(ent), 0, 0, collision_extendmovelength.value, true, true, &svent, true);
if (settrace)
CL_VM_SetTraceGlobals(prog, &trace, svent);
VM_CL_V_CalcRefdef, // #640 void(entity e) V_CalcRefdef (DP_CSQC_V_CALCREFDEF)
NULL, // #641
VM_coverage, // #642
+NULL, // #643
+NULL, // #644
+NULL, // #645
+NULL, // #646
+NULL, // #647
+NULL, // #648
+NULL, // #649
+// WRATH range (#650-#???)
+VM_fcopy, // #650 float(string fnfrom, string fnto) fcopy (EXT_WRATH)
+VM_frename, // #651 float (string fnold, string fnnew) frename (EXT_WRATH)
+VM_fremove, // #652 float (string fname) fremove (EXT_WRATH)
+VM_fexists, // #653 float (string fname) fexists (EXT_WRATH)
+VM_rmtree, // #654 float (string path) rmtree (EXT_WRATH)
+NULL, // #655
+NULL, // #656
+NULL, // #657
+NULL, // #658
+NULL, // #659
+NULL, // #660
+NULL, // #661
+NULL, // #662
+NULL, // #663
+NULL, // #664
+NULL, // #665
+NULL, // #666
+NULL, // #667
+NULL, // #668
+NULL, // #669
+NULL, // #670
+NULL, // #671
+NULL, // #672
+NULL, // #673
+NULL, // #674
+NULL, // #675
+NULL, // #676
+NULL, // #677
+NULL, // #678
+NULL, // #679
+NULL, // #680
+NULL, // #681
+NULL, // #682
+NULL, // #683
+NULL, // #684
+NULL, // #685
+NULL, // #686
+NULL, // #687
+NULL, // #688
+NULL, // #689
+NULL, // #690
+NULL, // #691
+NULL, // #692
+NULL, // #693
+NULL, // #694
+NULL, // #695
+NULL, // #696
+NULL, // #697
+NULL, // #698
+NULL, // #699
+NULL, // #700
+NULL, // #701
+NULL, // #702
+NULL, // #703
+NULL, // #704
+NULL, // #705
+NULL, // #706
+NULL, // #707
+NULL, // #708
+NULL, // #709
+NULL, // #710
+NULL, // #711
+NULL, // #712
+NULL, // #713
+NULL, // #714
+NULL, // #715
+NULL, // #716
+NULL, // #717
+NULL, // #718
+NULL, // #719
+NULL, // #720
+NULL, // #721
+NULL, // #722
+NULL, // #723
+NULL, // #724
+NULL, // #725
+NULL, // #726
+NULL, // #727
+NULL, // #728
+NULL, // #729
+NULL, // #730
+NULL, // #731
+NULL, // #732
+NULL, // #733
+NULL, // #734
+NULL, // #735
+NULL, // #736
+NULL, // #737
+NULL, // #738
+NULL, // #739
+NULL, // #740
+NULL, // #741
+NULL, // #742
+NULL, // #743
+NULL, // #744
+NULL, // #745
+NULL, // #746
+NULL, // #747
+NULL, // #748
+NULL, // #749
NULL
};