{
local entity w;
local entity dw;
- w = waypoint_spawn(e.absmin, e.absmax, WAYPOINTFLAG_GENERATED | WAYPOINTFLAG_TELEPORT | WAYPOINTFLAG_NORELINK);
+ vector org;
+ org = (e.absmin + e.absmax) * 0.5;
+ org = waypoint_fixorigin(org);
+ w = waypoint_spawn(org, org, WAYPOINTFLAG_GENERATED | WAYPOINTFLAG_TELEPORT | WAYPOINTFLAG_NORELINK);
dw = waypoint_spawn(destination, destination, WAYPOINTFLAG_GENERATED);
// one way link to the destination
w.wp00 = dw;
for(e = findchain(classname, "waypoint"); e; e = e.chain)
{
e.colormod_x = 1;
- e.effects &~= EF_NODEPTHTEST | EF_RED | EF_BLUE;
+ e.effects &~= EF_NODEPTHTEST | EF_RED | EF_BLUE | EF_BRIGHTLIGHT;
}
e2 = navigation_findnearestwaypoint(self, FALSE);
navigation_markroutes(e2);
{
print("unreachable: ", etos(e), " ", vtos(e.origin), "\n");
e.colormod_x = 0.1;
- e.effects |= EF_NODEPTHTEST | EF_BLUE;
+ e.effects |= EF_NODEPTHTEST | EF_BLUE | EF_BRIGHTLIGHT;
++i;
++m;
}
e.colormod_x = 0.1;
if not(e.effects & EF_NODEPTHTEST) // not already reported before
++m;
- e.effects |= EF_NODEPTHTEST | EF_RED;
+ e.effects |= EF_NODEPTHTEST | EF_RED | EF_BRIGHTLIGHT;
++i;
}
}
if(navigation_findnearestwaypoint(e, FALSE))
{
setorigin(e, org);
- e.effects &~= EF_NODEPTHTEST;
+ e.effects &~= EF_NODEPTHTEST | EF_BRIGHTLIGHT;
e.model = "";
}
else
{
setorigin(e, org);
print("spawn without waypoint: ", etos(e), " ", vtos(e.origin), "\n");
- e.effects |= EF_NODEPTHTEST;
+ e.effects |= EF_NODEPTHTEST | EF_BRIGHTLIGHT;
setmodel(e, self.model);
e.frame = self.frame;
e.skin = self.skin;
}
if(i)
print(ftos(i), " spawnpoints have no nearest waypoint (marked by player model)\n");
+ i = 0;
+ entity start;
+ start = findchainflags(flags, FL_ITEM);
+ for(e = start; e; e = e.chain)
+ {
+ e.effects &~= EF_NODEPTHTEST | EF_RED | EF_BLUE | EF_BRIGHTLIGHT;
+ }
+ for(e = start; e; e = e.chain)
+ {
+ if(navigation_findnearestwaypoint(e, FALSE))
+ {
+ }
+ else
+ {
+ print("item without waypoint: ", etos(e), " ", vtos(e.origin), "\n");
+ e.effects |= EF_NODEPTHTEST | EF_RED | EF_BRIGHTLIGHT;
+ ++i;
+ }
+ }
+ if(i)
+ print(ftos(i), " items have no nearest waypoint and cannot be walked away from (marked with red light)\n");
+ i = 0;
+ for(e = start; e; e = e.chain)
+ {
+ org = e.origin;
+ if(navigation_findnearestwaypoint(e, TRUE))
+ {
+ }
+ else
+ {
+ print("item without waypoint: ", etos(e), " ", vtos(e.origin), "\n");
+ e.effects |= EF_NODEPTHTEST | EF_BLUE | EF_BRIGHTLIGHT;
+ ++i;
+ }
+ }
+ if(i)
+ print(ftos(i), " items have no nearest waypoint and cannot be walked to (marked with blue light)\n");
break;
}
}
for(e = world; (e = find(e, targetname, self.target)); )
{
++n;
+ waypoint_spawnforteleporter(self, e.origin, 0);
if(e.movetype == MOVETYPE_NONE)
RandomSelection_Add(e, 0, string_null, 1, 1);
if(e.classname != "info_teleport_destination")
print("^3MAPPER ERROR: teleporter does target an invalid teleport destination entity. Angles will not work.\n");
}
- if(RandomSelection_chosen_ent)
- waypoint_spawnforteleporter(self, RandomSelection_chosen_ent.origin, 0);
if(n == 0)
{