This commit is contained in:
aozhiwei 2022-09-02 10:30:05 +08:00
parent 221f7b47d4
commit 84057f9697

View File

@ -700,6 +700,7 @@ void Player::_CMReconnect(f8::MsgHdr& hdr, const cs::CMReconnect& msg)
AddToNewObjects(hum); AddToNewObjects(hum);
} }
); );
last_sync_gas_frameno = 0;
need_sync_active_player = true; need_sync_active_player = true;
cs::SMReconnect respmsg; cs::SMReconnect respmsg;
respmsg.set_errcode(0); respmsg.set_errcode(0);
@ -713,6 +714,21 @@ void Player::_CMReconnect(f8::MsgHdr& hdr, const cs::CMReconnect& msg)
hdr.socket_handle, hdr.socket_handle,
old_socket_handle old_socket_handle
}); });
{
room->xtimer.AddDeadLineTimerAndAttach
(SERVER_FRAME_RATE,
a8::XParams()
.SetSender(this),
[] (const a8::XParams& param)
{
Human* hum = (Human*)param.sender.GetUserData();
hum->SendUIUpdate();
},
&xtimer_attacher.timer_list_,
[] (const a8::XParams& param)
{
});
}
} }
void Player::_CMMove(f8::MsgHdr& hdr, const cs::CMMove& msg) void Player::_CMMove(f8::MsgHdr& hdr, const cs::CMMove& msg)