1
This commit is contained in:
parent
307c6d3f99
commit
03ab985b8b
@ -26,6 +26,11 @@ bool Collision::CheckCC(Creature* a, Creature* b)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Collision::CheckCC(Creature* a, float radius, Creature* b, float radis)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
bool Collision::CheckCB(Creature* c, Obstacle* b)
|
bool Collision::CheckCB(Creature* c, Obstacle* b)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
|
@ -10,6 +10,7 @@ class Collision
|
|||||||
static bool CheckBullet(IBullet* bullet, Creature* c);
|
static bool CheckBullet(IBullet* bullet, Creature* c);
|
||||||
static bool CheckBullet(IBullet* bullet, Entity* c);
|
static bool CheckBullet(IBullet* bullet, Entity* c);
|
||||||
static bool CheckCC(Creature* a, Creature* b);
|
static bool CheckCC(Creature* a, Creature* b);
|
||||||
|
static bool CheckCC(Creature* a, float radius, Creature* b, float radis);
|
||||||
static bool CheckCB(Creature* c, Obstacle* b);
|
static bool CheckCB(Creature* c, Obstacle* b);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -817,12 +817,13 @@ void RoomObstacle::ActiveMedicalStation()
|
|||||||
if (master.Get()->team_id == hum->team_id &&
|
if (master.Get()->team_id == hum->team_id &&
|
||||||
!hum->dead
|
!hum->dead
|
||||||
) {
|
) {
|
||||||
if (IntersectCircleCircle(
|
if (Collision::CheckCC
|
||||||
GetPos().ToVec2(),
|
(
|
||||||
SkillHelper::GetYlzRange(skill_meta),
|
this
|
||||||
hum->GetPos().ToVec2(),
|
SkillHelper::GetYlzRange(skill_meta),
|
||||||
hum->GetRadius()
|
hum,
|
||||||
)) {
|
hum->GetRadius()
|
||||||
|
)) {
|
||||||
target_list.insert(hum);
|
target_list.insert(hum);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -15,18 +15,6 @@ float Position::ManhattanDistance2D(const Position& target_pos) const
|
|||||||
return ToVec2().ManhattanDistance(target_pos.ToVec2());
|
return ToVec2().ManhattanDistance(target_pos.ToVec2());
|
||||||
}
|
}
|
||||||
|
|
||||||
a8::Vec2 Position::CalcDir2D(const Position& target_pos) const
|
|
||||||
{
|
|
||||||
return a8::Vec2(target_pos.x, target_pos.z) - a8::Vec2(x, z);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Position::FromVec3(const a8::Vec3 v)
|
|
||||||
{
|
|
||||||
x = v.x;
|
|
||||||
y = v.y;
|
|
||||||
z = v.z;
|
|
||||||
}
|
|
||||||
|
|
||||||
void Position::FromGlmVec3(const glm::vec3 v)
|
void Position::FromGlmVec3(const glm::vec3 v)
|
||||||
{
|
{
|
||||||
x = v.x;
|
x = v.x;
|
||||||
@ -34,14 +22,6 @@ void Position::FromGlmVec3(const glm::vec3 v)
|
|||||||
z = v.z;
|
z = v.z;
|
||||||
}
|
}
|
||||||
|
|
||||||
a8::Vec2 Position::ToVec2() const
|
|
||||||
{
|
|
||||||
a8::Vec2 v2;
|
|
||||||
v2.x = x;
|
|
||||||
v2.y = z;
|
|
||||||
return v2;
|
|
||||||
}
|
|
||||||
|
|
||||||
glm::vec3 Position::ToGlmVec3() const
|
glm::vec3 Position::ToGlmVec3() const
|
||||||
{
|
{
|
||||||
glm::vec3 v;
|
glm::vec3 v;
|
||||||
|
@ -70,14 +70,10 @@ struct Position
|
|||||||
float Distance2D2(const Position& pos) const;
|
float Distance2D2(const Position& pos) const;
|
||||||
float DistanceGlmVec3(const glm::vec3& v) const;
|
float DistanceGlmVec3(const glm::vec3& v) const;
|
||||||
float ManhattanDistance2D(const Position& target_pos) const;
|
float ManhattanDistance2D(const Position& target_pos) const;
|
||||||
a8::Vec2 CalcDir2D(const Position& target_pos) const;
|
|
||||||
glm::vec3 CalcDir(const Position& target_pos) const;
|
glm::vec3 CalcDir(const Position& target_pos) const;
|
||||||
|
|
||||||
void FromVec3(const a8::Vec3 v);
|
|
||||||
|
|
||||||
void FromGlmVec3(const glm::vec3 v);
|
void FromGlmVec3(const glm::vec3 v);
|
||||||
|
|
||||||
a8::Vec2 ToVec2() const;
|
|
||||||
glm::vec3 ToGlmVec3() const;
|
glm::vec3 ToGlmVec3() const;
|
||||||
|
|
||||||
const Position& AddGlmVec3(const glm::vec3& v);
|
const Position& AddGlmVec3(const glm::vec3& v);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user