1
This commit is contained in:
parent
c2bd6e9c6f
commit
eec40fd525
@ -90,3 +90,8 @@ bool GlmHelper::IsEqual3D(const glm::vec3& v1, const glm::vec3& v2)
|
|||||||
std::abs(v1.y - v2.y) < 0.00001f &&
|
std::abs(v1.y - v2.y) < 0.00001f &&
|
||||||
std::abs(v1.z - v2.z) < 0.00001f;
|
std::abs(v1.z - v2.z) < 0.00001f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
glm::vec3 GlmHelper::Vec2ToVec3(const glm::vec2& v2)
|
||||||
|
{
|
||||||
|
return glm::vec3(v2.x, 0.0f, v2.y);
|
||||||
|
}
|
||||||
|
@ -20,5 +20,5 @@ class GlmHelper
|
|||||||
static float CalcAngle(const glm::vec3& v1, const glm::vec3& v2);
|
static float CalcAngle(const glm::vec3& v1, const glm::vec3& v2);
|
||||||
|
|
||||||
static void FillVert(const glm::vec3& v, float* vert);
|
static void FillVert(const glm::vec3& v, float* vert);
|
||||||
|
static glm::vec3 Vec2ToVec3(const glm::vec2& v2);
|
||||||
};
|
};
|
||||||
|
@ -249,7 +249,7 @@ bool HeroAgent::HasBuffEffect(int effect_id)
|
|||||||
bool HeroAgent::IsNearGas(float anti_range)
|
bool HeroAgent::IsNearGas(float anti_range)
|
||||||
{
|
{
|
||||||
return Collision::InSquare
|
return Collision::InSquare
|
||||||
(owner_->GetPos().ToGlmVec3(),
|
(GlmHelper::Vec2ToVec3(owner_->room->GetGasData().pos_old),
|
||||||
owner_->GetPos().ToGlmVec3(),
|
owner_->GetPos().ToGlmVec3(),
|
||||||
anti_range);
|
anti_range);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user