From 2f203fa6bb3cf8fd48c72d5abc86d60bc1271213 Mon Sep 17 00:00:00 2001 From: Arthur Ice Date: Wed, 26 Nov 2014 19:38:53 -0800 Subject: [PATCH] InLava converted to xyz_location --- zone/water_map_v2.cpp | 5 ++--- zone/water_map_v2.h | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/zone/water_map_v2.cpp b/zone/water_map_v2.cpp index 2ba0a7d35..6f5977d79 100644 --- a/zone/water_map_v2.cpp +++ b/zone/water_map_v2.cpp @@ -25,14 +25,13 @@ bool WaterMapV2::InVWater(const xyz_location& location) const { return ReturnRegionType(location) == RegionTypeVWater; } -bool WaterMapV2::InLava(float y, float x, float z) const { - auto location = xyz_location(x, y, z); +bool WaterMapV2::InLava(const xyz_location& location) const { return ReturnRegionType(location) == RegionTypeLava; } bool WaterMapV2::InLiquid(float y, float x, float z) const { auto location = xyz_location(x, y, z); - return InWater(location) || InLava(y, x, z); + return InWater(location) || InLava(location); } bool WaterMapV2::Load(FILE *fp) { diff --git a/zone/water_map_v2.h b/zone/water_map_v2.h index 5c4ba9e80..02e549cc7 100644 --- a/zone/water_map_v2.h +++ b/zone/water_map_v2.h @@ -15,7 +15,7 @@ public: virtual WaterRegionType ReturnRegionType(const xyz_location& location) const; virtual bool InWater(const xyz_location& location) const; virtual bool InVWater(const xyz_location& location) const; - virtual bool InLava(float y, float x, float z) const; + virtual bool InLava(const xyz_location& location) const; virtual bool InLiquid(float y, float x, float z) const; protected: