fix: mark player as not a seeker when H&S is disabled

If a player is a seeker and then disables H&S, they should no longer be considered as a seeker by other players.
(Because staying as a seeker will kill hiders when touching them).
This commit is contained in:
Robin C. Ladiges 2023-06-23 04:18:41 +02:00
parent 4339847da5
commit 27b9a095f7
No known key found for this signature in database
GPG Key ID: B494D3DF92661B99
2 changed files with 5 additions and 1 deletions

View File

@ -622,7 +622,7 @@ void Client::sendTagInfPacket() {
packet->mUserID = sInstance->mUserID;
packet->isIt = hsMode->isPlayerIt();
packet->isIt = hsMode->isPlayerIt() && hsMode->isModeActive();
packet->minutes = curInfo->mHidingTime.mMinutes;
packet->seconds = curInfo->mHidingTime.mSeconds;

View File

@ -84,6 +84,8 @@ void HideAndSeekMode::begin() {
playGuideLyt->end();
GameModeBase::begin();
Client::sendTagInfPacket();
}
void HideAndSeekMode::end() {
@ -109,6 +111,8 @@ void HideAndSeekMode::end() {
playGuideLyt->appear();
GameModeBase::end();
Client::sendTagInfPacket();
}
void HideAndSeekMode::update() {