This commit is contained in:
aozhiwei 2022-08-03 14:38:06 +08:00
parent 139d0eeda7
commit 420b324c4f
4 changed files with 11 additions and 0 deletions

View File

@ -944,3 +944,8 @@ void Buff::ProcRemoveMachineGun()
{
RecoverHoldWeapons();
}
void Buff::ProcReserveMove()
{
}

View File

@ -78,6 +78,7 @@ class Buff
void ProcInWater();
void ProcRemoveInWater();
void ProcReserve();
void ProcReserveMove();
void ProcMachineGun();
void ProcRemoveMachineGun();

View File

@ -1439,6 +1439,7 @@ void Creature::ProcBuffEffect(Creature* caster, Buff* buff)
break;
case kBET_ReverseMove:
{
buff->ProcReserveMove();
}
break;
case kBET_MachineGun:

View File

@ -1830,6 +1830,10 @@ void Human::_InternalUpdateMove(float speed)
float ny = GetMoveDir().y * speed;
a8::Vec2 old_pos = GetPos();
if (HasBuffEffect(kBET_ReverseMove)) {
nx = -nx;
ny = -ny;
}
#if 1
SetPos(old_pos + a8::Vec2(nx, ny));
if (!CheckCollision()) {