fix: send empty TagInf and CaptureInf on first connection
Because other players might still have old values saved in their puppet.
This commit is contained in:
parent
2bef6f796e
commit
f810e8f07d
|
@ -104,6 +104,21 @@ nn::Result SocketClient::init(const char* ip, u16 port) {
|
||||||
// on a reconnect, resend some maybe missing packets
|
// on a reconnect, resend some maybe missing packets
|
||||||
if (initPacket.conType == ConnectionTypes::RECONNECT) {
|
if (initPacket.conType == ConnectionTypes::RECONNECT) {
|
||||||
client->resendInitPackets();
|
client->resendInitPackets();
|
||||||
|
} else {
|
||||||
|
// empty TagInf
|
||||||
|
TagInf tagInf;
|
||||||
|
tagInf.mUserID = initPacket.mUserID;
|
||||||
|
tagInf.isIt = false;
|
||||||
|
tagInf.minutes = 0;
|
||||||
|
tagInf.seconds = 0;
|
||||||
|
tagInf.updateType = static_cast<TagUpdateType>(TagUpdateType::STATE | TagUpdateType::TIME);
|
||||||
|
send(&tagInf);
|
||||||
|
|
||||||
|
// empty CaptureInf
|
||||||
|
CaptureInf capInf;
|
||||||
|
capInf.mUserID = initPacket.mUserID;
|
||||||
|
strcpy(capInf.hackName, "");
|
||||||
|
send(&capInf);
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
|
Loading…
Reference in New Issue