This commit is contained in:
aozhiwei 2019-07-10 11:47:37 +08:00
parent 8cfab4cf95
commit 1f04049994
2 changed files with 8 additions and 2 deletions

View File

@ -86,6 +86,9 @@ void AndroidAI::ChangeToState(AndroidState_e to_state)
void AndroidAI::DoMove() void AndroidAI::DoMove()
{ {
Human* hum = (Human*)owner; Human* hum = (Human*)owner;
if (hum->HasBuffEffect(BET_Vertigo) || hum->HasBuffEffect(BET_Dcgr)) {
return;
}
if (owner->updated_times % 2 == 0) { if (owner->updated_times % 2 == 0) {
Human* hum = (Human*)owner; Human* hum = (Human*)owner;
int speed = std::max(1, (int)hum->GetSpeed()); int speed = std::max(1, (int)hum->GetSpeed());
@ -110,6 +113,9 @@ void AndroidAI::DoAttack()
if (hum->room->gas_data.gas_mode == GasInactive) { if (hum->room->gas_data.gas_mode == GasInactive) {
return; return;
} }
if (hum->HasBuffEffect(BET_Vertigo) || hum->HasBuffEffect(BET_Dcgr)) {
return;
}
if (owner->updated_times % 10 == 0) { if (owner->updated_times % 10 == 0) {
Human* enemy = owner->room->FindEnemy((Human*)owner); Human* enemy = owner->room->FindEnemy((Human*)owner);
if (enemy && !enemy->HasBuffEffect(BET_Invincible) && !enemy->HasBuffEffect(BET_Hide)) { if (enemy && !enemy->HasBuffEffect(BET_Invincible) && !enemy->HasBuffEffect(BET_Hide)) {

View File

@ -99,7 +99,7 @@ void Player::UpdateMove()
if (action_type == AT_Relive) { if (action_type == AT_Relive) {
CancelAction(); CancelAction();
} }
if (dead) { if (dead || HasBuffEffect(BET_Vertigo) || HasBuffEffect(BET_Dcgr)) {
moving = false; moving = false;
moved_frames = 0; moved_frames = 0;
last_collision_door = nullptr; last_collision_door = nullptr;
@ -119,7 +119,7 @@ void Player::UpdateMove()
void Player::UpdateShot() void Player::UpdateShot()
{ {
if (dead) { if (dead || HasBuffEffect(BET_Vertigo) || HasBuffEffect(BET_Dcgr)) {
shot_start = false; shot_start = false;
shot_hold = false; shot_hold = false;
series_shot_frames = 0; series_shot_frames = 0;