This commit is contained in:
aozhiwei 2021-10-22 15:06:19 +08:00
parent 9ec6455b7c
commit 87750e34e7
2 changed files with 6 additions and 1 deletions

View File

@ -808,7 +808,8 @@ void Buff::ProcInWater()
return;
}
Human* hum = buff->owner->AsHuman();
if (hum->GetOxygen() < MetaMgr::Instance()->dive_oxygen_total) {
if (!hum->HasBuffEffect(kBET_Dive) &&
hum->GetOxygen() < MetaMgr::Instance()->dive_oxygen_total) {
hum->AddOxygen(MetaMgr::Instance()->inwater_oxygen_recover);
hum->room->frame_event.AddPropChg(hum->GetWeakPtrRef(),
kPropDive,

View File

@ -3835,6 +3835,10 @@ void Human::DoDive()
if (HasBuffEffect(kBET_Dive)) {
return;
}
if (HasBuffEffect(kBET_Driver) ||
HasBuffEffect(kBET_Passenger)) {
return;
}
if (HasBuffEffect(kBET_Camouflage) ) {
RemoveBuffByEffectId(kBET_Camouflage);
}