waypoint_spawnforitem_force(e, e.origin);
};
-void waypoint_spawnforteleporter(entity e, vector destination, float timetaken)
+void waypoint_spawnforteleporter_v(entity e, vector org, vector destination, float timetaken)
{
local entity w;
local entity dw;
- vector org;
- org = (e.absmin + e.absmax) * 0.5;
org = waypoint_fixorigin(org);
+ destination = waypoint_fixorigin(destination);
w = waypoint_spawn(org, org, WAYPOINTFLAG_GENERATED | WAYPOINTFLAG_TELEPORT | WAYPOINTFLAG_NORELINK);
dw = waypoint_spawn(destination, destination, WAYPOINTFLAG_GENERATED);
// one way link to the destination
e.nearestwaypointtimeout = time + 1000000000;
};
+void waypoint_spawnforteleporter(entity e, vector destination, float timetaken)
+{
+ waypoint_spawnforteleporter_v(e, (e.absmin + e.absmax) * 0.5, destination, timetaken);
+};
+
entity waypoint_spawnpersonal(vector position)
{
entity w;
case 107:
for(e = findchain(classname, "waypoint"); e; e = e.chain)
{
- e.colormod_x = 1;
- e.effects &~= EF_NODEPTHTEST | EF_RED | EF_BLUE | EF_BRIGHTLIGHT;
+ e.colormod = '0.5 0.5 0.5';
+ e.effects &~= EF_NODEPTHTEST | EF_RED | EF_BLUE;
}
e2 = navigation_findnearestwaypoint(self, FALSE);
navigation_markroutes(e2);
if(e.wpcost >= 10000000)
{
print("unreachable: ", etos(e), " ", vtos(e.origin), "\n");
- e.colormod_x = 0.1;
- e.effects |= EF_NODEPTHTEST | EF_BLUE | EF_BRIGHTLIGHT;
+ e.colormod_z = 8;
+ e.effects |= EF_NODEPTHTEST | EF_BLUE;
++i;
++m;
}
if(e.wpcost >= 10000000)
{
print("cannot reach me: ", etos(e), " ", vtos(e.origin), "\n");
- e.colormod_x = 0.1;
+ e.colormod_x = 8;
if not(e.effects & EF_NODEPTHTEST) // not already reported before
++m;
- e.effects |= EF_NODEPTHTEST | EF_RED | EF_BRIGHTLIGHT;
+ e.effects |= EF_NODEPTHTEST | EF_RED;
++i;
}
}
if(navigation_findnearestwaypoint(e, FALSE))
{
setorigin(e, org);
- e.effects &~= EF_NODEPTHTEST | EF_BRIGHTLIGHT;
+ e.effects &~= EF_NODEPTHTEST;
e.model = "";
}
else
{
setorigin(e, org);
print("spawn without waypoint: ", etos(e), " ", vtos(e.origin), "\n");
- e.effects |= EF_NODEPTHTEST | EF_BRIGHTLIGHT;
+ e.effects |= EF_NODEPTHTEST;
setmodel(e, self.model);
e.frame = self.frame;
e.skin = self.skin;
+ e.colormod = '8 0.5 8';
setsize(e, '0 0 0', '0 0 0');
++i;
}
start = findchainflags(flags, FL_ITEM);
for(e = start; e; e = e.chain)
{
- e.effects &~= EF_NODEPTHTEST | EF_RED | EF_BLUE | EF_BRIGHTLIGHT;
+ e.effects &~= EF_NODEPTHTEST | EF_RED | EF_BLUE;
+ e.colormod = '0.5 0.5 0.5';
}
for(e = start; e; e = e.chain)
{
else
{
print("item without waypoint: ", etos(e), " ", vtos(e.origin), "\n");
- e.effects |= EF_NODEPTHTEST | EF_RED | EF_BRIGHTLIGHT;
+ e.effects |= EF_NODEPTHTEST | EF_RED;
+ e.colormod_x = 8;
++i;
}
}
else
{
print("item without waypoint: ", etos(e), " ", vtos(e.origin), "\n");
- e.effects |= EF_NODEPTHTEST | EF_BLUE | EF_BRIGHTLIGHT;
+ e.effects |= EF_NODEPTHTEST | EF_BLUE;
+ e.colormod_z = 8;
++i;
}
}