diff --git a/server/gameserver/car.cc b/server/gameserver/car.cc index 51aff8b..c30103d 100644 --- a/server/gameserver/car.cc +++ b/server/gameserver/car.cc @@ -411,6 +411,12 @@ void Car::DecOil(float dec_oil) { cur_oil_ -= dec_oil; cur_oil_ = std::max(0.0f, cur_oil_); + if (!HasOil()) { + if (driver_) { + driver_->SetAttackDir(a8::Vec2::RIGHT); + } + SetAttackDir(a8::Vec2::RIGHT); + } } float Car::GetMaxOil() diff --git a/server/gameserver/player.cc b/server/gameserver/player.cc index c5c2563..c289691 100644 --- a/server/gameserver/player.cc +++ b/server/gameserver/player.cc @@ -1037,7 +1037,7 @@ void Player::_CMMove(f8::MsgHdr& hdr, const cs::CMMove& msg) ) ){ if (!HasBuffEffect(kBET_Vertigo) && - !(GetCar() && GetCar()->HasBuffEffect(kBET_Vertigo))) { + !(GetCar() && (GetCar()->HasBuffEffect(kBET_Vertigo) || !GetCar()->HasOil()))) { a8::Vec2 attack_dir; TypeConvert::FromPb(attack_dir, &msg.attack_dir()); attack_dir.Normalize();