mirror of
https://github.com/Auties00/Reboot-Launcher.git
synced 2026-01-13 19:22:22 +01:00
<feat: New project structure>
<feat: New release>
This commit is contained in:
53
dependencies/reboot/Project Reboot 3.0/anticheat.h
vendored
Normal file
53
dependencies/reboot/Project Reboot 3.0/anticheat.h
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
// I don't even know what this is.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "inc.h"
|
||||
#include <unordered_map>
|
||||
#include "Object.h"
|
||||
|
||||
enum class Severity
|
||||
{
|
||||
LOW, // Could be commonly false, most likely due to lag.
|
||||
MEDIUM, // Extreme rare cases this is a false.
|
||||
HIGH // Not possible to be false, only happens with modification of client.
|
||||
};
|
||||
|
||||
class AnticheatComponent
|
||||
{
|
||||
public:
|
||||
UObject* Owner;
|
||||
int AmountOfLowWarnings;
|
||||
int AmountOfMediumWarnings;
|
||||
int AmountOfHighWarnings;
|
||||
|
||||
void Kick()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool IsCheater()
|
||||
{
|
||||
if (AmountOfHighWarnings >= 3)
|
||||
{
|
||||
Kick();
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool AddAndCheck(Severity severity)
|
||||
{
|
||||
if (severity == Severity::LOW)
|
||||
AmountOfLowWarnings++;
|
||||
if (severity == Severity::MEDIUM)
|
||||
AmountOfMediumWarnings++;
|
||||
if (severity == Severity::LOW)
|
||||
AmountOfHighWarnings++;
|
||||
|
||||
return IsCheater();
|
||||
}
|
||||
};
|
||||
|
||||
// std::unordered_map<UObject*, AnticheatComponent> AnticheatComponents;
|
||||
Reference in New Issue
Block a user