Official site anti-cheat Ultra Core Protector

Home Download F.A.Q. Addons Monitor Forum Support Advertise English version site UCP Anti-Cheat    Russian version site UCP Anti-Cheat
Ultra Core Protector - is the client-server anti-cheat freeware, for server protection from unscrupulous players.

Abilities Supported games  
Half-Life
Condition Zero
Counter-Strike 1.6
Day of Defeat
Adrenaline Gamer
Team Fortress Classic
Counter-Strike Source
MU Online
Ragnarok Online
Half-Life 2 Deathmatch
Adrenaline Gamer 2
Team Fortress 2
CSGO: Resolver Causing Players to Flicker and Crashes Game

Hello. I recently decided to try and create a delta resolver with some more merit to it. Here it is (I can delete it if it is bad):

static short si_oldMaxPlayers = Interfaces::Engine->GetMaxClients();
float *fl_movingLBY = new float[si_oldMaxPlayers];
float *fl_brokenLBY = new float[si_oldMaxPlayers];
float *fl_previousBrokenLBY = new float[si_oldMaxPlayers];
float *fl_deltaAngle = new float[si_oldMaxPlayers];
float *fl_previousDelta = new float[si_oldMaxPlayers];
float *fl_hitAngle = new float[si_oldMaxPlayers];
float *fl_missedAngle = new float[si_oldMaxPlayers];
short *si_isMoving = new short[si_oldMaxPlayers]; //0 = Moving, 1 = Fakewalking, 2 = Still

//These are seperate because it makes them easier to track
bool *b_isMovingHasValue = new bool[si_oldMaxPlayers];
bool *b_brokenLBYHasValue = new bool[si_oldMaxPlayers];
bool *b_previousDeltaHasValue = new bool[si_oldMaxPlayers];
bool *b_previousBrokenLBYHasValue = new bool[si_oldMaxPlayers];
bool *b_movingLBYHasValue = new bool[si_oldMaxPlayers];
bool *b_hitAngleHasValue = new bool[si_oldMaxPlayers];
bool *b_missedAngleHasValue = new bool[si_oldMaxPlayers];

