1
This commit is contained in:
parent
732e1fbe23
commit
e7d492039e
@ -1,14 +1,11 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <a8/a8.h>
|
#include <a8/a8.h>
|
||||||
#include <a8/vec2.h>
|
#include <f8/f8.h>
|
||||||
#include <a8/vec3.h>
|
|
||||||
|
|
||||||
#include <glm/vec2.hpp>
|
#include <glm/vec2.hpp>
|
||||||
#include <glm/vec3.hpp>
|
#include <glm/vec3.hpp>
|
||||||
|
|
||||||
#include <f8/f8.h>
|
|
||||||
|
|
||||||
#include "constant.h"
|
#include "constant.h"
|
||||||
#include "constant_export.h"
|
#include "constant_export.h"
|
||||||
#include "mt/Forward.h"
|
#include "mt/Forward.h"
|
||||||
|
@ -817,12 +817,12 @@ void RoomObstacle::ActiveMedicalStation()
|
|||||||
if (master.Get()->team_id == hum->team_id &&
|
if (master.Get()->team_id == hum->team_id &&
|
||||||
!hum->dead
|
!hum->dead
|
||||||
) {
|
) {
|
||||||
if (Collision::CheckCC
|
if (Collision::CheckCB
|
||||||
(
|
(
|
||||||
this
|
|
||||||
SkillHelper::GetYlzRange(skill_meta),
|
|
||||||
hum,
|
hum,
|
||||||
hum->GetRadius()
|
hum->GetRadius(),
|
||||||
|
this,
|
||||||
|
SkillHelper::GetYlzRange(skill_meta)
|
||||||
)) {
|
)) {
|
||||||
target_list.insert(hum);
|
target_list.insert(hum);
|
||||||
}
|
}
|
||||||
|
@ -2,17 +2,22 @@
|
|||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
|
#include <glm/gtc/matrix_transform.hpp>
|
||||||
|
|
||||||
#include "human.h"
|
#include "human.h"
|
||||||
#include "glmhelper.h"
|
#include "glmhelper.h"
|
||||||
|
|
||||||
float Position::Distance2D2(const Position& pos) const
|
float Position::Distance2D2(const Position& pos) const
|
||||||
{
|
{
|
||||||
return pos.ToVec2().Distance(ToVec2());
|
glm::vec2 v1 = glm::vec2(x, z);
|
||||||
|
glm::vec2 v2 = glm::vec2(pos.x, pos.z);
|
||||||
|
return glm::length(v2 - v1);
|
||||||
}
|
}
|
||||||
|
|
||||||
float Position::ManhattanDistance2D(const Position& target_pos) const
|
float Position::ManhattanDistance2D(const Position& target_pos) const
|
||||||
{
|
{
|
||||||
return ToVec2().ManhattanDistance(target_pos.ToVec2());
|
float distance = std::fabs(x - target_pos.x) + std::fabs(z - target_pos.y);
|
||||||
|
return distance;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Position::FromGlmVec3(const glm::vec3 v)
|
void Position::FromGlmVec3(const glm::vec3 v)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user