Sardine bug fixes, new Hide and Seek player list

This commit is contained in:
Amethyst-szs 2022-11-03 11:58:07 -07:00
parent 1955d76bfc
commit f8eef7fb97
8 changed files with 26 additions and 16 deletions

View file

@ -6,7 +6,7 @@
SMOVER ?= 100
BUILDVER ?= 101
BUILDVERSTR ?= 1.0.1
IP ?= 192.168.0.8 # ftp server ip (usually is switch's local IP)
IP ?= 192.168.0.9 # ftp server ip (usually is switch's local IP)
DEBUGLOG ?= 0 # defaults to disable debug logger
SERVERIP ?= 0.0.0.0 # put debug logger server IP here
ISEMU ?= 0 # set to 1 to compile for emulators

View file

@ -15,8 +15,8 @@ struct SardineInfo : GameModeInfoBase {
bool mIsUseGravity = false;
bool mIsUseGravityCam = false;
bool mIsTether = true;
bool mIsTetherSnap = true;
bool mIsTether = false;
bool mIsTetherSnap = false;
GameTime mHidingTime;
};

Binary file not shown.

Binary file not shown.

View file

@ -89,11 +89,21 @@ void HideAndSeekIcon::exeWait() {
sead::BufferedSafeStringBase<char> playerList =
sead::BufferedSafeStringBase<char>(playerNameBuf, 0x200);
for (size_t i = 0; i < playerCount; i++) {
// Add your own name to the list at the top
playerList.appendWithFormat("%s %s\n", mInfo->mIsPlayerIt ? "&" : "%%", Client::instance()->getClientName());
// Add all it players to list
for(int i = 0; i < playerCount; i++){
PuppetInfo* curPuppet = Client::getPuppetInfo(i);
if (curPuppet && curPuppet->isConnected && (curPuppet->isIt == mInfo->mIsPlayerIt)) {
playerList.appendWithFormat("%s\n", curPuppet->puppetName);
}
if (curPuppet && curPuppet->isConnected && curPuppet->isIt)
playerList.appendWithFormat("%s %s\n", curPuppet->isIt ? "&" : "%%", curPuppet->puppetName);
}
// Add not it players to list
for(int i = 0; i < playerCount; i++){
PuppetInfo* curPuppet = Client::getPuppetInfo(i);
if (curPuppet && curPuppet->isConnected && !curPuppet->isIt)
playerList.appendWithFormat("%s %s\n", curPuppet->isIt ? "&" : "%%", curPuppet->puppetName);
}
al::setPaneStringFormat(this, "TxtPlayerList", playerList.cstr());

View file

@ -198,7 +198,7 @@ bool Client::startConnection() {
waitingForInitPacket = false;
}
mHeap->free(curPacket);
free(curPacket);
} else {
Logger::log("Recieve failed! Stopping Connection.\n");
@ -387,7 +387,7 @@ void Client::readFunc() {
break;
}
mHeap->free(curPacket);
free(curPacket);
}else { // if false, socket has errored or disconnected, so close the socket and end this thread.
Logger::log("Client Socket Encountered an Error! Errno: 0x%x\n", mSocket->socket_errno);

View file

@ -20,10 +20,10 @@ const sead::WFixedSafeString<0x200>* SardineConfigMenu::getStringData()
gamemodeConfigOptions->mBuffer[0].copy(u"Sardine Gravity On");
gamemodeConfigOptions->mBuffer[1].copy(u"Sardine Gravity Off");
gamemodeConfigOptions->mBuffer[2].copy(u"Enable Sardine Tether (Default)");
gamemodeConfigOptions->mBuffer[3].copy(u"Disable Sardine Tether");
gamemodeConfigOptions->mBuffer[4].copy(u"Enable Tether Snapping (Default)");
gamemodeConfigOptions->mBuffer[5].copy(u"Disable Tether Snapping");
gamemodeConfigOptions->mBuffer[2].copy(u"Enable Sardine Tether");
gamemodeConfigOptions->mBuffer[3].copy(u"Disable Sardine Tether (Default)");
gamemodeConfigOptions->mBuffer[4].copy(u"Enable Tether Snapping");
gamemodeConfigOptions->mBuffer[5].copy(u"Disable Tether Snapping (Default)");
return gamemodeConfigOptions->mBuffer;
}

View file

@ -173,8 +173,8 @@ void SardineMode::update()
mModeTimer->updateTimer();
// Tether snapping
if ((PlayerFunction::isPlayerDeadStatus(playerBase) || highPuppetDistance > pullDistanceMax) && mInfo->mIsIt && mInfo->mIsTetherSnap) {
// Tin detaching
if ((PlayerFunction::isPlayerDeadStatus(playerBase) || (highPuppetDistance > pullDistanceMax && mInfo->mIsTetherSnap && mInfo->mIsTether)) && mInfo->mIsIt) {
mInfo->mIsIt = false;
mModeTimer->disableTimer();
mModeLayout->showSolo();