- wget -nv -O data/maps/stormkeep.waypoints https://gitlab.com/xonotic/xonotic-maps.pk3dir/raw/master/maps/stormkeep.waypoints
- wget -nv -O data/maps/stormkeep.waypoints.cache https://gitlab.com/xonotic/xonotic-maps.pk3dir/raw/master/maps/stormkeep.waypoints.cache
- - EXPECT=81e076663013c894f58976efa6af99c1
+ - EXPECT=b2a88982cfc61339f82bbc9a956dbc30
- HASH=$(${ENGINE} +exec serverbench.cfg
| tee /dev/stderr
| grep '^:'
if (((cantbe != targ) && !mustbe) || (mustbe == targ))
if (targ.takedamage)
{
- // measure distance from nearest point on target (not origin)
- // to nearest point on inflictor (not origin)
+ // calculate distance from nearest point on target to nearest point on inflictor
+ // instead of origin to ensure full damage on impacts
+
vector nearest = targ.WarpZone_findradius_nearest;
+
+ // optimize code by getting inflictororigin_wz from WarpZone_FindRadius calculations instead of
+ //vector inflictororigin_wz = WarpZone_TransformOrigin(targ, inflictororigin);
+
vector inflictororigin_wz = targ.WarpZone_findradius_nearest + targ.WarpZone_findradius_dist;
vector inflictornearest = NearestPointOnBoundingBox(
inflictororigin_wz + inflictor.mins, inflictororigin_wz + inflictor.maxs, nearest);
float a;
float c;
vector hitloc;
- vector myblastorigin;
vector center;
- myblastorigin = WarpZone_TransformOrigin(targ, inflictororigin);
-
// if it's a player, use the view origin as reference
center = CENTER_OR_VIEWOFS(targ);
- force = normalize(center - myblastorigin);
+ force = normalize(center - inflictororigin_wz);
force = force * (finaldmg / max(coredamage, edgedamage)) * forceintensity;
hitloc = nearest;