修复机甲子弹问题

This commit is contained in:
aozhiwei 2021-10-28 15:20:32 +08:00
parent 73d5f8125a
commit d8fc809373

View File

@ -731,6 +731,10 @@ void Buff::CalcPassengerShotOffset()
if (meta->i->buff_effect() == kBET_Passenger && caster_.Get()->IsHuman()) {
Human* hum = (Human*)caster_.Get();
if (hum->GetCar() && hum->GetCar()->GetCurrWeapon()) {
{
//换座位时清除之前的状态
RecoverHoldWeapons();
}
hold_weapons_.push_back(hum->weapons[hum->GetCar()->GetCurrWeapon()->weapon_idx]);
hum->weapons[hum->GetCar()->GetCurrWeapon()->weapon_idx] = *hum->GetCar()->GetCurrWeapon();
hum->SetCurrWeapon(&hum->weapons[hum->GetCar()->GetCurrWeapon()->weapon_idx]);