1
This commit is contained in:
parent
bb7ce4a6c9
commit
69fb17f647
@ -18,6 +18,7 @@
|
|||||||
#include "battledatacontext.h"
|
#include "battledatacontext.h"
|
||||||
#include "stats.h"
|
#include "stats.h"
|
||||||
#include "hero_agent.h"
|
#include "hero_agent.h"
|
||||||
|
#include "movement.h"
|
||||||
|
|
||||||
#include "f8/btmgr.h"
|
#include "f8/btmgr.h"
|
||||||
|
|
||||||
@ -85,6 +86,35 @@ void Hero::Update(int delta_time)
|
|||||||
poisoning_time += delta_time;
|
poisoning_time += delta_time;
|
||||||
UpdatePoisoning();
|
UpdatePoisoning();
|
||||||
}
|
}
|
||||||
|
if (GetMovement()->GetPathSize() > 0) {
|
||||||
|
Global::Instance()->verify_set_pos = 1;
|
||||||
|
UpdateMove();
|
||||||
|
#ifdef DEBUG1
|
||||||
|
a8::XPrintf("updatemove old_pos:%f,%f new_pos:%f,%f\n",
|
||||||
|
{
|
||||||
|
old_pos.x,
|
||||||
|
old_pos.y,
|
||||||
|
GetPos().x,
|
||||||
|
GetPos().y,
|
||||||
|
});
|
||||||
|
#endif
|
||||||
|
Global::Instance()->verify_set_pos = 0;
|
||||||
|
} else {
|
||||||
|
if (HasBuffEffect(kBET_Jump)) {
|
||||||
|
glm::vec3 dir = GlmHelper::UP;
|
||||||
|
GlmHelper::RotateY(dir, (10 + rand() % 360)/ 180.0f);
|
||||||
|
GlmHelper::Normalize(dir);
|
||||||
|
GetMovement()->CalcTargetPos(60 + rand() % 200);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#ifdef DEBUG
|
||||||
|
if (!room->stop_world) {
|
||||||
|
agent_->Exec();
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
agent_->Exec();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hero::OnExplosionHit(Explosion* e)
|
void Hero::OnExplosionHit(Explosion* e)
|
||||||
|
@ -1297,11 +1297,10 @@ void Player::_CMRevive(f8::MsgHdr& hdr, const cs::CMRevive& msg)
|
|||||||
url_params->SetVal("num", 1);
|
url_params->SetVal("num", 1);
|
||||||
|
|
||||||
long long room_uuid = room->GetRoomUuid();
|
long long room_uuid = room->GetRoomUuid();
|
||||||
std::string account_id = account_id;
|
|
||||||
auto target_uniid = msg.target_uniid();
|
auto target_uniid = msg.target_uniid();
|
||||||
HttpProxy::Instance()->HttpGet
|
HttpProxy::Instance()->HttpGet
|
||||||
(
|
(
|
||||||
[room_uuid, account_id, target_uniid]
|
[room_uuid, account_id = account_id, target_uniid]
|
||||||
(bool ok, a8::XObject* rsp_obj, f8::HttpContext* ctx)
|
(bool ok, a8::XObject* rsp_obj, f8::HttpContext* ctx)
|
||||||
{
|
{
|
||||||
Room* room = RoomMgr::Instance()->GetRoomByUuid(room_uuid);
|
Room* room = RoomMgr::Instance()->GetRoomByUuid(room_uuid);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user