修复子弹发射时间问题

This commit is contained in:
aozhiwei 2019-04-11 18:59:57 +08:00
parent d86d5f6d2f
commit ad57cf3f2b

View File

@ -115,16 +115,16 @@ void Player::UpdateShot()
} }
if (shot_hold) { if (shot_hold) {
++series_shot_frames; ++series_shot_frames;
if (last_shot_frameno_ == 0 ||
(
(room->frame_no - last_shot_frameno_) * (1000 / SERVER_FRAME_RATE)) >
curr_weapon->meta->i->fire_rate()
) {
Shot();
}
if (series_shot_frames > 4) { if (series_shot_frames > 4) {
shot_hold = false; shot_hold = false;
series_shot_frames = 0; series_shot_frames = 0;
if (last_shot_frameno_ == 0 ||
(
(room->frame_no - last_shot_frameno_) * (1000 / SERVER_FRAME_RATE)) >
curr_weapon->meta->i->fire_rate()
) {
Shot();
}
} }
} }
} }