]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/impulse.qc
Use the constants for player hitbox size when applicable (should fix observer hitbox)
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / impulse.qc
index 4660a433ba543fee479e6c053a4d629d3a926ad5..9b36010fec98015253b4e4a92d38054f1d13fed4 100644 (file)
@@ -551,10 +551,10 @@ IMPULSE(navwaypoint_unreachable)
        if (m) LOG_INFOF("%d waypoints have been marked total\n", m);
 
        j = 0;
-       FOREACH_ENTITY_CLASS("info_player_deathmatch", true,
+       IL_EACH(g_spawnpoints, true,
        {
                vector org = it.origin;
-               tracebox(it.origin, STAT(PL_MIN, NULL), STAT(PL_MAX, NULL), it.origin - '0 0 512', MOVE_NOMONSTERS, NULL);
+               tracebox(it.origin, PL_MIN_CONST, PL_MAX_CONST, it.origin - '0 0 512', MOVE_NOMONSTERS, NULL);
                setorigin(it, trace_endpos);
                if (navigation_findnearestwaypoint(it, false))
                {
@@ -578,12 +578,12 @@ IMPULSE(navwaypoint_unreachable)
        if (j) LOG_INFOF("%d spawnpoints have no nearest waypoint (marked by player model)\n", j);
 
        j = 0;
-       FOREACH_ENTITY_FLAGS(flags, FL_ITEM,
+       IL_EACH(g_items, true,
        {
                it.effects &= ~(EF_NODEPTHTEST | EF_RED | EF_BLUE);
                it.colormod = '0.5 0.5 0.5';
        });
-       FOREACH_ENTITY_FLAGS(flags, FL_ITEM,
+       IL_EACH(g_items, true,
        {
                if (navigation_findnearestwaypoint(it, false)) continue;
                LOG_INFO("item without waypoint: ", etos(it), " ", vtos(it.origin), "\n");
@@ -594,7 +594,7 @@ IMPULSE(navwaypoint_unreachable)
        if (j) LOG_INFOF("%d items have no nearest waypoint and cannot be walked away from (marked with red light)\n", j);
 
        j = 0;
-       FOREACH_ENTITY_FLAGS(flags, FL_ITEM,
+       IL_EACH(g_items, true,
        {
                if (navigation_findnearestwaypoint(it, true)) continue;
                LOG_INFO("item without waypoint: ", etos(it), " ", vtos(it.origin), "\n");