1
This commit is contained in:
parent
0e1e48363f
commit
ab4f8e6ad3
@ -2826,7 +2826,7 @@ void Creature::FollowToTarget()
|
|||||||
#if 1
|
#if 1
|
||||||
{
|
{
|
||||||
#else
|
#else
|
||||||
if (GetPos().ManhattanDistance(follow_target.Get()->GetPos()) > 50) {
|
if (GetPos().ManhattanDistance(follow_target.Get()->GetPos()) > 70) {
|
||||||
#endif
|
#endif
|
||||||
a8::Vec2 dir = a8::Vec2::UP;
|
a8::Vec2 dir = a8::Vec2::UP;
|
||||||
dir.Rotate(a8::RandAngle());
|
dir.Rotate(a8::RandAngle());
|
||||||
|
@ -3721,6 +3721,8 @@ void Human::DoFollow(int target_id)
|
|||||||
{
|
{
|
||||||
Player* hum = (Player*)param.sender.GetUserData();
|
Player* hum = (Player*)param.sender.GetUserData();
|
||||||
if (!hum->follow_target.Get()) {
|
if (!hum->follow_target.Get()) {
|
||||||
|
hum->moving = false;
|
||||||
|
hum->moved_frames = 0;
|
||||||
hum->room->xtimer.DeleteTimer(hum->room->xtimer.GetRunningTimer());
|
hum->room->xtimer.DeleteTimer(hum->room->xtimer.GetRunningTimer());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -3728,6 +3730,8 @@ void Human::DoFollow(int target_id)
|
|||||||
!(hum->follow_target.Get()->HasBuffEffect(kBET_Fly) ||
|
!(hum->follow_target.Get()->HasBuffEffect(kBET_Fly) ||
|
||||||
hum->follow_target.Get()->HasBuffEffect(kBET_Jump))
|
hum->follow_target.Get()->HasBuffEffect(kBET_Jump))
|
||||||
){
|
){
|
||||||
|
hum->moving = false;
|
||||||
|
hum->moved_frames = 0;
|
||||||
hum->follow_target.Detach();
|
hum->follow_target.Detach();
|
||||||
hum->room->xtimer.DeleteTimer(hum->room->xtimer.GetRunningTimer());
|
hum->room->xtimer.DeleteTimer(hum->room->xtimer.GetRunningTimer());
|
||||||
return;
|
return;
|
||||||
|
@ -72,7 +72,9 @@ void Player::InternalUpdate(int delta_time)
|
|||||||
moving = true;
|
moving = true;
|
||||||
moved_frames = 0;
|
moved_frames = 0;
|
||||||
}
|
}
|
||||||
if (HasBuffEffect(kBET_Jump) && follow_target.Get()) {
|
if (HasBuffEffect(kBET_Jump) &&
|
||||||
|
follow_target.Get() &&
|
||||||
|
GetPos().ManhattanDistance(follow_target.Get()->GetPos()) > 70) {
|
||||||
moving = true;
|
moving = true;
|
||||||
moved_frames = 0;
|
moved_frames = 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user