This repository has been archived on 2024-06-01. You can view files and clone it, but cannot push or open issues or pull requests.
cathook/include/PlayerTools.hpp
Unnamed d2f1a508a2 Refactor shouldTarget{,SteamId}
Return true if we should target or false otherwise. Makes code shorter in a lot of places because value was tested only for DO_NOT_IGNORE
2019-01-26 01:42:22 +00:00

43 lines
766 B
C++

/*
Created on 23.06.18.
*/
#pragma once
#include "config.h"
#include <optional>
#if ENABLE_VISUALS
#include <colors.hpp>
#endif
class CachedEntity;
namespace player_tools
{
enum class IgnoreReason
{
DO_NOT_IGNORE,
IS_HOOVY,
IS_TAUNTING,
LOCAL_PLAYER_LIST,
ONLINE_NO_TARGET,
ONLINE_FRIENDLY_SOFTWARE,
DEVELOPER,
OTHER
};
bool shouldTargetSteamId(unsigned id);
bool shouldTarget(CachedEntity *player);
bool shouldAlwaysRenderEspSteamId(unsigned id);
bool shouldAlwaysRenderEsp(CachedEntity *entity);
#if ENABLE_VISUALS
std::optional<colors::rgba_t> forceEspColorSteamId(unsigned id);
std::optional<colors::rgba_t> forceEspColor(CachedEntity *entity);
#endif
void onKilledBy(CachedEntity *entity);
} // namespace player_tools