Code:
if (paths[i]->flags & W_FL_GOAL)
WaypointDrawBeam (start, end, 30, 128, 0, 255);
else if (paths[i]->flags & W_FL_LADDER)
WaypointDrawBeam (start, end, 30, 255, 0, 255);
else if (paths[i]->flags & W_FL_RESCUE)
WaypointDrawBeam (start, end, 30, 255, 255, 255);
else if (paths[i]->flags & W_FL_CAMP)
{
if (paths[i]->flags & W_FL_TERRORIST)
WaypointDrawBeam (start, end, 30, 255, 160, 160);
else if (paths[i]->flags & W_FL_COUNTER)
WaypointDrawBeam (start, end, 30, 255, 160, 255);
else
WaypointDrawBeam (start, end, 30, 0, 255, 255);
}
else
{
if (paths[i]->flags & W_FL_TERRORIST)
WaypointDrawBeam (start, end, 30, 255, 0, 0);
else if (paths[i]->flags & W_FL_COUNTER)
WaypointDrawBeam (start, end, 30, 0, 0, 255);
else
WaypointDrawBeam (start, end, 30, 0, 225, 0);
}
if (g_bShowWpFlags)
{
if (paths[i]->flags & W_FL_NOHOSTAGE)
{
WaypointDrawBeam (end + Vector (-8, 0, 0), end + Vector (8, 0, 0), 30, 255, 0, 0);
WaypointDrawBeam (end + Vector (0, -8, 0), end + Vector (0, 8, 0), 30, 255, 0, 0);
}
if (paths[i]->flags & W_FL_USE_BUTTON)
{
WaypointDrawBeam (end + Vector (-8, 0, -3), end + Vector (8, 0, -3), 30, 0, 255, 0);
WaypointDrawBeam (end + Vector (0, -8, -3), end + Vector (0, 8, -3), 30, 0, 255, 0);
}
}
}
}
}
------
if (p->flags & W_FL_CAMP)
{
if (p->flags & W_FL_CROUCH)
start = p->origin - Vector (0, 0, 17) + Vector (0, 0, 34);
else
start = p->origin - Vector (0, 0, 34) + Vector (0, 0, 68);
MAKE_VECTORS (Vector (p->fcampstartx, p->fcampstarty, 0));
end = p->origin + gpGlobals->v_forward * 500;
WaypointDrawBeam (start, end, 30, 255, 0, 0);
MAKE_VECTORS (Vector (p->fcampendx, p->fcampendy, 0));
end = p->origin + gpGlobals->v_forward * 500;
WaypointDrawBeam (start, end, 30, 255, 0, 0);
}
for (i = 0; i < MAX_PATH_INDEX; i++)
{
if (p->index[i] != -1)
{
if (p->connectflag[i] & C_FL_JUMP)
WaypointDrawBeam (p->origin, paths[p->index[i]]->origin, 10, 255, 0, 0);
// If 2-way connection draw a yellow line to this index's waypoint
else if (ConnectedToWaypoint (p->index[i], p->iPathNumber))
WaypointDrawBeam (p->origin, paths[p->index[i]]->origin, 10, 255, 255, 0);
// draw a white line to this index's waypoint
else
WaypointDrawBeam (p->origin, paths[p->index[i]]->origin, 10, 250, 250, 250);
}
}
// now look for one-way incoming connections
for (i = 0; i < g_iNumWaypoints; i++)
if (ConnectedToWaypoint (paths[i]->iPathNumber, p->iPathNumber)
&& !ConnectedToWaypoint (p->iPathNumber, paths[i]->iPathNumber))
WaypointDrawBeam (p->origin, paths[i]->origin, 10, 0, 166, 166);