]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix player spawn points not linked from/to any waypoint when there's a very low ceili...
authorterencehill <piuntn@gmail.com>
Thu, 3 Aug 2017 13:57:18 +0000 (15:57 +0200)
committerterencehill <piuntn@gmail.com>
Thu, 3 Aug 2017 13:59:50 +0000 (15:59 +0200)
qcsrc/server/bot/default/navigation.qc

index 453b0930c336d973bdf9b73ec477d7c24a7e739a..72a90104aca92d2d6008062a5a61284187a020a5 100644 (file)
@@ -745,8 +745,12 @@ entity navigation_findnearestwaypoint_withdist_except(entity ent, float walkfrom
                        return it;
        });
 
-       vector org = ent.origin + 0.5 * (ent.mins + ent.maxs);
-       org.z = ent.origin.z + ent.mins.z - PL_MIN_CONST.z; // player height
+       vector org = ent.origin;
+       if(ent.size)
+       {
+               org += 0.5 * (ent.mins + ent.maxs);
+               org.z = ent.origin.z + ent.mins.z - PL_MIN_CONST.z; // player height
+       }
        // TODO possibly make other code have the same support for bboxes
        if(ent.tag_entity)
                org = org + ent.tag_entity.origin;