Some more precompiler things
This commit is contained in:
parent
9bea554b55
commit
2fcf568123
@ -15,4 +15,5 @@
|
|||||||
#define ENABLE_TEXTMODE_STDIN @EnableTextmodeStdin@
|
#define ENABLE_TEXTMODE_STDIN @EnableTextmodeStdin@
|
||||||
#define ENABLE_NULL_GRAPHICS @EnableNullGraphics@
|
#define ENABLE_NULL_GRAPHICS @EnableNullGraphics@
|
||||||
#define TEXTMODE @Textmode@
|
#define TEXTMODE @Textmode@
|
||||||
#define ENABLE_PROFILER @EnableProfiler@
|
#define ENABLE_PROFILER @EnableProfiler@
|
||||||
|
#define ENABLE_ONLINE @EnableOnlineFeatures@
|
||||||
|
@ -3,7 +3,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
#include "config.h"
|
||||||
|
#if ENABLE_ONLINE
|
||||||
#include <string>
|
#include <string>
|
||||||
#if ENABLE_VISUALS
|
#if ENABLE_VISUALS
|
||||||
#include <colors.hpp>
|
#include <colors.hpp>
|
||||||
@ -39,3 +40,4 @@ void update();
|
|||||||
|
|
||||||
user_data *getUserData(unsigned steamId);
|
user_data *getUserData(unsigned steamId);
|
||||||
} // namespace online
|
} // namespace online
|
||||||
|
#endif
|
||||||
|
@ -49,7 +49,7 @@ IgnoreReason shouldTargetSteamId(unsigned id)
|
|||||||
auto &pl = playerlist::AccessData(id);
|
auto &pl = playerlist::AccessData(id);
|
||||||
if (playerlist::IsFriendly(pl.state))
|
if (playerlist::IsFriendly(pl.state))
|
||||||
return IgnoreReason::LOCAL_PLAYER_LIST;
|
return IgnoreReason::LOCAL_PLAYER_LIST;
|
||||||
|
#if ENABLE_ONLINE
|
||||||
auto *co = online::getUserData(id);
|
auto *co = online::getUserData(id);
|
||||||
if (co)
|
if (co)
|
||||||
{
|
{
|
||||||
@ -67,7 +67,7 @@ IgnoreReason shouldTargetSteamId(unsigned id)
|
|||||||
if (co->is_developer)
|
if (co->is_developer)
|
||||||
return IgnoreReason::DEVELOPER;
|
return IgnoreReason::DEVELOPER;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
return IgnoreReason::DO_NOT_IGNORE;
|
return IgnoreReason::DO_NOT_IGNORE;
|
||||||
}
|
}
|
||||||
IgnoreReason shouldTarget(CachedEntity *entity)
|
IgnoreReason shouldTarget(CachedEntity *entity)
|
||||||
@ -93,11 +93,11 @@ bool shouldAlwaysRenderEspSteamId(unsigned id)
|
|||||||
auto &pl = playerlist::AccessData(id);
|
auto &pl = playerlist::AccessData(id);
|
||||||
if (pl.state != playerlist::k_EState::DEFAULT)
|
if (pl.state != playerlist::k_EState::DEFAULT)
|
||||||
return true;
|
return true;
|
||||||
|
#if ENABLE_ONLINE
|
||||||
auto *co = online::getUserData(id);
|
auto *co = online::getUserData(id);
|
||||||
if (co)
|
if (co)
|
||||||
return true;
|
return true;
|
||||||
|
#endif
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
bool shouldAlwaysRenderEsp(CachedEntity *entity)
|
bool shouldAlwaysRenderEsp(CachedEntity *entity)
|
||||||
@ -158,4 +158,4 @@ void onKilledBy(CachedEntity *entity)
|
|||||||
{
|
{
|
||||||
onKilledBy(entity->player_info.friendsID);
|
onKilledBy(entity->player_info.friendsID);
|
||||||
}
|
}
|
||||||
} // namespace player_tools
|
} // namespace player_tools
|
||||||
|
@ -29,7 +29,9 @@ DEFINE_HOOKED_METHOD(Paint, void, IEngineVGui *this_, PaintMode_t mode)
|
|||||||
#endif
|
#endif
|
||||||
hacks::shared::catbot::update();
|
hacks::shared::catbot::update();
|
||||||
hitrate::Update();
|
hitrate::Update();
|
||||||
|
#if ENABLE_ONLINE
|
||||||
online::update();
|
online::update();
|
||||||
|
#endif
|
||||||
#if ENABLE_IPC
|
#if ENABLE_IPC
|
||||||
static Timer nametimer{};
|
static Timer nametimer{};
|
||||||
if (nametimer.test_and_set(1000 * 10))
|
if (nametimer.test_and_set(1000 * 10))
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
/*
|
/*
|
||||||
Created on 23.06.18.
|
Created on 23.06.18.
|
||||||
*/
|
*/
|
||||||
|
#include "config.h"
|
||||||
|
#if ENABLE_ONLINE
|
||||||
#include <online/Online.hpp>
|
#include <online/Online.hpp>
|
||||||
#include <core/cvwrapper.hpp>
|
#include <core/cvwrapper.hpp>
|
||||||
|
|
||||||
@ -12,6 +13,7 @@
|
|||||||
|
|
||||||
#undef null
|
#undef null
|
||||||
|
|
||||||
|
|
||||||
#include <co/OnlineService.hpp>
|
#include <co/OnlineService.hpp>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <init.hpp>
|
#include <init.hpp>
|
||||||
@ -332,4 +334,5 @@ user_data *getUserData(unsigned steamId)
|
|||||||
// SteamID does not belong to online user
|
// SteamID does not belong to online user
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
} // namespace online
|
} // namespace online
|
||||||
|
#endif
|
||||||
|
Reference in New Issue
Block a user