- wget -O data/maps/stormkeep.waypoints https://gitlab.com/xonotic/xonotic-maps.pk3dir/raw/master/maps/stormkeep.waypoints\r
- wget -O data/maps/stormkeep.waypoints.cache https://gitlab.com/xonotic/xonotic-maps.pk3dir/raw/master/maps/stormkeep.waypoints.cache\r
- make\r
- - EXPECT=695aaf75cbf57edbd43322b281fcb978\r
+ - EXPECT=f48f0950921140f6133c866bcc6e9d79\r
- HASH=$(${ENGINE} -noconfig -nohome +timestamps 1 +exec serverbench.cfg\r
| tee /dev/stderr\r
| sed -e 's,^\[[^]]*\] ,,'\r
this.move_movetype = mt;
if (mt == MOVETYPE_PHYSICS) {
this.move_qcphysics = false;
+ } else if (autocvar_sv_qcphysics == 2) {
+ this.move_qcphysics = true;
}
if(!IL_CONTAINS(g_moveables, this))
IL_PUSH(g_moveables, this); // add it to the moveable entities list (even if it doesn't move!) logic: if an object never sets its movetype, we assume it never does anything notable
if(this.solid == SOLID_NOT)
return;
+ // due to a lack of pointers in QC, we must save the trace values and restore them for other functions
+ bool save_trace_allsolid = trace_allsolid;
+ bool save_trace_startsolid = trace_startsolid;
+ float save_trace_fraction = trace_fraction;
+ bool save_trace_inwater = trace_inwater;
+ bool save_trace_inopen = trace_inopen;
+ vector save_trace_endpos = trace_endpos;
+ vector save_trace_plane_normal = trace_plane_normal;
+ float save_trace_plane_dist = trace_plane_dist;
+ entity save_trace_ent = trace_ent;
+ int save_trace_dpstartcontents = trace_dpstartcontents;
+ int save_trace_dphitcontents = trace_dphitcontents;
+ int save_trace_dphitq3surfaceflags = trace_dphitq3surfaceflags;
+ string save_trace_dphittexturename = trace_dphittexturename;
+
FOREACH_ENTITY_RADIUS_ORDERED(0.5 * (this.absmin + this.absmax), 0.5 * vlen(this.absmax - this.absmin), true, {
if (it.solid == SOLID_TRIGGER && it != this)
if (it.move_nomonsters != MOVE_NOMONSTERS && it.move_nomonsters != MOVE_WORLDONLY)
gettouch(it)(it, this);
}
});
+
+ trace_allsolid = save_trace_allsolid;
+ trace_startsolid = save_trace_startsolid;
+ trace_fraction = save_trace_fraction;
+ trace_inwater = save_trace_inwater;
+ trace_inopen = save_trace_inopen;
+ trace_endpos = save_trace_endpos;
+ trace_plane_normal = save_trace_plane_normal;
+ trace_plane_dist = save_trace_plane_dist;
+ trace_ent = save_trace_ent;
+ trace_dpstartcontents = save_trace_dpstartcontents;
+ trace_dphitcontents = save_trace_dphitcontents;
+ trace_dphitq3surfaceflags = save_trace_dphitq3surfaceflags;
+ trace_dphittexturename = save_trace_dphittexturename;
}
bool autocvar__movetype_debug = false;
BADCVAR("sv_minigames");
BADCVAR("sv_namechangetimer");
BADCVAR("sv_precacheplayermodels");
+ BADCVAR("sv_qcphysics");
BADCVAR("sv_radio");
BADCVAR("sv_stepheight");
BADCVAR("sv_timeout");
}
bool autocvar_sv_gameplayfix_multiplethinksperframe = true;
-void RunThink(entity this)
+void RunThink(entity this, float dt)
{
// don't let things stay in the past.
// it is possible to start that way by a trigger with a local time.
- if(this.nextthink <= 0 || this.nextthink > time + frametime)
+ if(this.nextthink <= 0 || this.nextthink > time + dt)
return;
float oldtime = time; // do we need to save this?
// we don't want to loop in that case, so exit if the new nextthink is
// <= the time the qc was told, also exit if it is past the end of the
// frame
- if(this.nextthink <= time || this.nextthink > oldtime + frametime || !autocvar_sv_gameplayfix_multiplethinksperframe)
+ if(this.nextthink <= time || this.nextthink > oldtime + dt || !autocvar_sv_gameplayfix_multiplethinksperframe)
break;
}
if(it.move_movetype == MOVETYPE_PUSH || it.move_movetype == MOVETYPE_FAKEPUSH)
continue; // these movetypes have no regular think function
// handle thinking here
- if (getthink(it) && it.nextthink > 0 && it.nextthink <= time + frametime)
- RunThink(it);
+ if (getthink(it) && it.nextthink > 0 && it.nextthink <= time + PHYS_INPUT_TIMELENGTH)
+ RunThink(it, PHYS_INPUT_TIMELENGTH);
}
});