Fix issue where size 0 NPC's would hop in and out of the ground because FixZ calculates the offset wrong by adding a default race size

This commit is contained in:
Akkadius
2018-05-27 23:14:32 -05:00
parent a20615ea11
commit 7a7069959f
3 changed files with 164 additions and 105 deletions
+2 -1
View File
@@ -537,7 +537,7 @@ public:
inline const float GetTarVZ() const { return m_TargetV.z; }
inline const float GetTarVector() const { return tar_vector; }
inline const uint8 GetTarNDX() const { return tar_ndx; }
inline const int8 GetFlyMode() const { return flymode; }
inline const int8 GetFlyMode() const { return static_cast<const int8>(flymode); }
bool IsBoat() const;
//Group
@@ -986,6 +986,7 @@ public:
void SendTo(float new_x, float new_y, float new_z);
void SendToFixZ(float new_x, float new_y, float new_z);
float GetZOffset() const;
float GetDefaultRaceSize() const;
void FixZ(int32 z_find_offset = 5);
float GetFixedZ(glm::vec3 position, int32 z_find_offset = 5);