32 it.colormod =
'0.5 0.5 0.5';
39 LOG_INFO(
"Can't find any waypoint nearby\n");
49 LOG_INFO(
"unreachable: ", etos(it),
" ", vtos(it.origin),
"\n");
51 it.effects |= EF_NODEPTHTEST | EF_BLUE;
55 if (j)
LOG_INFOF(
"%d waypoints cannot be reached from here in any way (marked with blue light)\n", j);
61 LOG_INFO(
"cannot reach me: ", etos(it),
" ", vtos(it.origin),
"\n");
63 if (!(it.effects & EF_NODEPTHTEST))
65 it.effects |= EF_NODEPTHTEST | EF_RED;
68 if (j)
LOG_INFOF(
"%d waypoints cannot walk to here in any way (marked with red light)\n", j);
69 if (m)
LOG_INFOF(
"%d waypoints have been marked total\n", m);
76 if(it.spawnpointmodel)
78 delete(it.spawnpointmodel);
79 it.spawnpointmodel = NULL;
84 if(!it.spawnpointmodel)
86 tracebox(it.origin, PL_MIN_CONST, PL_MAX_CONST, it.origin -
'0 0 512', MOVE_NOMONSTERS, NULL);
87 entity e = new(spawnpointmodel);
88 vector org = trace_endpos + eZ;
90 e.solid = SOLID_TRIGGER;
91 it.spawnpointmodel = e;
95 _setmodel(it.spawnpointmodel, pl.model);
96 it.spawnpointmodel.frame = ANIM_idle.m_id;
97 it.spawnpointmodel.skin = pl.skin;
98 it.spawnpointmodel.colormap = 1024 + 68;
99 it.spawnpointmodel.glowmod =
'1 0 0';
100 it.spawnpointmodel.angles = it.angles;
101 setsize(it.spawnpointmodel, PL_MIN_CONST, PL_MAX_CONST);
105 if (j)
LOG_INFOF(
"%d spawnpoints have no nearest waypoint (marked by player model)\n", j);
111 it.colormod =
'0.5 0.5 0.5';
122 if (j)
LOG_INFOF(
"%d items have no nearest waypoint and cannot be walked away from (marked with red light)\n", j);
134 if (j)
LOG_INFOF(
"%d items have no nearest waypoint and cannot be walked to (marked with blue light)\n", j);
141 vector mid = (v1 + v2) / 2;
143 float diffy = (v2.y - v1.y);
144 float diffx = (v2.x - v1.x);
149 float m = - diffx / diffy;
150 float q = - m * mid.x + mid.y;
151 if (
fabs(m) <= 0.000001) m = 0;
152 if (
fabs(q) <= 0.000001) q = 0;
156 cvar_set(
"g_waypointeditor_symmetrical_axis", axis_str);
157 axis_str =
strcat(
"\"", axis_str,
"\"");
158 sprint(caller,
strcat(
"Axis of symmetry based on input points: ", axis_str,
"\n"));
160 sprint(caller, sprintf(
" ^3saved to %s\n",
"g_waypointeditor_symmetrical_axis"));
163 cvar_set(
"g_waypointeditor_symmetrical",
"-2");
164 sprint(caller,
strcat(
"g_waypointeditor_symmetrical",
" has been set to ",
165 cvar_string(
"g_waypointeditor_symmetrical"),
"\n"));
173 for (
int i = 0; i < 6; i++)
175 if (
argv(arg_idx + i) !=
"")
182 if (
argv(arg_idx) !=
"")
183 sprint(caller,
"WARNING: Ignoring single input point\n");
186 sprint(caller,
"Origin of symmetry can't be automatically determined\n");
192 vector v1, v2, v3, v4, v5, v6;
193 for (
int i = 1; i <= ctf_flags; i++)
195 if (i == 1) { v1 =
stov(
argv(arg_idx++)); org = v1 / ctf_flags; }
196 else if (i == 2) { v2 =
stov(
argv(arg_idx++)); org += v2 / ctf_flags; }
197 else if (i == 3) { v3 =
stov(
argv(arg_idx++)); org += v3 / ctf_flags; }
198 else if (i == 4) { v4 =
stov(
argv(arg_idx++)); org += v4 / ctf_flags; }
199 else if (i == 5) { v5 =
stov(
argv(arg_idx++)); org += v5 / ctf_flags; }
200 else if (i == 6) { v6 =
stov(
argv(arg_idx++)); org += v6 / ctf_flags; }
204 if (
fabs(org.x) <= 0.000001) org.x = 0;
205 if (
fabs(org.y) <= 0.000001) org.y = 0;
209 cvar_set(
"g_waypointeditor_symmetrical_origin", org_str);
210 cvar_set(
"g_waypointeditor_symmetrical_order",
ftos(ctf_flags));
212 org_str =
strcat(
"\"", org_str,
"\"");
215 sprint(caller,
strcat(
"Origin of symmetry based on flag positions: ", org_str,
"\n"));
217 sprint(caller,
strcat(
"Origin of symmetry based on input points: ", org_str,
"\n"));
219 sprint(caller, sprintf(
" ^3saved to %s\n",
"g_waypointeditor_symmetrical_origin"));
222 sprint(caller,
"Order of symmetry: 0 (autodetected)\n");
226 sprint(caller, sprintf(
" ^3saved to %s\n",
"g_waypointeditor_symmetrical_order"));
231 cvar_set(
"g_waypointeditor_symmetrical",
"0");
233 cvar_set(
"g_waypointeditor_symmetrical",
"-1");
234 sprint(caller,
strcat(
"g_waypointeditor_symmetrical",
" has been set to ",
235 cvar_string(
"g_waypointeditor_symmetrical"),
"\n"));
248 new_org =
Rotate(org - map_center, 360 *
DEG2RAD / ctf_flags) + map_center;
260 new_org.x = (1 / (1 + m*m)) * ((1 - m*m) * org.x + 2 * m * org.y - 2 * m * q);
261 new_org.y = (1 / (1 + m*m)) * (2 * m * org.x + (m*m - 1) * org.y + 2 * q);
278 return (wp.wphw00 !=
NULL);
283 if (!(wp_from && wp_to))
286 if (!wp_from.wphw00)
return false;
else if (wp_from.wphw00 == wp_to)
return true;
287 if (!wp_from.wphw01)
return false;
else if (wp_from.wphw01 == wp_to)
return true;
288 if (!wp_from.wphw02)
return false;
else if (wp_from.wphw02 == wp_to)
return true;
289 if (!wp_from.wphw03)
return false;
else if (wp_from.wphw03 == wp_to)
return true;
290 if (!wp_from.wphw04)
return false;
else if (wp_from.wphw04 == wp_to)
return true;
291 if (!wp_from.wphw05)
return false;
else if (wp_from.wphw05 == wp_to)
return true;
292 if (!wp_from.wphw06)
return false;
else if (wp_from.wphw06 == wp_to)
return true;
293 if (!wp_from.wphw07)
return false;
else if (wp_from.wphw07 == wp_to)
return true;
301 if (!(wp_from && wp_to))
304 if (!wp_from.wphw00 || wp_from.wphw00 == wp_to) { wp_from.wphw00 = wp_to;
waypoint_setupmodel(wp_from);
return; }
305 if (!wp_from.wphw01 || wp_from.wphw01 == wp_to) { wp_from.wphw01 = wp_to;
return; }
306 if (!wp_from.wphw02 || wp_from.wphw02 == wp_to) { wp_from.wphw02 = wp_to;
return; }
307 if (!wp_from.wphw03 || wp_from.wphw03 == wp_to) { wp_from.wphw03 = wp_to;
return; }
308 if (!wp_from.wphw04 || wp_from.wphw04 == wp_to) { wp_from.wphw04 = wp_to;
return; }
309 if (!wp_from.wphw05 || wp_from.wphw05 == wp_to) { wp_from.wphw05 = wp_to;
return; }
310 if (!wp_from.wphw06 || wp_from.wphw06 == wp_to) { wp_from.wphw06 = wp_to;
return; }
311 if (!wp_from.wphw07 || wp_from.wphw07 == wp_to) { wp_from.wphw07 = wp_to;
return; }
318 if (!(wp_from && wp_to))
322 if (removed < 0 && wp_from.wphw00 == wp_to) removed = 0;
323 if (removed < 0 && wp_from.wphw01 == wp_to) removed = 1;
324 if (removed < 0 && wp_from.wphw02 == wp_to) removed = 2;
325 if (removed < 0 && wp_from.wphw03 == wp_to) removed = 3;
326 if (removed < 0 && wp_from.wphw04 == wp_to) removed = 4;
327 if (removed < 0 && wp_from.wphw05 == wp_to) removed = 5;
328 if (removed < 0 && wp_from.wphw06 == wp_to) removed = 6;
329 if (removed < 0 && wp_from.wphw07 == wp_to) removed = 7;
333 if (removed <= 0) wp_from.wphw00 = wp_from.wphw01;
334 if (removed <= 1) wp_from.wphw01 = wp_from.wphw02;
335 if (removed <= 2) wp_from.wphw02 = wp_from.wphw03;
336 if (removed <= 3) wp_from.wphw03 = wp_from.wphw04;
337 if (removed <= 4) wp_from.wphw04 = wp_from.wphw05;
338 if (removed <= 5) wp_from.wphw05 = wp_from.wphw06;
339 if (removed <= 6) wp_from.wphw06 = wp_from.wphw07;
340 if (removed <= 7) wp_from.wphw07 =
NULL;
371 wp.colormod =
'1 0 0';
373 wp.colormod =
'1 1 0';
375 wp.colormod =
'0 1 0';
377 wp.colormod =
'1 0.5 0';
379 wp.colormod =
'1 0.5 0';
381 wp.colormod =
'1 0.5 0';
383 wp.colormod =
'1 0.5 0';
385 wp.colormod =
'0 1 1';
387 wp.colormod =
'0.5 0 1';
389 wp.colormod =
'1 1 1';
405 if (!wp.wpisbox)
return "^3Warpzone waypoint";
410 { return
"^3Jumppad waypoint"; });
411 return "^3Teleport waypoint";
455 w.createdtime =
time;
456 w.origin = (m1 + m2) * 0.5;
461 setsize(w, m1 - w.origin, m2 - w.origin);
468 setsize(w, PL_CROUCH_MIN_CONST -
'1 1 0', PL_CROUCH_MAX_CONST +
'1 1 0');
470 setsize(w, PL_MIN_CONST -
'1 1 0', PL_MAX_CONST +
'1 1 0');
473 if(!(f & WAYPOINTFLAG_GENERATED))
475 LOG_TRACE(
"Killed a waypoint that was stuck in solid at ",
vtos(w.origin));
483 LOG_INFO(
"A generated waypoint is stuck in solid at ",
vtos(w.origin));
488 setsize(w,
'0 0 0',
'0 0 0');
512 wp_from.wp00 = wp_to;
513 wp_from.wp00mincost = cost;
514 jp.nearestwaypoint = wp_from;
515 jp.nearestwaypointtimeout = -1;
531 LOG_INFO(
"^xf80Start waypoint has been cleared.\n");
536 entity wp = pl.nearestwaypoint;
544 err =
"can't hardwire while in the process of creating a special link";
548 err =
"couldn't find any waypoint at crosshair";
550 err =
"couldn't find any waypoint nearby";
553 err =
"can't hardwire a waypoint with special links";
561 LOG_INFOF(
"^x80fWaypoint %s marked as hardwired link origin.\n",
vtos(wp.origin));
574 LOG_INFOF(
"^1Editing waypoints with a higher version number (%f) is not allowed.\n" 586 org.z -= PL_MIN_CONST.z;
598 is_support_wp =
true;
601 if (jp || is_jump_wp || is_support_wp)
605 LOG_INFO(
"^xf80Spawning start waypoint...\n");
612 if (sym && ctf_flags < 2)
614 int wp_num = ctf_flags;
621 vector item_org = (it.absmin + it.absmax) * 0.5;
622 item_org.z = it.absmin.z - PL_MIN_CONST.z;
623 if (
vlen(item_org - org) < 20)
631 vector start_org =
'0 0 0';
635 LOG_INFO(
"^xf80Spawning destination waypoint...\n");
640 vector initial_origin =
'0 0 0';
641 bool initial_origin_is_set =
false;
649 &&
boxesoverlap(org + PL_MIN_CONST, org + PL_MAX_CONST, it.absmin, it.absmax),
658 else if (is_jump_wp || is_support_wp)
663 if (wp_found && !(wp_found.wpflags & type_flag))
665 LOG_INFOF(
"Error: can't spawn a %s waypoint over an existent waypoint of a different type\n", (is_jump_wp) ?
"Jump" :
"Support");
676 LOG_INFOF(
"Couldn't spawn waypoint at %v\n", org);
682 if (!initial_origin_is_set)
684 initial_origin = e.origin;
685 initial_origin_is_set =
true;
692 &&
boxesoverlap(start_org, start_org, it.absmin, it.absmax),
694 start_wp = it; break;
699 LOG_INFOF(
"Couldn't find start waypoint at %v\n", start_org);
710 LOG_INFOF(
"^x80fRemoved hardwired link %s.\n", s);
714 if (e.createdtime ==
time)
716 LOG_INFO(
"Error: hardwired links can be created only between 2 existing (and unconnected) waypoints.\n");
724 LOG_INFO(
"Error: start and destination waypoints coincide.\n");
730 LOG_INFO(
"Error: waypoints are already linked.\n");
737 LOG_INFOF(
"^x80fAdded hardwired link %s.\n", s);
746 LOG_INFOF(
"Waypoint %v has already a support waypoint, delete it first.\n", e.origin);
775 if (start_wp.wp00_original == start_wp.wp00)
794 if (
vdist(org - pl.origin, >, 32))
803 if (jp || is_jump_wp || is_support_wp)
825 if (it.SUPPORT_WP == wp)
827 it.SUPPORT_WP = NULL;
828 waypoint_schedulerelink(it);
844 LOG_INFOF(
"^1Editing waypoints with a higher version number (%f) is not allowed.\n" 856 if (sym && ctf_flags < 2)
858 int wp_num = ctf_flags;
872 LOG_INFO(
"Can't remove a waypoint with hardwired links, remove links with \"wpeditor hardwire\" first\n");
881 if(vdist(org - it.origin, <, 3))
890 te_explosion(e.origin);
912 entity fromwp31_prev = from.wp31;
917 case 0: from.wp00 = from.wp01; from.wp00mincost = from.wp01mincost;
918 case 1: from.wp01 = from.wp02; from.wp01mincost = from.wp02mincost;
919 case 2: from.wp02 = from.wp03; from.wp02mincost = from.wp03mincost;
920 case 3: from.wp03 = from.wp04; from.wp03mincost = from.wp04mincost;
921 case 4: from.wp04 = from.wp05; from.wp04mincost = from.wp05mincost;
922 case 5: from.wp05 = from.wp06; from.wp05mincost = from.wp06mincost;
923 case 6: from.wp06 = from.wp07; from.wp06mincost = from.wp07mincost;
924 case 7: from.wp07 = from.wp08; from.wp07mincost = from.wp08mincost;
925 case 8: from.wp08 = from.wp09; from.wp08mincost = from.wp09mincost;
926 case 9: from.wp09 = from.wp10; from.wp09mincost = from.wp10mincost;
927 case 10: from.wp10 = from.wp11; from.wp10mincost = from.wp11mincost;
928 case 11: from.wp11 = from.wp12; from.wp11mincost = from.wp12mincost;
929 case 12: from.wp12 = from.wp13; from.wp12mincost = from.wp13mincost;
930 case 13: from.wp13 = from.wp14; from.wp13mincost = from.wp14mincost;
931 case 14: from.wp14 = from.wp15; from.wp14mincost = from.wp15mincost;
932 case 15: from.wp15 = from.wp16; from.wp15mincost = from.wp16mincost;
933 case 16: from.wp16 = from.wp17; from.wp16mincost = from.wp17mincost;
934 case 17: from.wp17 = from.wp18; from.wp17mincost = from.wp18mincost;
935 case 18: from.wp18 = from.wp19; from.wp18mincost = from.wp19mincost;
936 case 19: from.wp19 = from.wp20; from.wp19mincost = from.wp20mincost;
937 case 20: from.wp20 = from.wp21; from.wp20mincost = from.wp21mincost;
938 case 21: from.wp21 = from.wp22; from.wp21mincost = from.wp22mincost;
939 case 22: from.wp22 = from.wp23; from.wp22mincost = from.wp23mincost;
940 case 23: from.wp23 = from.wp24; from.wp23mincost = from.wp24mincost;
941 case 24: from.wp24 = from.wp25; from.wp24mincost = from.wp25mincost;
942 case 25: from.wp25 = from.wp26; from.wp25mincost = from.wp26mincost;
943 case 26: from.wp26 = from.wp27; from.wp26mincost = from.wp27mincost;
944 case 27: from.wp27 = from.wp28; from.wp27mincost = from.wp28mincost;
945 case 28: from.wp28 = from.wp29; from.wp28mincost = from.wp29mincost;
946 case 29: from.wp29 = from.wp30; from.wp29mincost = from.wp30mincost;
947 case 30: from.wp30 = from.wp31; from.wp30mincost = from.wp31mincost;
948 case 31: from.wp31 =
NULL; from.wp31mincost = 10000000;
951 if (fromwp31_prev && !from.wp31)
957 if (from.wp00 == to)
return 0;
if (from.wp01 == to)
return 1;
if (from.wp02 == to)
return 2;
if (from.wp03 == to)
return 3;
958 if (from.wp04 == to)
return 4;
if (from.wp05 == to)
return 5;
if (from.wp06 == to)
return 6;
if (from.wp07 == to)
return 7;
959 if (from.wp08 == to)
return 8;
if (from.wp09 == to)
return 9;
if (from.wp10 == to)
return 10;
if (from.wp11 == to)
return 11;
960 if (from.wp12 == to)
return 12;
if (from.wp13 == to)
return 13;
if (from.wp14 == to)
return 14;
if (from.wp15 == to)
return 15;
961 if (from.wp16 == to)
return 16;
if (from.wp17 == to)
return 17;
if (from.wp18 == to)
return 18;
if (from.wp19 == to)
return 19;
962 if (from.wp20 == to)
return 20;
if (from.wp21 == to)
return 21;
if (from.wp22 == to)
return 22;
if (from.wp23 == to)
return 23;
963 if (from.wp24 == to)
return 24;
if (from.wp25 == to)
return 25;
if (from.wp26 == to)
return 26;
if (from.wp27 == to)
return 27;
964 if (from.wp28 == to)
return 28;
if (from.wp29 == to)
return 29;
if (from.wp30 == to)
return 30;
if (from.wp31 == to)
return 31;
977 if(it.wp00) it.wp00mincost = waypoint_getlinkcost(it, it.wp00);
978 if(it.wp01) it.wp01mincost = waypoint_getlinkcost(it, it.wp01);
979 if(it.wp02) it.wp02mincost = waypoint_getlinkcost(it, it.wp02);
980 if(it.wp03) it.wp03mincost = waypoint_getlinkcost(it, it.wp03);
981 if(it.wp04) it.wp04mincost = waypoint_getlinkcost(it, it.wp04);
982 if(it.wp05) it.wp05mincost = waypoint_getlinkcost(it, it.wp05);
983 if(it.wp06) it.wp06mincost = waypoint_getlinkcost(it, it.wp06);
984 if(it.wp07) it.wp07mincost = waypoint_getlinkcost(it, it.wp07);
985 if(it.wp08) it.wp08mincost = waypoint_getlinkcost(it, it.wp08);
986 if(it.wp09) it.wp09mincost = waypoint_getlinkcost(it, it.wp09);
987 if(it.wp10) it.wp10mincost = waypoint_getlinkcost(it, it.wp10);
988 if(it.wp11) it.wp11mincost = waypoint_getlinkcost(it, it.wp11);
989 if(it.wp12) it.wp12mincost = waypoint_getlinkcost(it, it.wp12);
990 if(it.wp13) it.wp13mincost = waypoint_getlinkcost(it, it.wp13);
991 if(it.wp14) it.wp14mincost = waypoint_getlinkcost(it, it.wp14);
992 if(it.wp15) it.wp15mincost = waypoint_getlinkcost(it, it.wp15);
993 if(it.wp16) it.wp16mincost = waypoint_getlinkcost(it, it.wp16);
994 if(it.wp17) it.wp17mincost = waypoint_getlinkcost(it, it.wp17);
995 if(it.wp18) it.wp18mincost = waypoint_getlinkcost(it, it.wp18);
996 if(it.wp19) it.wp19mincost = waypoint_getlinkcost(it, it.wp19);
997 if(it.wp20) it.wp20mincost = waypoint_getlinkcost(it, it.wp20);
998 if(it.wp21) it.wp21mincost = waypoint_getlinkcost(it, it.wp21);
999 if(it.wp22) it.wp22mincost = waypoint_getlinkcost(it, it.wp22);
1000 if(it.wp23) it.wp23mincost = waypoint_getlinkcost(it, it.wp23);
1001 if(it.wp24) it.wp24mincost = waypoint_getlinkcost(it, it.wp24);
1002 if(it.wp25) it.wp25mincost = waypoint_getlinkcost(it, it.wp25);
1003 if(it.wp26) it.wp26mincost = waypoint_getlinkcost(it, it.wp26);
1004 if(it.wp27) it.wp27mincost = waypoint_getlinkcost(it, it.wp27);
1005 if(it.wp28) it.wp28mincost = waypoint_getlinkcost(it, it.wp28);
1006 if(it.wp29) it.wp29mincost = waypoint_getlinkcost(it, it.wp29);
1007 if(it.wp30) it.wp30mincost = waypoint_getlinkcost(it, it.wp30);
1008 if(it.wp31) it.wp31mincost = waypoint_getlinkcost(it, it.wp31);
1015 return dist / (autocvar_sv_maxspeed * 1.25);
1016 return dist / autocvar_sv_maxspeed;
1022 return dist / (autocvar_sv_maxspeed * 0.7);
1027 return dist / (autocvar_sv_maxspeed * 0.5);
1035 if (submerged_from && submerged_to)
1043 float height = from.z - to.z;
1050 height_cost =
sqrt(height / (autocvar_sv_gravity / 2));
1057 if (submerged_from || submerged_to)
1073 vector m1 = from.absmin, m2 = from.absmax;
1074 v1.x =
bound(m1.x, v2.x, m2.x);
1075 v1.y =
bound(m1.y, v2.y, m2.y);
1076 v1.z =
bound(m1.z, v2.z, m2.z);
1080 vector m1 = to.absmin, m2 = to.absmax;
1081 v2.x =
bound(m1.x, v1.x, m2.x);
1082 v2.y =
bound(m1.y, v1.y, m2.y);
1083 v2.z =
bound(m1.z, v1.z, m2.z);
1100 if (from.wp31mincost < c)
return;
1101 if (from.wp30mincost < c) {from.wp31 =
to;from.wp31mincost = c;
return;} from.wp31 = from.wp30;from.wp31mincost = from.wp30mincost;
1102 if (from.wp29mincost < c) {from.wp30 =
to;from.wp30mincost = c;
return;} from.wp30 = from.wp29;from.wp30mincost = from.wp29mincost;
1103 if (from.wp28mincost < c) {from.wp29 =
to;from.wp29mincost = c;
return;} from.wp29 = from.wp28;from.wp29mincost = from.wp28mincost;
1104 if (from.wp27mincost < c) {from.wp28 =
to;from.wp28mincost = c;
return;} from.wp28 = from.wp27;from.wp28mincost = from.wp27mincost;
1105 if (from.wp26mincost < c) {from.wp27 =
to;from.wp27mincost = c;
return;} from.wp27 = from.wp26;from.wp27mincost = from.wp26mincost;
1106 if (from.wp25mincost < c) {from.wp26 =
to;from.wp26mincost = c;
return;} from.wp26 = from.wp25;from.wp26mincost = from.wp25mincost;
1107 if (from.wp24mincost < c) {from.wp25 =
to;from.wp25mincost = c;
return;} from.wp25 = from.wp24;from.wp25mincost = from.wp24mincost;
1108 if (from.wp23mincost < c) {from.wp24 =
to;from.wp24mincost = c;
return;} from.wp24 = from.wp23;from.wp24mincost = from.wp23mincost;
1109 if (from.wp22mincost < c) {from.wp23 =
to;from.wp23mincost = c;
return;} from.wp23 = from.wp22;from.wp23mincost = from.wp22mincost;
1110 if (from.wp21mincost < c) {from.wp22 =
to;from.wp22mincost = c;
return;} from.wp22 = from.wp21;from.wp22mincost = from.wp21mincost;
1111 if (from.wp20mincost < c) {from.wp21 =
to;from.wp21mincost = c;
return;} from.wp21 = from.wp20;from.wp21mincost = from.wp20mincost;
1112 if (from.wp19mincost < c) {from.wp20 =
to;from.wp20mincost = c;
return;} from.wp20 = from.wp19;from.wp20mincost = from.wp19mincost;
1113 if (from.wp18mincost < c) {from.wp19 =
to;from.wp19mincost = c;
return;} from.wp19 = from.wp18;from.wp19mincost = from.wp18mincost;
1114 if (from.wp17mincost < c) {from.wp18 =
to;from.wp18mincost = c;
return;} from.wp18 = from.wp17;from.wp18mincost = from.wp17mincost;
1115 if (from.wp16mincost < c) {from.wp17 =
to;from.wp17mincost = c;
return;} from.wp17 = from.wp16;from.wp17mincost = from.wp16mincost;
1116 if (from.wp15mincost < c) {from.wp16 =
to;from.wp16mincost = c;
return;} from.wp16 = from.wp15;from.wp16mincost = from.wp15mincost;
1117 if (from.wp14mincost < c) {from.wp15 =
to;from.wp15mincost = c;
return;} from.wp15 = from.wp14;from.wp15mincost = from.wp14mincost;
1118 if (from.wp13mincost < c) {from.wp14 =
to;from.wp14mincost = c;
return;} from.wp14 = from.wp13;from.wp14mincost = from.wp13mincost;
1119 if (from.wp12mincost < c) {from.wp13 =
to;from.wp13mincost = c;
return;} from.wp13 = from.wp12;from.wp13mincost = from.wp12mincost;
1120 if (from.wp11mincost < c) {from.wp12 =
to;from.wp12mincost = c;
return;} from.wp12 = from.wp11;from.wp12mincost = from.wp11mincost;
1121 if (from.wp10mincost < c) {from.wp11 =
to;from.wp11mincost = c;
return;} from.wp11 = from.wp10;from.wp11mincost = from.wp10mincost;
1122 if (from.wp09mincost < c) {from.wp10 =
to;from.wp10mincost = c;
return;} from.wp10 = from.wp09;from.wp10mincost = from.wp09mincost;
1123 if (from.wp08mincost < c) {from.wp09 =
to;from.wp09mincost = c;
return;} from.wp09 = from.wp08;from.wp09mincost = from.wp08mincost;
1124 if (from.wp07mincost < c) {from.wp08 =
to;from.wp08mincost = c;
return;} from.wp08 = from.wp07;from.wp08mincost = from.wp07mincost;
1125 if (from.wp06mincost < c) {from.wp07 =
to;from.wp07mincost = c;
return;} from.wp07 = from.wp06;from.wp07mincost = from.wp06mincost;
1126 if (from.wp05mincost < c) {from.wp06 =
to;from.wp06mincost = c;
return;} from.wp06 = from.wp05;from.wp06mincost = from.wp05mincost;
1127 if (from.wp04mincost < c) {from.wp05 =
to;from.wp05mincost = c;
return;} from.wp05 = from.wp04;from.wp05mincost = from.wp04mincost;
1128 if (from.wp03mincost < c) {from.wp04 =
to;from.wp04mincost = c;
return;} from.wp04 = from.wp03;from.wp04mincost = from.wp03mincost;
1129 if (from.wp02mincost < c) {from.wp03 =
to;from.wp03mincost = c;
return;} from.wp03 = from.wp02;from.wp03mincost = from.wp02mincost;
1130 if (from.wp01mincost < c) {from.wp02 =
to;from.wp02mincost = c;
return;} from.wp02 = from.wp01;from.wp02mincost = from.wp01mincost;
1131 if (from.wp00mincost < c) {from.wp01 =
to;from.wp01mincost = c;
return;} from.wp01 = from.wp00;from.wp01mincost = from.wp00mincost;
1132 from.wp00 =
to;from.wp00mincost = c;
return;
1143 to.SUPPORT_WP = from;
1151 vector sv =
'0 0 0', sv2 =
'0 0 0', ev =
'0 0 0', ev2 =
'0 0 0', dv;
1152 float sv2_height = 0, ev2_height = 0;
1166 if (!(this.wpflags & WPFLAGMASK_NORELINK))
1167 waypoint_addlink(this, it);
1168 if (!(it.wpflags & WPFLAGMASK_NORELINK))
1169 waypoint_addlink(it, this);
1174 if(!checkpvs(this.origin, it))
1190 vector m1 = PL_MIN_CONST;
1191 vector m2 = PL_MAX_CONST;
1195 m1 = PL_CROUCH_MIN_CONST;
1196 m2 = PL_CROUCH_MAX_CONST;
1200 if (!((this.wpflags & WAYPOINTFLAG_CROUCH) && (it.wpflags & WAYPOINTFLAG_CROUCH)))
1217 relink_walkculled += 0.5;
1221 if (tracewalk(this, sv, m1, m2, ev2, ev2_height, MOVE_NOMONSTERS))
1222 waypoint_addlink(this, it);
1224 relink_walkculled += 0.5;
1231 relink_walkculled += 0.5;
1235 if (tracewalk(this, ev, m1, m2, sv2, sv2_height, MOVE_NOMONSTERS))
1236 waypoint_addlink(it, this);
1238 relink_walkculled += 0.5;
1259 wp.wp00 = wp.wp01 = wp.wp02 = wp.wp03 = wp.wp04 = wp.wp05 = wp.wp06 = wp.wp07 =
NULL;
1260 wp.wp08 = wp.wp09 = wp.wp10 = wp.wp11 = wp.wp12 = wp.wp13 = wp.wp14 = wp.wp15 =
NULL;
1261 wp.wp16 = wp.wp17 = wp.wp18 = wp.wp19 = wp.wp20 = wp.wp21 = wp.wp22 = wp.wp23 =
NULL;
1262 wp.wp24 = wp.wp25 = wp.wp26 = wp.wp27 = wp.wp28 = wp.wp29 = wp.wp30 = wp.wp31 =
NULL;
1264 wp.wp00mincost = wp.wp01mincost = wp.wp02mincost = wp.wp03mincost = wp.wp04mincost = wp.wp05mincost = wp.wp06mincost = wp.wp07mincost = f;
1265 wp.wp08mincost = wp.wp09mincost = wp.wp10mincost = wp.wp11mincost = wp.wp12mincost = wp.wp13mincost = wp.wp14mincost = wp.wp15mincost = f;
1266 wp.wp16mincost = wp.wp17mincost = wp.wp18mincost = wp.wp19mincost = wp.wp20mincost = wp.wp21mincost = wp.wp22mincost = wp.wp23mincost = f;
1267 wp.wp24mincost = wp.wp25mincost = wp.wp26mincost = wp.wp27mincost = wp.wp28mincost = wp.wp29mincost = wp.wp30mincost = wp.wp31mincost = f;
1271 wp.wplinked =
false;
1281 wp.wpisbox =
vdist(wp.size, >, 0);
1289 wp.nextthink =
time;
1319 #define GET_GAMETYPE_EXTENSION() ((g_race) ? ".race" : "") 1325 float file, tokens, c = 0, found;
1327 vector wp_to_pos, wp_from_pos;
1331 string filename = sprintf(
"maps/%s.waypoints.cache",
strcat(
mapname, gt_ext));
1334 if (gt_ext !=
"" && file < 0)
1337 filename = sprintf(
"maps/%s.waypoints.cache",
mapname);
1343 LOG_TRACE(
"waypoint links load from ", filename,
" failed");
1348 bool parse_comments =
true;
1352 while ((s =
fgets(file)))
1358 if(
substring(s, 2, 17) ==
"WAYPOINT_VERSION ")
1360 else if(
substring(s, 2, 14) ==
"WAYPOINT_TIME ")
1369 LOG_TRACE(
"waypoint links for this map are not made for these waypoints.");
1371 LOG_TRACE(
"waypoint links for this map are outdated.");
1374 LOG_TRACE(
"Assault waypoint links need to be manually updated in the editor");
1384 parse_comments =
false;
1402 if(!wp_from || wp_from.origin!=wp_from_pos)
1404 wp_from = findradius(wp_from_pos, 1);
1408 if(
vdist(wp_from.origin - wp_from_pos, <, 1))
1409 if(wp_from.classname ==
"waypoint")
1414 wp_from = wp_from.chain;
1419 LOG_TRACE(
"waypoint_load_links: couldn't find 'from' waypoint at ",
vtos(wp_from_pos));
1425 wp_to = findradius(wp_to_pos, 1);
1429 if(
vdist(wp_to.origin - wp_to_pos, <, 1))
1430 if(wp_to.classname ==
"waypoint")
1435 wp_to = wp_to.chain;
1440 LOG_TRACE(
"waypoint_load_links: couldn't find 'to' waypoint at ",
vtos(wp_to_pos));
1446 if (wp_from.wp00_original && wp_from.wp00_original != wp_from.wp00)
1452 LOG_TRACE(
"loaded ",
ftos(c),
" waypoint links from ", filename);
1454 bool scheduled =
false;
1459 waypoint_schedulerelink(it);
1473 float file, tokens, c = 0, found;
1475 vector wp_to_pos, wp_from_pos;
1479 string filename = sprintf(
"maps/%s.waypoints.hardwired",
strcat(
mapname, gt_ext));
1482 if (gt_ext !=
"" && file < 0)
1485 filename = sprintf(
"maps/%s.waypoints.hardwired",
mapname);
1493 LOG_TRACE(
"waypoint links load from ", filename,
" failed");
1497 bool is_special =
false;
1498 while ((s =
fgets(file)))
1523 if(!wp_from || wp_from.origin!=wp_from_pos)
1525 wp_from = findradius(wp_from_pos, 5);
1529 if(
vdist(wp_from.origin - wp_from_pos, <, 5))
1530 if(wp_from.classname ==
"waypoint")
1535 wp_from = wp_from.chain;
1540 s =
strcat(((is_special) ?
"special link " :
"hardwired link "), s);
1541 LOG_INFO(
"NOTICE: Can not find origin waypoint of the ", s,
". Path skipped");
1547 wp_to = findradius(wp_to_pos, 5);
1551 if(
vdist(wp_to.origin - wp_to_pos, <, 5))
1552 if(wp_to.classname ==
"waypoint")
1557 wp_to = wp_to.chain;
1562 s =
strcat(((is_special) ?
"special link " :
"hardwired link "), s);
1563 LOG_INFO(
"NOTICE: Can not find destination waypoint of the ", s,
". Path skipped");
1590 case 0:
return w.wp00mincost;
1591 case 1:
return w.wp01mincost;
1592 case 2:
return w.wp02mincost;
1593 case 3:
return w.wp03mincost;
1594 case 4:
return w.wp04mincost;
1595 case 5:
return w.wp05mincost;
1596 case 6:
return w.wp06mincost;
1597 case 7:
return w.wp07mincost;
1598 case 8:
return w.wp08mincost;
1599 case 9:
return w.wp09mincost;
1600 case 10:
return w.wp10mincost;
1601 case 11:
return w.wp11mincost;
1602 case 12:
return w.wp12mincost;
1603 case 13:
return w.wp13mincost;
1604 case 14:
return w.wp14mincost;
1605 case 15:
return w.wp15mincost;
1606 case 16:
return w.wp16mincost;
1607 case 17:
return w.wp17mincost;
1608 case 18:
return w.wp18mincost;
1609 case 19:
return w.wp19mincost;
1610 case 20:
return w.wp20mincost;
1611 case 21:
return w.wp21mincost;
1612 case 22:
return w.wp22mincost;
1613 case 23:
return w.wp23mincost;
1614 case 24:
return w.wp24mincost;
1615 case 25:
return w.wp25mincost;
1616 case 26:
return w.wp26mincost;
1617 case 27:
return w.wp27mincost;
1618 case 28:
return w.wp28mincost;
1619 case 29:
return w.wp29mincost;
1620 case 30:
return w.wp30mincost;
1621 case 31:
return w.wp31mincost;
1630 case 0:
return w.wp00;
1631 case 1:
return w.wp01;
1632 case 2:
return w.wp02;
1633 case 3:
return w.wp03;
1634 case 4:
return w.wp04;
1635 case 5:
return w.wp05;
1636 case 6:
return w.wp06;
1637 case 7:
return w.wp07;
1638 case 8:
return w.wp08;
1639 case 9:
return w.wp09;
1640 case 10:
return w.wp10;
1641 case 11:
return w.wp11;
1642 case 12:
return w.wp12;
1643 case 13:
return w.wp13;
1644 case 14:
return w.wp14;
1645 case 15:
return w.wp15;
1646 case 16:
return w.wp16;
1647 case 17:
return w.wp17;
1648 case 18:
return w.wp18;
1649 case 19:
return w.wp19;
1650 case 20:
return w.wp20;
1651 case 21:
return w.wp21;
1652 case 22:
return w.wp22;
1653 case 23:
return w.wp23;
1654 case 24:
return w.wp24;
1655 case 25:
return w.wp25;
1656 case 26:
return w.wp26;
1657 case 27:
return w.wp27;
1658 case 28:
return w.wp28;
1659 case 29:
return w.wp29;
1660 case 30:
return w.wp30;
1661 case 31:
return w.wp31;
1662 default:
return NULL;
1671 string filename = sprintf(
"maps/%s.waypoints.hardwired",
strcat(
mapname, gt_ext));
1675 LOG_TRACE(
"waypoint hardwired links ", filename,
" creation failed");
1681 fputs(file,
"// HARDWIRED LINKS\n");
1684 for (
int j = 0; j < 32; ++j)
1690 string s =
strcat(
vtos(it.origin),
"*",
vtos(link.origin),
"\n");
1699 fputs(file,
"\n// SPECIAL LINKS\n");
1702 for (int j = 0; j < 32; ++j)
1704 entity link = waypoint_get_link(it, j);
1708 string s = strcat(
"*", vtos(it.origin),
"*", vtos(link.origin),
"\n");
1717 LOG_INFOF(
"saved %d hardwired links and %d special links to %s",
count, count2, filename);
1725 string filename = sprintf(
"maps/%s.waypoints.cache",
strcat(
mapname, gt_ext));
1729 LOG_INFOF(
"waypoint link save to %s failed", filename);
1740 for(int j = 0; j < 32; ++j)
1742 entity link = waypoint_get_link(it, j);
1743 if (link && !waypoint_is_hardwiredlink(it, link))
1746 string s = strcat(vtos(it.origin),
"*", vtos(link.origin),
"\n");
1756 LOG_INFOF(
"saved %d waypoint links to %s", c, filename);
1764 LOG_INFOF(
"^1Overwriting waypoints with a higher version number (%f) is not allowed.\n" 1770 string filename = sprintf(
"maps/%s.waypoints",
strcat(
mapname, gt_ext));
1777 LOG_INFOF(
"waypoint links: save to %s failed", filename);
1782 string sym_str =
ftos(sym);
1787 sym_str =
cons(sym_str,
"-");
1788 sym_str =
cons(sym_str,
"-");
1807 fputs(file,
strcat(
"//",
"WAYPOINT_SYMMETRY ", sym_str,
"\n"));
1838 LOG_INFOF(
"saved %d waypoints to %s", c, filename);
1845 int file, cwp, cwb, fl;
1852 string filename = sprintf(
"maps/%s.waypoints",
strcat(
mapname, gt_ext));
1855 if (gt_ext !=
"" && file < 0)
1858 filename = sprintf(
"maps/%s.waypoints",
mapname);
1864 LOG_TRACE(
"waypoint load from ", filename,
" failed");
1868 bool parse_comments =
true;
1871 float sym_param1 = 0, sym_param2 = 0, sym_param3 = 0;
1873 while ((s =
fgets(file)))
1879 if(
substring(s, 2, 17) ==
"WAYPOINT_VERSION ")
1881 else if(
substring(s, 2, 18) ==
"WAYPOINT_SYMMETRY ")
1884 if (tokens) { sym =
stof(
argv(0)); }
1885 if (tokens > 1) { sym_param1 =
stof(
argv(1)); }
1886 if (tokens > 2) { sym_param2 =
stof(
argv(2)); }
1887 if (tokens > 3) { sym_param3 =
stof(
argv(3)); }
1889 else if(
substring(s, 2, 14) ==
"WAYPOINT_TIME ")
1897 LOG_TRACE(
"waypoints for this map are outdated");
1898 LOG_TRACE(
"please update them in the editor");
1900 parse_comments =
false;
1925 string sym_str =
"";
1927 if (sym == 1 && sym_param3 < 2)
1928 cvar_set(
"g_waypointeditor_symmetrical_order",
"0");
1929 if (sym == -1 || (sym == 1 && sym_param3 >= 2))
1933 params =
cons(
"-",
"-");
1937 cvar_set(
"g_waypointeditor_symmetrical_origin", params);
1939 cvar_set(
"g_waypointeditor_symmetrical_order",
ftos(sym_param3));
1940 sym_str =
strcat(
ftos(sym),
" with origin ", params,
" and order ",
ftos(sym_param3));
1945 cvar_set(
"g_waypointeditor_symmetrical_axis", params);
1946 sym_str =
strcat(
ftos(sym),
" with axis ", params);
1949 sym_str =
ftos(sym);
1951 LOG_INFO(
"Waypoint editor: loaded symmetry ", sym_str);
1956 LOG_INFOF(
"^1Editing waypoints with a higher version number (%f) is not allowed.\n" 1962 #define waypoint_fixorigin(position, tracetest_ent) \ 1963 waypoint_fixorigin_down_dir(position, tracetest_ent, '0 0 -1') 1967 vector endpos = position + down_dir * 3000;
1968 tracebox(position +
'0 0 1', PL_MIN_CONST, PL_MAX_CONST, endpos,
MOVE_NOMONSTERS, tracetest_ent);
1970 tracebox(position +
'0 0 1' * (1 - PL_MIN_CONST.z / 2), PL_MIN_CONST, PL_MAX_CONST, endpos,
MOVE_NOMONSTERS, tracetest_ent);
1972 tracebox(position +
'0 0 1' * (1 - PL_MIN_CONST.z), PL_MIN_CONST, PL_MAX_CONST, endpos,
MOVE_NOMONSTERS, tracetest_ent);
1988 if(boxesoverlap(org, org, it.absmin, it.absmax))
1990 e.nearestwaypoint = it;
1996 if(
vdist(it.origin - org, <, 16))
1998 e.nearestwaypoint = it;
2022 w.wp00_original = dw;
2024 w.wp00mincost = timetaken;
2027 e.nearestwaypoint = w;
2028 e.nearestwaypointtimeout = -1;
2033 float src_angle = e.warpzone_angles.x;
2034 while (src_angle < -180) src_angle += 360;
2035 while (src_angle > 180) src_angle -= 360;
2037 float dest_angle = e.enemy.warpzone_angles.x;
2038 while (dest_angle < -180) dest_angle += 360;
2039 while (dest_angle > 180) dest_angle -= 360;
2042 if (src_angle == -90 || dest_angle == -90)
2046 vector src = (e.absmin + e.absmax) * 0.5;
2051 vector dest = (e.enemy.absmin + e.enemy.absmax) * 0.5;
2057 if (src_angle != 90)
2085 w.nearestwaypoint =
NULL;
2086 w.nearestwaypointtimeout = 0;
2100 te_beam(
NULL, wp1.origin, wp2.origin);
2101 else if (display_type == 1)
2102 te_lightning2(
NULL, wp1.origin, wp2.origin);
2139 setsize(it,
'-16 -16 -16',
'16 16 16');
2147 setsize(it,
'0 0 0',
'0 0 0');
2163 int display_type = 0;
2164 if (wasfreed(it.wp_aimed))
2166 if (wasfreed(it.wp_locked))
2167 it.wp_locked = NULL;
2168 entity head = it.wp_locked;
2170 head = navigation_findnearestwaypoint(it, false);
2171 it.nearestwaypoint = head;
2172 it.nearestwaypointtimeout = time + 2;
2173 if (IS_ONGROUND(it) || it.waterlevel > WATERLEVEL_NONE || it.wp_locked)
2175 else if(waypoint_has_hardwiredlinks(head))
2185 te_lightning2(NULL, head.origin, it.origin);
2186 if(PHYS_INPUT_BUTTON_CROUCH(it))
2187 waypoint_showlinks_to(head, display_type);
2189 waypoint_showlinks_from(head, display_type);
2194 if (
vdist(
vec2(it.velocity), <, autocvar_sv_maxspeed * 1.1))
2196 crosshair_trace_waypoints(it);
2200 if (wp != it.wp_aimed)
2202 string wp_type_str = waypoint_get_type_name(wp);
2203 str = sprintf(
"\necho Entity %d: %s^7, flags: %d, origin: %s\n", etof(wp), wp_type_str, wp.wpflags, vtos(wp.origin));
2205 str = strcat(str, sprintf(
"echo \" absmin: %s, absmax: %s\"\n", vtos(wp.absmin), vtos(wp.absmax)));
2207 str = sprintf(
"Entity %d: %s^7\nflags: %d\norigin: %s", etof(wp), wp_type_str, wp.wpflags, vtos(wp.origin));
2209 str = strcat(str, sprintf(
" \nabsmin: %s\nabsmax: %s", vtos(wp.absmin), vtos(wp.absmax)));
2210 debug_text_3d(wp.origin, str, 0, 7,
'0 0 0');
2214 if (it.wp_aimed != wp)
2251 float t, tmin, tmax;
2268 maxdist =
vlen(wp.origin - porg);
2276 float bestdist = maxdist;
2279 float d = vlen(wp.origin - it.origin) + vlen(it.origin - porg);
2281 if(navigation_waypoint_will_link(wp.origin, it.origin, p, it.origin, 0, wp.origin, 0, walkfromwp, 1050))
2282 if(navigation_waypoint_will_link(it.origin, porg, p, porg, 0, it.origin, 0, walkfromwp, 1050))
2288 if(bestdist < maxdist)
2290 LOG_INFO(
"update chain to new nearest WP ",
etos(p.(fld)));
2322 if(tmax - tmin < 0.001)
2328 t = (tmin + tmax) * 0.5;
2369 LOG_INFO(
"spawning a waypoint for connecting to ",
etos(wp));
2384 LOG_INFO(
"emergency: got no good nearby WP to build a link from, starting a new chain");
2396 navigation_findnearestwaypoint(it, false);
2397 navigation_findnearestwaypoint(it, true);
2418 for (int m = 0; m < 32; ++m)
2420 entity w = waypoint_get_link(it, m);
2423 if (w.wpflags & WAYPOINTFLAG_PERSONAL)
2425 if (w.wpflags & WAYPOINTFLAG_USEFUL)
2427 for (int j = 0; j < 32; ++j)
2429 entity w2 = waypoint_get_link(w, j);
2434 if (w2.wpflags & WAYPOINTFLAG_PERSONAL)
2439 w.wpflags &= ~WAYPOINTFLAG_DEAD_END;
2440 for (int k = 0; k < 32; ++k)
2442 if (waypoint_get_link(it, k) == w2)
2446 w.wpflags |= WAYPOINTFLAG_USEFUL;
2458 LOG_INFOF(
"Removed a waypoint at %v. Try again for more!", it.origin);
2459 te_explosion(it.origin);
2460 waypoint_remove(it);
const int WAYPOINTFLAG_CROUCH
#define IL_EACH(this, cond, body)
void waypoint_updatecost_foralllinks()
float waypoint_getlinearcost_underwater(float dist)
#define PHYS_INPUT_BUTTON_CROUCH(s)
ERASEABLE string ftos_decimals(float number, int decimals)
converts a number to a string with the indicated number of decimals
vector waypoint_fixorigin_down_dir(vector position, entity tracetest_ent, vector down_dir)
float botframe_loadedforcedlinks
void navigation_markroutes_inverted(entity fixed_source_waypoint)
bool navigation_check_submerged_state(entity ent, vector pos)
float waypoint_gettravelcost(vector from, vector to, entity from_ent, entity to_ent)
void waypoint_clear_start_wp_globals(entity pl, bool warn)
void waypoint_mark_hardwiredlink(entity wp_from, entity wp_to)
void waypoint_remove_fromeditor(entity pl)
const int WAYPOINTFLAG_PROTECTED
const int WAYPOINTFLAG_LADDER
float botframe_autowaypoints_fix_from(entity p, float walkfromwp, entity wp,.entity fld)
ClientState CS(Client this)
#define FOREACH_CLIENT(cond, body)
const int WAYPOINTFLAG_JUMP
#define waypoint_fixorigin(position, tracetest_ent)
float trigger_push_get_push_time(entity this, vector endpos)
bool waypoint_islinked(entity from, entity to)
void navigation_markroutes(entity this, entity fixed_source_waypoint)
bool autocvar_g_waypointeditor_symmetrical_allowload
float waypoint_getlinkcost(entity from, entity to)
vector waypoint_getSymmetricalPoint(vector org, int ctf_flags)
const int WPFLAGMASK_NORELINK
entity waypoint_spawn(vector m1, vector m2, float f)
float waypoint_get_assigned_link_cost(entity w, float i)
float DPCONTENTS_PLAYERCLIP
const float EF_NODEPTHTEST
float havocbot_middlepoint_radius
void waypoint_think(entity this)
void waypoint_spawnforteleporter_wz(entity e, entity tracetest_ent)
const int WAYPOINTFLAG_NORELINK__DEPRECATED
#define move_out_of_solid(e)
void waypoint_unmark_hardwiredlink(entity wp_from, entity wp_to)
float botframe_cachedwaypointlinks
void bot_calculate_stepheightvec()
#define IS_REAL_CLIENT(v)
void botframe_autowaypoints_fix(entity p, float walkfromwp,.entity fld)
float autocvar_bot_ai_bunnyhop_skilloffset
int autocvar_g_waypointeditor_auto
#define setmodel(this, m)
void waypoint_showlink(entity wp1, entity wp2, int display_type)
float botframe_autowaypoints_fixdown(vector v)
void waypoint_getSymmetricalAxis_cmd(entity caller, bool save, int arg_idx)
#define FOREACH_ENTITY_CLASS(class, cond, body)
vector autocvar_g_waypointeditor_symmetrical_axis
float relink_lengthculled
bool start_wp_is_hardwired
float havocbot_symmetry_axis_q
entity botframe_autowaypoints_lastwp1
bool waypointeditor_enabled
float havocbot_symmetry_axis_m
const float MOVE_NOMONSTERS
void waypoint_addlink_customcost(entity from, entity to, float c)
void waypoint_load_hardwiredlinks()
void waypoint_removelink(entity from, entity to)
ERASEABLE entity IL_PUSH(IntrusiveList this, entity it)
Push to tail.
bool waypoint_load_links()
#define GET_GAMETYPE_EXTENSION()
float waypoint_version_loaded
bool bot_waypoints_for_items
const int WAYPOINTFLAG_TELEPORT
ERASEABLE float boxesoverlap(vector m1, vector m2, vector m3, vector m4)
requires that m2>m1 in all coordinates, and that m4>m3
spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 f1 s1 strcat(_("Level %s: "), "^BG%s\3\, _("^BGPress ^F2%s^BG to enter the game"))
void waypoint_schedulerelinkall()
float waypoint_getlinearcost_crouched(float dist)
vector havocbot_middlepoint
entity waypoint_get(vector m1, vector m2)
void waypoint_schedulerelink(entity wp)
void waypoint_save_hardwiredlinks()
void waypoint_start_hardwiredlink(entity pl, bool at_crosshair)
void waypoint_spawnforitem(entity e)
float tracewalk_dest_height
vector set_tracewalk_dest_2(entity ent, vector org)
bool waypoint_has_hardwiredlinks(entity wp)
float waypoint_getlinearcost(float dist)
IntrusiveList g_waypoints
entity waypoint_spawnpersonal(entity this, vector position)
void botframe_deleteuselesswaypoints()
void waypoint_addlink_for_custom_jumppad(entity wp_from, entity wp_to)
vector(float skel, float bonenum) _skel_get_boneabs_hidden
float bot_navigation_movemode
void WarpZone_crosshair_trace(entity pl)
void waypoint_showlinks_to(entity wp, int display_type)
void waypoint_addlink(entity from, entity to)
void waypoint_spawnforitem_force(entity e, vector org)
#define vdist(v, cmp, f)
Vector distance comparison, avoids sqrt()
void waypoint_clearlinks(entity wp)
bool autocvar_g_waypointeditor_symmetrical
const int WAYPOINTFLAG_DEAD_END
void waypoint_save_links()
bool waypoint_is_hardwiredlink(entity wp_from, entity wp_to)
const float SOLID_TRIGGER
void waypoint_getSymmetricalOrigin_cmd(entity caller, bool save, int arg_idx)
#define tokenizebyseparator
vector autocvar_g_waypointeditor_symmetrical_origin
void waypoint_spawnforteleporter(entity e, vector destination, float timetaken, entity tracetest_ent)
entity waypoint_get_link(entity w, float i)
void crosshair_trace_waypoints(entity pl)
const int WAYPOINTFLAG_GENERATED
float havocbot_symmetry_origin_order
noref int autocvar_developer
ERASEABLE vector Rotate(vector v, float a)
const int WAYPOINTFLAG_PERSONAL
void botframe_showwaypointlinks()
float navigation_testtracewalk
const int WAYPOINTFLAG_USEFUL
void waypoint_restore_hardwiredlinks(entity wp)
float botframe_waypointeditorlightningtime
void waypoint_showlinks_from(entity wp, int display_type)
void waypoint_spawn_fromeditor(entity pl, bool at_crosshair, bool is_jump_wp, bool is_crouch_wp, bool is_support_wp)
ERASEABLE string cons(string a, string b)
int waypoint_getlinknum(entity from, entity to)
void waypoint_remove(entity wp)
void waypoint_spawnforteleporter_boxes(entity e, int teleport_flag, vector org1, vector org2, vector destination1, vector destination2, float timetaken)
float navigation_waypoint_will_link(vector v, vector org, entity ent, vector v2, float v2_height, vector o2, float o2_height, float walkfromwp, float bestdist)
const int WAYPOINTFLAG_ITEM
void waypoint_lock(entity pl)
const int WAYPOINTFLAG_CUSTOM_JP
int autocvar_g_waypointeditor_symmetrical_order
bool autocvar_g_waypointeditor
void waypoint_unreachable(entity pl)
const float WAYPOINT_VERSION
string waypoint_get_type_name(entity wp)
IntrusiveList g_spawnpoints
const int WAYPOINTFLAG_SUPPORT
bool autocvar_bot_navigation_ignoreplayers
entity navigation_findnearestwaypoint(entity ent, float walkfromwp)
void botframe_autowaypoints()
void waypoint_setupmodel(entity wp)
float botframe_autowaypoints_createwp(vector v, entity p,.entity fld, float f)
vector antilag_takebackorigin(entity e, entity store, float t)