X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fserver%2Fbot%2Fdefault%2Fwaypoints.qc;h=c8e723260078ef33aab9cd3e818286c5a1048f36;hp=f317918175a11c79c0c078ddbdfbf697cd505eef;hb=d9ddf453dcd3f6e4cce5dbe394fd7936048ea6ad;hpb=9215008d87f1170da32befded6baeb55f3a2cf13 diff --git a/qcsrc/server/bot/default/waypoints.qc b/qcsrc/server/bot/default/waypoints.qc index f317918175..c8e7232600 100644 --- a/qcsrc/server/bot/default/waypoints.qc +++ b/qcsrc/server/bot/default/waypoints.qc @@ -1016,6 +1016,7 @@ void waypoint_save_links() entity link = waypoint_get_link(it, j); if(link) { + // NOTE: vtos rounds vector components to 1 decimal place string s = strcat(vtos(it.origin), "*", vtos(link.origin), "\n"); fputs(file, s); ++c; @@ -1088,6 +1089,7 @@ void waypoint_saveall() continue; string s; + // NOTE: vtos rounds vector components to 1 decimal place s = strcat(vtos(it.origin + it.mins), "\n"); s = strcat(s, vtos(it.origin + it.maxs)); s = strcat(s, "\n"); @@ -1220,11 +1222,12 @@ float waypoint_loadall() vector waypoint_fixorigin_down_dir(vector position, entity tracetest_ent, vector down_dir) { - tracebox(position + '0 0 1', PL_MIN_CONST, PL_MAX_CONST, position + down_dir * 3000, MOVE_NOMONSTERS, tracetest_ent); + vector endpos = position + down_dir * 3000; + tracebox(position + '0 0 1', PL_MIN_CONST, PL_MAX_CONST, endpos, MOVE_NOMONSTERS, tracetest_ent); if(trace_startsolid) - tracebox(position + '0 0 1' * (1 - PL_MIN_CONST.z / 2), PL_MIN_CONST, PL_MAX_CONST, position + down_dir * 3000, MOVE_NOMONSTERS, tracetest_ent); + tracebox(position + '0 0 1' * (1 - PL_MIN_CONST.z / 2), PL_MIN_CONST, PL_MAX_CONST, endpos, MOVE_NOMONSTERS, tracetest_ent); if(trace_startsolid) - tracebox(position + '0 0 1' * (1 - PL_MIN_CONST.z), PL_MIN_CONST, PL_MAX_CONST, position + down_dir * 3000, MOVE_NOMONSTERS, tracetest_ent); + tracebox(position + '0 0 1' * (1 - PL_MIN_CONST.z), PL_MIN_CONST, PL_MAX_CONST, endpos, MOVE_NOMONSTERS, tracetest_ent); if(trace_fraction < 1) position = trace_endpos; return position;