@@ -125,73 +125,84 @@ namespace PlayersTab {
125125
126126 if (selectedPlayer.has_value () && selectedPlayers.size () == 1 ) // Upon first startup no player is selected. Also rare case where the playerdata is deleted before the next gui cycle
127127 {
128- bool isUsingMod = selectedPlayer.is_LocalPlayer () || State.modUsers .find (selectedPlayer.get_PlayerData ()->fields .PlayerId ) != State.modUsers .end ();
129- ImGui::Text (" Is using Modified Client: %s" , isUsingMod ? " Yes" : " No" );
130- if (isUsingMod)
131- ImGui::Text (" Client Name: %s" , selectedPlayer.is_LocalPlayer () ? " SickoMenu" : RemoveHtmlTags (State.modUsers .at (selectedPlayer.get_PlayerData ()->fields .PlayerId )).c_str ());
132- std::uint8_t playerId = selectedPlayer.get_PlayerData ()->fields .PlayerId ;
133- std::string playerIdText = std::format (" Player ID: {}" , playerId);
134- ImGui::Text (const_cast <char *>(playerIdText.c_str ()));
135- std::string friendCode = convert_from_string (selectedPlayer.get_PlayerData ()->fields .FriendCode );
136- std::string friendCodeText = std::format (" Friend Code: {}" , (!IsStreamerMode ()) ? friendCode : ((friendCode != " " ) ? friendCode.substr (0 , 1 ) + " ..." : " " ));
137- if (friendCode != " " ) {
138- ImGui::Text (const_cast <char *>(friendCodeText.c_str ()));
139- }
140- std::string puid = convert_from_string (selectedPlayer.get_PlayerData ()->fields .Puid );
141- std::string puidText = std::format (" PUID:\n {}" , (!IsStreamerMode ()) ? puid : ((puid != " " ) ? puid.substr (0 , 1 ) + " ..." : " " ));
142- if (puid != " " ) {
143- ImGui::Text (const_cast <char *>(puidText.c_str ()));
144- }
145- uint32_t playerLevel = selectedPlayer.get_PlayerData ()->fields .PlayerLevel + 1 ;
146- std::string levelText = std::format (" Level: {}" , playerLevel);
147- ImGui::Text (const_cast <char *>(levelText.c_str ()));
148- std::string platform = " Unknown" ;
149- auto client = app::InnerNetClient_GetClientFromCharacter ((InnerNetClient*)(*Game::pAmongUsClient), selectedPlayer.get_PlayerControl (), NULL );
150- if (GetPlayerControlById (selectedPlayer.get_PlayerData ()->fields .PlayerId )->fields ._ .OwnerId == client->fields .Id ) {
151- switch (client->fields .PlatformData ->fields .Platform ) {
152- case Platforms__Enum::StandaloneEpicPC:
153- platform = " Epic Games (PC)" ;
154- break ;
155- case Platforms__Enum::StandaloneSteamPC:
156- platform = " Steam (PC)" ;
157- break ;
158- case Platforms__Enum::StandaloneMac:
159- platform = " Mac" ;
160- break ;
161- case Platforms__Enum::StandaloneWin10:
162- platform = " Microsoft Store (PC)" ;
163- break ;
164- case Platforms__Enum::StandaloneItch:
165- platform = " itch.io (PC)" ;
166- break ;
167- case Platforms__Enum::IPhone:
168- platform = " iOS/iPadOS (Mobile)" ;
169- break ;
170- case Platforms__Enum::Android:
171- platform = " Android (Mobile)" ;
172- break ;
173- case Platforms__Enum::Switch:
174- platform = " Nintendo Switch (Console)" ;
175- break ;
176- case Platforms__Enum::Xbox:
177- platform = " Xbox (Console)" ;
178- break ;
179- case Platforms__Enum::Playstation:
180- platform = " Playstation (Console)" ;
181- break ;
182- default :
183- platform = " Unknown" ;
184- break ;
128+ if ((IsInMultiplayerGame () || IsInLobby ()) || (selectedPlayer.has_value () && selectedPlayer.is_LocalPlayer ())) {
129+ bool isUsingMod = selectedPlayer.is_LocalPlayer () || State.modUsers .find (selectedPlayer.get_PlayerData ()->fields .PlayerId ) != State.modUsers .end ();
130+ ImGui::Text (" Is using Modified Client: %s" , isUsingMod ? " Yes" : " No" );
131+ if (isUsingMod)
132+ ImGui::Text (" Client Name: %s" , selectedPlayer.is_LocalPlayer () ? " SickoMenu" : RemoveHtmlTags (State.modUsers .at (selectedPlayer.get_PlayerData ()->fields .PlayerId )).c_str ());
133+ std::uint8_t playerId = selectedPlayer.get_PlayerData ()->fields .PlayerId ;
134+ std::string playerIdText = std::format (" Player ID: {}" , playerId);
135+ ImGui::Text (const_cast <char *>(playerIdText.c_str ()));
136+ std::string friendCode = convert_from_string (selectedPlayer.get_PlayerData ()->fields .FriendCode );
137+ std::string friendCodeText = std::format (" Friend Code: {}" , (!IsStreamerMode ()) ? friendCode : ((friendCode != " " ) ? friendCode.substr (0 , 1 ) + " ..." : " " ));
138+ if (friendCode != " " ) {
139+ ImGui::Text (const_cast <char *>(friendCodeText.c_str ()));
140+ }
141+ std::string puid = convert_from_string (selectedPlayer.get_PlayerData ()->fields .Puid );
142+ std::string puidText = std::format (" PUID:\n {}" , (!IsStreamerMode ()) ? puid : ((puid != " " ) ? puid.substr (0 , 1 ) + " ..." : " " ));
143+ if (puid != " " ) {
144+ ImGui::Text (const_cast <char *>(puidText.c_str ()));
145+ }
146+ uint32_t playerLevel = selectedPlayer.get_PlayerData ()->fields .PlayerLevel + 1 ;
147+ std::string levelText = std::format (" Level: {}" , playerLevel);
148+ ImGui::Text (const_cast <char *>(levelText.c_str ()));
149+ std::string platform = " Unknown" ;
150+ auto client = app::InnerNetClient_GetClientFromCharacter ((InnerNetClient*)(*Game::pAmongUsClient), selectedPlayer.get_PlayerControl (), NULL );
151+ if (GetPlayerControlById (selectedPlayer.get_PlayerData ()->fields .PlayerId )->fields ._ .OwnerId == client->fields .Id ) {
152+ switch (client->fields .PlatformData ->fields .Platform ) {
153+ case Platforms__Enum::StandaloneEpicPC:
154+ platform = " Epic Games (PC)" ;
155+ break ;
156+ case Platforms__Enum::StandaloneSteamPC:
157+ platform = " Steam (PC)" ;
158+ break ;
159+ case Platforms__Enum::StandaloneMac:
160+ platform = " Mac" ;
161+ break ;
162+ case Platforms__Enum::StandaloneWin10:
163+ platform = " Microsoft Store (PC)" ;
164+ break ;
165+ case Platforms__Enum::StandaloneItch:
166+ platform = " itch.io (PC)" ;
167+ break ;
168+ case Platforms__Enum::IPhone:
169+ platform = " iOS/iPadOS (Mobile)" ;
170+ break ;
171+ case Platforms__Enum::Android:
172+ platform = " Android (Mobile)" ;
173+ break ;
174+ case Platforms__Enum::Switch:
175+ platform = " Nintendo Switch (Console)" ;
176+ break ;
177+ case Platforms__Enum::Xbox:
178+ platform = " Xbox (Console)" ;
179+ break ;
180+ case Platforms__Enum::Playstation:
181+ platform = " Playstation (Console)" ;
182+ break ;
183+ default :
184+ platform = " Unknown" ;
185+ break ;
186+ }
185187 }
188+ std::string platformText = std::format (" Platform: {}" , platform);
189+ ImGui::Text (platformText.c_str ());
190+ uint64_t psnId = client->fields .PlatformData ->fields .PsnPlatformId ;
191+ std::string psnText = std::format (" PSN Platform ID: {}" , psnId);
192+ if (psnId != 0 ) ImGui::Text (const_cast <char *>(psnText.c_str ()));
193+ uint64_t xboxId = client->fields .PlatformData ->fields .XboxPlatformId ;
194+ std::string xboxText = std::format (" Xbox Platform ID: {}" , xboxId);
195+ if (xboxId != 0 ) ImGui::Text (const_cast <char *>(xboxText.c_str ()));
196+ }
197+ else {
198+ ImGui::Text (" Is using Modified Client: No" );
199+ std::uint8_t playerId = selectedPlayer.get_PlayerData ()->fields .PlayerId ;
200+ std::string playerIdText = std::format (" Player ID: {}" , playerId);
201+ ImGui::Text (const_cast <char *>(playerIdText.c_str ()));
202+ uint32_t playerLevel = selectedPlayer.get_PlayerData ()->fields .PlayerLevel + 1 ;
203+ std::string levelText = std::format (" Level: {}" , playerLevel);
204+ ImGui::Text (const_cast <char *>(levelText.c_str ()));
186205 }
187- std::string platformText = std::format (" Platform: {}" , platform);
188- ImGui::Text (platformText.c_str ());
189- uint64_t psnId = client->fields .PlatformData ->fields .PsnPlatformId ;
190- std::string psnText = std::format (" PSN Platform ID: {}" , psnId);
191- if (psnId != 0 ) ImGui::Text (const_cast <char *>(psnText.c_str ()));
192- uint64_t xboxId = client->fields .PlatformData ->fields .XboxPlatformId ;
193- std::string xboxText = std::format (" Xbox Platform ID: {}" , xboxId);
194- if (xboxId != 0 ) ImGui::Text (const_cast <char *>(xboxText.c_str ()));
195206 }
196207
197208 ImGui::EndChild ();
@@ -679,7 +690,7 @@ namespace PlayersTab {
679690 {
680691 if (ImGui::Button (" Reset Impersonation" ))
681692 {
682- ResetOriginalAppearance ( );
693+ ControlAppearance ( false );
683694 }
684695 }
685696
@@ -869,14 +880,14 @@ namespace PlayersTab {
869880
870881 if ((IsInGame () || IsInLobby ()) && selectedPlayer.has_value () && selectedPlayers.size () == 1 )
871882 {
872- if (( State.playerToAttach . equals (State. selectedPlayer ) && State.ActiveAttach ) || ( selectedPlayer.is_LocalPlayer () && selectedPlayer. has_value ())) {
883+ if (State.ActiveAttach && selectedPlayer. has_value ( ) && ( State.playerToAttach . equals (State. selectedPlayer ) || selectedPlayer.is_LocalPlayer ())) {
873884 if (ImGui::Button (" Stop Attaching" )) {
874885 State.playerToAttach = {};
875886 State.ActiveAttach = false ;
876887 }
877888 }
878889 else {
879- if (ImGui::Button (" Attach To" ) && !selectedPlayer. is_LocalPlayer ( )) {
890+ if (!selectedPlayer. is_LocalPlayer () && ImGui::Button (" Attach To" )) {
880891 State.playerToAttach = State.selectedPlayer ;
881892 State.ActiveAttach = true ;
882893 }
0 commit comments