diff options
author | BDKPlayer <fabian.stotz@yahoo.de> | 2020-03-15 13:59:01 +0100 |
---|---|---|
committer | BDKPlayer <fabian.stotz@yahoo.de> | 2020-03-15 13:59:01 +0100 |
commit | 27074de05971f1e9ac7ca95b6a7397af7427ce58 (patch) | |
tree | d54391f63f4b77c83d18d1e745f55e3ba1939683 | |
parent | d86765d54c5725d09dfb618811525498f647ff85 (diff) |
Added: checkbox to skip all features for localplayer
-rw-r--r-- | Core.cpp | 12 | ||||
-rw-r--r-- | Core.h | 1 |
2 files changed, 12 insertions, 1 deletions
@@ -124,6 +124,10 @@ void Core::OnPresent() { continue; } + if (skipLocalplayer && player == Engine::Get()->GetLocalPlayer()) + { + continue; + } FeatureManager::Get()->OnPlayerIteration(player, i); for (int j = 0; j < player->pObjectManager->Count; j++) { @@ -153,9 +157,15 @@ void Core::OnPresent() ImGui::Text("ScreenPos %f %f %f", mainScreen->pGameScreen->pMainView->ScreenPosX, mainScreen->pGameScreen->pMainView->ScreenPosY, mainScreen->pGameScreen->pMainView->ScreenPosZ); for (int i = 0; i <= totalPlayers; i++) { - createPlayerTreeNode(playerArray->playerData[i].player, i); + Player* currentPlayer = playerArray->playerData[i].player; + if (skipLocalplayer && currentPlayer == Engine::Get()->GetLocalPlayer()) + { + continue; + } + createPlayerTreeNode(currentPlayer, i); } FeatureManager::Get()->OnMenuMainWindow(); + ImGui::Checkbox("Skip localplayer", &skipLocalplayer); } } __finally @@ -9,6 +9,7 @@ class Unit; class Core { + bool skipLocalplayer = true; public: Core(); void OnPresent(); |