static bool b_runOnce = false;
if (!b_runOnce) {
for (int i = 0; i < si_oldMaxPlayers; i++) { //You can add other variables in here if you want b_isMovingHasValue[i] = false; b_brokenLBYHasValue[i] = false; b_previousDeltaHasValue[i] = false; b_previousBrokenLBYHasValue[i] = false; b_movingLBYHasValue[i] = false; b_hitAngleHasValue[i] = false; b_missedAngleHasValue[i] = false; } b_runOnce = true; } if (si_oldMaxPlayers != Interfaces::Engine->GetMaxClients()) {
ResizeArray(fl_movingLBY, Interfaces::Engine->GetMaxClients());
ResizeArray(fl_brokenLBY, Interfaces::Engine->GetMaxClients());
ResizeArray(fl_previousBrokenLBY, Interfaces::Engine->GetMaxClients());
ResizeArray(fl_deltaAngle, Interfaces::Engine->GetMaxClients());
ResizeArray(fl_previousDelta, Interfaces::Engine->GetMaxClients());
ResizeArray(fl_hitAngle, Interfaces::Engine->GetMaxClients());
ResizeArray(fl_missedAngle, Interfaces::Engine->GetMaxClients());
ResizeArray(si_isMoving, Interfaces::Engine->GetMaxClients());

//Booleans
ResizeArray(b_isMovingHasValue, Interfaces::Engine->GetMaxClients());
ResizeArray(b_brokenLBYHasValue, Interfaces::Engine->GetMaxClients());
ResizeArray(b_previousDeltaHasValue, Interfaces::Engine->GetMaxClients());
ResizeArray(b_previousBrokenLBYHasValue, Interfaces::Engine->GetMaxClients());
ResizeArray(b_movingLBYHasValue, Interfaces::Engine->GetMaxClients());
ResizeArray(b_hitAngleHasValue, Interfaces::Engine->GetMaxClients());
ResizeArray(b_missedAngleHasValue, Interfaces::Engine->GetMaxClients());

if (si_oldMaxPlayers < Interfaces::Engine->GetMaxClients()) { //The resize function deletes and recreates the array, so we don't need to account for if the oldMaxPlayers is > than current max players
for (int i = si_oldMaxPlayers; i < Interfaces::Engine->GetMaxClients(); i++) {
b_isMovingHasValue[i] = false;
b_brokenLBYHasValue[i] = false;
b_previousDeltaHasValue[i] = false;
b_previousBrokenLBYHasValue[i] = false;
b_movingLBYHasValue[i] = false;
b_hitAngleHasValue[i] = false;
b_missedAngleHasValue[i] = false;
}
}

si_oldMaxPlayers = Interfaces::Engine->GetMaxClients();
}

for (int i = 0; i < si_oldMaxPlayers; i++) { //Replace BAIM Velocity with 36 if you want if (abs(pEntity->GetVelocity().Length()) > Menu::Window.RageBotTab.BAIMVelocity.GetValue() && pEntity->GetFlags() &FL_ONGROUND) { //Set Variables
si_isMoving[i] = 0;
b_isMovingHasValue[i] = true;
}
else {
if (abs(pEntity->GetVelocity().Length()) <= Menu::Window.RageBotTab.BAIMVelocity.GetValue() && abs(pEntity->GetVelocity().Length()) > 0.1 && pEntity->GetFlags() &FL_ONGROUND) {
si_isMoving[i] = 1;
b_isMovingHasValue[i] = true;
}
else {
if (pEntity->GetFlags() &FL_ONGROUND) {
si_isMoving[i] = 2;
b_isMovingHasValue[i] = true;
}
else {
si_isMoving[i] = 3;
b_isMovingHasValue[i] = true;
}
}
}

if (si_isMoving[i] == 0) { //Moving
b_movingLBYHasValue[i] = true;
fl_movingLBY[i] = *pEntity->GetLowerBodyYawTarget();
pEntity->GetEyeAnglesXY()->y = fl_movingLBY[i];
}
else {
if (b_hitAngleHasValue[i]) {
pEntity->GetEyeAnglesXY()->y = fl_hitAngle[i];
}
else {
if (si_isMoving[i] == 1) { //Fake Walking
if (b_previousBrokenLBYHasValue[i] && fl_previousBrokenLBY[i] != *pEntity->GetLowerBodyYawTarget()) {
pEntity->GetEyeAnglesXY()->y = *pEntity->GetLowerBodyYawTarget();
}
else {
b_brokenLBYHasValue[i] = true;
fl_brokenLBY[i] = *pEntity->GetLowerBodyYawTarget();
fl_deltaAngle[i] = pEntity->GetEyeAnglesXY()->y + (pEntity->GetEyeAnglesXY()->y - *pEntity->GetLowerBodyYawTarget()); //Credits to Omsium

if (b_missedAngleHasValue[i]) {
if (fl_deltaAngle[i] != fl_missedAngle[i]) {
pEntity->GetEyeAnglesXY()->y = fl_deltaAngle[i];
}
else {
if (fl_deltaAngle > 0) //Flip
fl_deltaAngle[i] -= 180;
else
fl_deltaAngle[i] += 180;

pEntity->GetEyeAnglesXY()->y = fl_deltaAngle[i];
CRageBot HitscanBAIM; //>tfw ayyware doesn't make ragebot members static or have an extern object (I'm too lazy to make one)
HitscanBAIM.HitScan(pEntity, true); //The second paramter ensures that only the pelvis is aimed at.
}
}
else {
pEntity->GetEyeAnglesXY()->y = fl_deltaAngle[i];
}
}
}
else {
if (si_isMoving[i] == 2) { //On ground and still
fl_deltaAngle[i] = pEntity->GetEyeAnglesXY()->y + (pEntity->GetEyeAnglesXY()->y - *pEntity->GetLowerBodyYawTarget()); //Credits to Omsium
if (b_missedAngleHasValue[i]) {
if (fl_deltaAngle[i] != fl_missedAngle[i]) {
pEntity->GetEyeAnglesXY()->y = fl_deltaAngle[i];
}
else {
if (b_movingLBYHasValue[i]) {
pEntity->GetEyeAnglesXY()->y = fl_movingLBY[i];
}
else {
if (fl_deltaAngle > 0) //Flip
fl_deltaAngle[i] -= 180;
else
fl_deltaAngle[i] += 180;

pEntity->GetEyeAnglesXY()->y = fl_deltaAngle[i];
}
}
}
else {
pEntity->GetEyeAnglesXY()->y = fl_deltaAngle[i];
}
}
else { //In air
if (b_missedAngleHasValue[i]) {
if (b_movingLBYHasValue[i] && fl_movingLBY[i] != fl_missedAngle[i]) {
pEntity->GetEyeAnglesXY()->y = fl_movingLBY[i];
}
else {
fl_deltaAngle[i] = pEntity->GetEyeAnglesXY()->y + (pEntity->GetEyeAnglesXY()->y - *pEntity->GetLowerBodyYawTarget()); //Credits to Omsium
pEntity->GetEyeAnglesXY()->y = fl_deltaAngle[i];
}
}
else {
pEntity->GetEyeAnglesXY()->y = fl_movingLBY[i];
}
}
}
}
}

if (b_isMovingHasValue[i] && si_isMoving[i] == 1)
fl_previousBrokenLBY[i] = fl_brokenLBY[i];

if (didhitHS) {
fl_hitAngle[i] = pEntity->GetEyeAnglesXY()->y;
b_hitAngleHasValue[i] = true;

if (b_missedAngleHasValue[i] && fl_missedAngle[i] == pEntity->GetEyeAnglesXY()->y)
b_missedAngleHasValue[i] = false;
}
else {
if (!didhit) {
b_missedAngleHasValue[i] = true;
fl_missedAngle[i] = pEntity->GetEyeAnglesXY()->y;
}
}
}

I have diagnosed the issue down to the resolver, I just don’t know precisely what it is. Thank you for any assistance you can offer. I am open to any and all feedback.

EDIT: Forgot the resize functions:

inline void ResizeArray(float *fl_Array, short si_newSize) {
float *fl_ArrayClone = fl_Array;
delete[] fl_Array;
fl_Array = new float[si_newSize];

for (int i = 0; i < sizeof(fl_ArrayClone) / sizeof(float); i++) fl_Array[i] = fl_ArrayClone[i]; //We want to keep data. delete[] fl_ArrayClone; } inline void ResizeArray(bool *b_Array, short si_newSize) { bool *b_ArrayClone = b_Array; delete[] b_Array; b_Array = new bool[si_newSize]; for (int i = 0; i < sizeof(b_ArrayClone) / sizeof(bool); i++) b_Array[i] = b_ArrayClone[i]; //We want to keep data. delete[] b_ArrayClone; } inline void ResizeArray(short *si_Array, short si_newSize) { short *si_ArrayClone = si_Array; delete[] si_Array; si_Array = new short[si_newSize]; for (int i = 0; i < sizeof(si_ArrayClone) / sizeof(short); i++) si_Array[i] = si_ArrayClone[i]; //We want to keep data. delete[] si_ArrayClone; }


 



Home | Download | F.A.Q. | Addons | Forum | Banners | Sitemap | Directory | Support
Copyright © 2008-2015 UCP. All rights reserved. Privacy Policy. Siter.