aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBDKPlayer <fabian.stotz@yahoo.de>2020-03-15 13:59:01 +0100
committerBDKPlayer <fabian.stotz@yahoo.de>2020-03-15 13:59:01 +0100
commit27074de05971f1e9ac7ca95b6a7397af7427ce58 (patch)
treed54391f63f4b77c83d18d1e745f55e3ba1939683
parentd86765d54c5725d09dfb618811525498f647ff85 (diff)
Added: checkbox to skip all features for localplayer
-rw-r--r--Core.cpp12
-rw-r--r--Core.h1
2 files changed, 12 insertions, 1 deletions
diff --git a/Core.cpp b/Core.cpp
index aac450c..be27013 100644
--- a/Core.cpp
+++ b/Core.cpp
@@ -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
diff --git a/Core.h b/Core.h
index c775186..eb5e69c 100644
--- a/Core.h
+++ b/Core.h
@@ -9,6 +9,7 @@
class Unit;
class Core
{
+ bool skipLocalplayer = true;
public:
Core();
void OnPresent();