Velocity will now work in horizontal only instead of being both h + v (this was causing occasional skips in hilly areas)

This commit is contained in:
KimLS
2018-10-12 22:17:50 -07:00
parent 1785120796
commit 18ec09a79e
2 changed files with 52 additions and 26 deletions
-15
View File
@@ -7,21 +7,6 @@
extern Zone *zone;
void AdjustRoute(std::list<IPathfinder::IPathNode> &nodes, int flymode, float offset) {
if (!zone->HasMap() || !zone->HasWaterMap()) {
return;
}
for (auto &node : nodes) {
if (flymode == GravityBehavior::Ground || !zone->watermap->InLiquid(node.pos)) {
auto best_z = zone->zonemap->FindBestZ(node.pos, nullptr);
if (best_z != BEST_Z_INVALID) {
node.pos.z = best_z + offset;
}
}
}
}
void CullPoints(std::vector<FindPerson_Point> &points) {
if (!zone->HasMap()) {
return;