This commit is contained in:
aozhiwei 2023-03-07 15:34:17 +08:00
parent a4afec4b0c
commit d8e74ae1f6
2 changed files with 4 additions and 1 deletions

View File

@ -3461,6 +3461,9 @@ void Human::CalcAssists(Human* target)
void Human::SyncVolume(int slot_id) void Human::SyncVolume(int slot_id)
{ {
if (room->GetFrameNo() - join_frameno < SERVER_FRAME_RATE * 1) {
return;
}
if (slot_id < 0) { if (slot_id < 0) {
for (int i = 0; i < IS_END; ++i) { for (int i = 0; i < IS_END; ++i) {
if (volume_[i] > 0) { if (volume_[i] > 0) {

View File

@ -116,7 +116,7 @@ void Player::Initialize()
} }
{ {
room->xtimer.SetTimeoutEx room->xtimer.SetTimeoutEx
(SERVER_FRAME_RATE * 2, (SERVER_FRAME_RATE * 6,
[this] (int event, const a8::Args* args) [this] (int event, const a8::Args* args)
{ {
if (a8::TIMER_EXEC_EVENT == event) { if (a8::TIMER_EXEC_EVENT == event) {