This commit is contained in:
aozhiwei 2021-10-28 15:54:53 +08:00
parent d8fc809373
commit 1cfeffe3f8
2 changed files with 15 additions and 5 deletions

View File

@ -1655,10 +1655,20 @@ void Creature::Shot(a8::Vec2& target_dir, bool& shot_ok, float fly_distance)
CancelAction();
}
if ((room->GetFrameNo() - last_shot_frameno_) * (1000 / SERVER_FRAME_RATE) <
GetCurrWeapon()->GetAttrValue(kHAT_FireRate)
) {
return;
if (IsCar()) {
if (room->GetFrameNo() - last_shot_frameno_ > 0) {
if ((room->GetFrameNo() - last_shot_frameno_) * (1000 / SERVER_FRAME_RATE) <
GetCurrWeapon()->GetAttrValue(kHAT_FireRate)
) {
return;
}
}
} else {
if ((room->GetFrameNo() - last_shot_frameno_) * (1000 / SERVER_FRAME_RATE) <
GetCurrWeapon()->GetAttrValue(kHAT_FireRate)
) {
return;
}
}
if (GetCurrWeapon()->meta->power_charge.empty() || power_idx < 0) {

View File

@ -3806,7 +3806,7 @@ void Room::AirRaid(int airraid_id)
}
}
}
#if 0
#ifdef DEBUG
if (humans.size() > 0) {
center = humans[0]->GetPos();
}