This commit is contained in:
aozhiwei 2022-11-29 19:47:32 +08:00
parent 9f9e92e3da
commit 5a1915fde5

View File

@ -2027,6 +2027,9 @@ void Human::_UpdateMove(int speed)
void Human::_InternalUpdateMove(float speed) void Human::_InternalUpdateMove(float speed)
{ {
#ifdef MAP3D
room->grid_service->MoveCreature(this);
#else
float nx = GetMoveDir().x * speed; float nx = GetMoveDir().x * speed;
float ny = GetMoveDir().y * speed; float ny = GetMoveDir().y * speed;
a8::Vec2 old_pos = GetPos(); a8::Vec2 old_pos = GetPos();
@ -2038,7 +2041,6 @@ void Human::_InternalUpdateMove(float speed)
if (HasBuffEffect(kBET_Hide)) { if (HasBuffEffect(kBET_Hide)) {
RemoveBuffByEffectId(kBET_Hide); RemoveBuffByEffectId(kBET_Hide);
} }
#if 1
SetPos(old_pos + a8::Vec2(nx, ny)); SetPos(old_pos + a8::Vec2(nx, ny));
if (!CheckCollision()) { if (!CheckCollision()) {
room->grid_service->MoveCreature(this); room->grid_service->MoveCreature(this);
@ -2066,7 +2068,6 @@ void Human::_InternalUpdateMove(float speed)
} }
} }
} }
#endif
if (a8::HasBitFlag(status, CS_Collisioning)) { if (a8::HasBitFlag(status, CS_Collisioning)) {
SetPos(old_pos); SetPos(old_pos);
return; return;
@ -2100,6 +2101,7 @@ void Human::_InternalUpdateMove(float speed)
SetPos(old_pos + a8::Vec2(nx, ny)); SetPos(old_pos + a8::Vec2(nx, ny));
room->grid_service->MoveCreature(this); room->grid_service->MoveCreature(this);
#endif
} }
void Human::GenBattleReportData(a8::MutableXObject* params) void Human::GenBattleReportData(a8::MutableXObject* params)