1
This commit is contained in:
parent
9ed987c69e
commit
05ebd8d2bb
@ -19,6 +19,7 @@
|
||||
#include "ability.h"
|
||||
#include "battledatacontext.h"
|
||||
#include "buff.h"
|
||||
#include "mapinstance.h"
|
||||
|
||||
#include "mt/Param.h"
|
||||
#include "mt/Hero.h"
|
||||
@ -3191,7 +3192,21 @@ void Creature::UpdateMove()
|
||||
|
||||
void Creature::ForwardMove(float distance)
|
||||
{
|
||||
GetMovement()->CalcTargetPos(distance);
|
||||
Position pos = GetPos();
|
||||
glm::vec3 start = GetPos().ToGlmVec3();
|
||||
glm::vec3 end = pos.AddGlmVec3(GetMoveDir() * distance).ToGlmVec3();
|
||||
|
||||
glm::vec3 hit_point;
|
||||
room->map_instance->Scale(start);
|
||||
room->map_instance->Scale(end);
|
||||
|
||||
bool hit_result = false;
|
||||
bool ret = room->map_instance->Raycast(0, start, end, hit_point, hit_result);
|
||||
if (ret) {
|
||||
room->map_instance->UnScale(hit_point);
|
||||
}
|
||||
|
||||
CheckSpecObject();
|
||||
}
|
||||
|
||||
bool Creature::HasSpecMove()
|
||||
|
Loading…
x
Reference in New Issue
Block a user