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
KZ hack 101xD source code (without strafehelper)

//=================================================================================================================//

void UpdatePlayerMoveVars(struct playermove_s* ppmove)

{
gEngfuncs.pEventAPI->EV_LocalPlayerViewheight(me.vEye);
me.vEye = me.vEye + ppmove->origin;
me.iFlags = ppmove->flags;
me.vOrigin = ppmove->origin;
me.flXYspeed = sqrt(POW(ppmove->velocity[0]) + POW(ppmove->velocity[1]));
me.vVelocity = ppmove->velocity;
me.iWaterLevel = ppmove->waterlevel;
me.flMaxSpeed = ppmove->maxspeed;
me.iUseHull=ppmove->usehull;
me.flZspeed = (ppmove->velocity[2] != 0) ? -ppmove->velocity[2] : 0;
me.flFallSpeed = ppmove->flFallVelocity;
me.fOnLadder = ppmove->movetype == 5;
me.fAngleSpeed = (me.vAngles)[1]-(ppmove->angles)[1];
while(me.fAngleSpeed<-180){me.fAngleSpeed+=360;} while(me.fAngleSpeed>180){me.fAngleSpeed-=360;}
me.vAngles = ppmove->angles;

Vector vel = ppmove->velocity;
me.fVSpeed = vel.Length();

float fYaw = ppmove->angles[1]*(3.1415/180.0);
me.fsin_yaw = sin(fYaw);
me.fminus_cos_yaw = -cos(fYaw);

Vector vTemp1 = me.vOrigin;
vTemp1[2] -= 8192;
pmtrace_t *trace = gEngfuncs.PM_TraceLine(me.vOrigin, vTemp1, 1, ppmove->usehull, -1);
me.flHeight=abs(trace->endpos.z - me.vOrigin.z);

if(me.flHeight <= 60) me.flGroundAngle=acos(trace->plane.normal[2])/M_PI*180;
else me.flGroundAngle = 0;

Vector vTemp2=trace->endpos;
pmtrace_t pTrace;
gEngfuncs.pEventAPI->EV_SetTraceHull( ppmove->usehull );
gEngfuncs.pEventAPI->EV_PlayerTrace( me.vOrigin, vTemp2,
PM_GLASS_IGNORE | PM_STUDIO_BOX, me.iIndex, &pTrace );
if( pTrace.fraction < 1.0f ) { me.flHeight=abs(pTrace.endpos.z - me.vOrigin.z); int ind=gEngfuncs.pEventAPI->EV_IndexFromTrace(&pTrace);
if(ind>0&&ind<33) { float dst=me.vOrigin.z-(me.iUseHull==0?32:18)-vPlayers[ind].vOrigin.z-me.flHeight; if(dst<30) { me.flHeight-=14.0; } } } } //=================================================================================================================// /* void SlowDownSleep(struct usercmd_s *cmd, float fNeedSpeed) { if(!pPlayerMove) return; float redspeed = me_fSpeed - fNeedSpeed; float degspeed = atan2(pPlayerMove->velocity[1], pPlayerMove->velocity[0]);

if(degspeed < 0) degspeed += (M_PI * 2.0f); if(redspeed < 30.0f) redspeed = (300.0f / pPlayerMove->movevars->airaccelerate);

cmd->forwardmove = -redspeed * cos(cmd->viewangles.y * M_PI / 180.0f - degspeed);
cmd->sidemove = -redspeed * sin(cmd->viewangles.y * M_PI / 180.0f - degspeed);
}*/

//=================================================================================================================//

/*inline*/ float __fastcall GroundDistance()
{
Vector vTemp = me.vOrigin;
vTemp[2] -= 8192;
pmtrace_t *trace = gEngfuncs.PM_TraceLine(me.vOrigin, vTemp, 1, 0, -1);
vec3_t vDistance = (vTemp - me.vOrigin) * trace->fraction;
return -vDistance[2];
}

//=================================================================================================================//

/*
vec3_t SmoothenMovement(vec3_t vOrigin,vec3_t vPrevOrigin,float flCurrentTime,float flTime,float flPrevTime)
{
vec3_t vPos=vOrigin-vPrevOrigin;
float flInterp=cvar.esp_far_smooth->value;
if(flTime-flPrevTime+flTime>flCurrentTime)
flInterp-=((flTime-flPrevTime+flTime-flCurrentTime)/(flTime-flPrevTime));
return(vOrigin+vPos*flInterp);
}*/

//=================================================================================================================//

void FixedMoves(float frametime,struct usercmd_s *cmd)
{
if(cvar.fixedyaw || cvar.fixedpitch)
{
cl_entity_t *pLocal;
Vector viewforward, viewright, viewup, aimforward, aimright, aimup, vTemp;
float newforward, newright, newup, fTime;
float forward = cmd->forwardmove;
float right = cmd->sidemove;
float up = cmd->upmove;

pLocal = gEngfuncs.GetLocalPlayer();
if(!pLocal)
return;

if(pLocal->curstate.movetype == MOVETYPE_WALK)
{
gEngfuncs.pfnAngleVectors(Vector(0.0f, cmd->viewangles.y, 0.0f), viewforward, viewright, viewup);
}
else
{
gEngfuncs.pfnAngleVectors(cmd->viewangles, viewforward, viewright, viewup);
}

//SPINMODEL
int iHasShiftHeld = GetAsyncKeyState(VK_LSHIFT);
if(pLocal->curstate.movetype == MOVETYPE_WALK && !iHasShiftHeld && !cvar.strafe && !(cmd->buttons & IN_ATTACK) && !(cmd->buttons & IN_USE))
{
fTime = gEngfuncs.GetClientTime();
cmd->viewangles.y += cvar.fixedyaw;
cmd->viewangles.x += cvar.fixedpitch;
}
//MOVEFIXUP
if(pLocal->curstate.movetype == MOVETYPE_WALK)
{
gEngfuncs.pfnAngleVectors(Vector(0.0f, cmd->viewangles.y, 0.0f), aimforward, aimright, aimup);
}
else
{
gEngfuncs.pfnAngleVectors(cmd->viewangles, aimforward, aimright, aimup);
}

newforward = DotProduct(forward * viewforward.Normalize(), aimforward) + DotProduct(right * viewright.Normalize(), aimforward) + DotProduct(up * viewup.Normalize(), aimforward);
newright = DotProduct(forward * viewforward.Normalize(), aimright) + DotProduct(right * viewright.Normalize(), aimright) + DotProduct(up * viewup.Normalize(), aimright);
newup = DotProduct(forward * viewforward.Normalize(), aimup) + DotProduct(right * viewright.Normalize(), aimup) + DotProduct(up * viewup.Normalize(), aimup);

if (cvar.fixedpitch > 81)
{
cmd->forwardmove = -newforward;
}
else
{
cmd->forwardmove = newforward;
}
cmd->sidemove = newright;
cmd->upmove = newup;
}
}

//=================================================================================================================//

float YawForVec(float* fwd)
{
if (fwd[1] == 0 && fwd[0] == 0)
{
return 0;
}
else
{
float yaw = (atan2(fwd[1], fwd[0]) * 180 / M_PI);
if (yaw < 0) yaw += 360; return yaw; } } //=================================================================================================================// void RotateInvisible(float fixed_yaw, float fixed_pitch, usercmd_s *cmd) { Vector viewforward, viewright, viewup, aimforward, aimright, aimup, vTemp; float newforward, newright, newup; float forward = cmd->forwardmove;
float right = cmd->sidemove;
float up = cmd->upmove;
Vector tipo_real_va;
VectorCopy(cmd->viewangles,tipo_real_va);

gEngfuncs.pfnAngleVectors(Vector(0.0f, tipo_real_va.y, 0.0f), viewforward, viewright, viewup);
tipo_real_va.y += fixed_yaw;
gEngfuncs.pfnAngleVectors(Vector(0.0f, tipo_real_va.y, 0.0f), aimforward, aimright, aimup);

newforward = DotProduct(forward * viewforward.Normalize(), aimforward) + DotProduct(right * viewright.Normalize(), aimforward) + DotProduct(up * viewup.Normalize(), aimforward);
newright = DotProduct(forward * viewforward.Normalize(), aimright) + DotProduct(right * viewright.Normalize(), aimright) + DotProduct(up * viewup.Normalize(), aimright);
newup = DotProduct(forward * viewforward.Normalize(), aimup) + DotProduct(right * viewright.Normalize(), aimup) + DotProduct(up * viewup.Normalize(), aimup);

if (fixed_pitch>81 )
{
cmd->forwardmove = -newforward;
} else {
cmd->forwardmove = newforward;
}

cmd->sidemove = newright;
cmd->upmove = newup;
}

//=================================================================================================================//
//=================================================================================================================//
//=================================================================================================================//
//=================================================================================================================//
//=================================================================================================================//

/*
void AutoDir(struct usercmd_s *cmd)
{
char sCvar[255];
if(cmd->buttons&IN_FORWARD)
{
sprintf(sCvar,"%sstrafe_dir 1",prefix);
gEngfuncs.pfnClientCmd(sCvar);
}
if(cmd->buttons&IN_MOVERIGHT)
{
sprintf(sCvar,"%sstrafe_dir 2",prefix);
gEngfuncs.pfnClientCmd(sCvar);
}
if(cmd->buttons&IN_BACK)
{
sprintf(sCvar,"%sstrafe_dir 3",prefix);
gEngfuncs.pfnClientCmd(sCvar);
}
if(cmd->buttons&IN_MOVELEFT)
{
sprintf(sCvar,"%sstrafe_dir 4",prefix);
gEngfuncs.pfnClientCmd(sCvar);
}
}*/

//=================================================================================================================//

void Gstrafe(struct usercmd_s *cmd)
{
if(cvar.gstrafe)
{
static int gs_state = 0;
if(cvar.gstrafe_standup && me.flHeightbuttons |=IN_DUCK;
}
if(gs_state == 0 && me.iFlags&FL_ONGROUND)
{

if((me.flGroundAngle<5) && cvar.gstrafe_noslowdown != 0 &&(me.flHeight<=0.000001f || me.iFlags&FL_ONGROUND)) { AdjustSpeed(0.0001); } cmd->buttons |=IN_DUCK;
gs_state = 1;
}
else if(gs_state == 1)
{
if((me.flGroundAngle<5) && cvar.gstrafe_noslowdown != 0 &&(me.flHeight<=0.000001f || me.iFlags&FL_ONGROUND)) { AdjustSpeed(0.0001); } if(cvar.gstrafe_bhop && me.iUseHull==0) { cmd->buttons|=IN_JUMP;
}

cmd->buttons &= ~IN_DUCK;
gs_state = 0;
}
}
}

//=================================================================================================================//

void StrafeHack(float frametime, struct usercmd_s *cmd,float visible,float crazy)
{
if(cvar.strafe
&& !(/*me.iFlags&FL_ONGROUND*/(float)(me.iFlags&FL_ONGROUND)>0)
&& (me.fOnLadder!=1))
{
float dir=0;

int dir_value = cvar.strafe_dir;

if(dir_value == 1)dir = 0;
else if(dir_value == 2) dir = 90;
else if(dir_value == 3) dir = 180;
else if(dir_value == 4) dir = -90;

if(me.flXYspeed<15) { cmd->forwardmove=400;
cmd->sidemove=0;
}

float va_real[3]={0,0,0};
gEngfuncs.GetViewAngles(va_real);
va_real[1]+=dir;
float vspeed[3]={me.vVelocity.x/me.fVSpeed,me.vVelocity.y/me.fVSpeed,0.0f};
float va_speed=YawForVec(vspeed);

float adif=va_speed-va_real[1];
while(adif<-180)adif+=360; while(adif>180)adif-=360;
cmd->sidemove=(435)*(adif>0?1:-1);
cmd->forwardmove=0;
bool onlysidemove=(abs(adif)>=atan(30.0/me.flXYspeed)/M_PI*180);
int aaddtova=0;

if(visible == 0) RotateInvisible(-(adif),0,cmd);
else
cmd->viewangles[1] -= (-(adif));

float fs=0;
if(!onlysidemove)
{
static float lv=0;
Vector fw=me.vForward;fw[2]=0;fw=fw.Normalize();
float vel=POW(fw[0]*me.vVelocity[0])+POW(fw[1]*me.vVelocity[1]);

fs=lv;
lv=sqrt(cvar.strafe_speed*100000/vel);//7300000//6500000
static float lastang=0;
float ca=abs(adif);
lastang=ca;
}

if(visible == 0) cmd->forwardmove+=fs;
else
{
float ang = atan(fs/cmd->sidemove)/M_PI*180;
cmd->viewangles.y+=ang;
}

if(crazy != 0)
{
static int _crazy = 1;
_crazy *= (-1);
cmd->viewangles.x = 89 * _crazy;
}

float sdmw=cmd->sidemove;
float fdmw=cmd->forwardmove;
switch((int)cvar.strafe_dir)
{
case 1:
cmd->forwardmove = fdmw;
cmd->sidemove = sdmw;
break;
case 2:
cmd->forwardmove = -sdmw;
cmd->sidemove = fdmw;
break;
case 3:
cmd->forwardmove = -fdmw;
cmd->sidemove = -sdmw;
break;
case 4:
cmd->forwardmove = sdmw;
cmd->sidemove = -fdmw;
break;
}
}
}

//=================================================================================================================//

/*
void StrafeHelper(float frametime, struct usercmd_s *cmd)
{
if(cvar.strafe_helper != 0)
{
static int lastdir=0;
static int strafe_counter=0;
static int strafe_num=0;
int strafe_dir=cvar.strafe_dir;
if(me.iFlags&FL_ONGROUND||me.fOnLadder==1||!(me.iWaterLevel < 2)||(me.flGroundAngle>45.9&&me.flHeight<50)) { strafe_counter=0; lastdir=0; if(cvar.strafe_helper_boost) strafe=false; rand_strafe = true; } else { if(cvar.strafe_helper_boost) strafe=true; cmd->buttons&=~IN_BACK;
cmd->buttons&=~IN_FORWARD;

if(!cmd->buttons&IN_MOVERIGHT && !cvar.strafe_helper_add_strafe)
cmd->buttons&=~IN_MOVERIGHT;

if(!cmd->buttons&IN_MOVELEFT && !cvar.strafe_helper_add_strafe)
cmd->buttons&=~IN_MOVELEFT;

if( cvar.strafe_helper_max_strafe_rand && cvar.strafe_helper_add_strafe)
{
if(cvar.strafe_helper_max_strafe_rand_min > cvar.strafe_helper_max_strafe_rand_max)
{
char buff[256];
sprintf(buff,"%sstrafe_helper_max_strafe_rand_min %i",
//
prefix
//
,cvar.strafe_helper_max_strafe_rand_max);
gEngfuncs.pfnClientCmd(buff);
}
if( cvar.strafe_helper_max_strafe_rand_min <= 1 ) { char buff[256]; sprintf(buff,"%sstrafe_helper_max_strafe_rand_min 1",prefix); gEngfuncs.pfnClientCmd(buff); } if( rand_strafe == true ) { cvar.strafe_helper_max_strafe = gEngfuncs.pfnRandomFloat(cvar.strafe_helper_max_strafe_rand_min,cvar.strafe_helper_max_strafe_rand_max); rand_strafe = false; } } static int nobuttons=0; if(lastdir!=-1&&me.fAngleSpeed<0) { lastdir=-1; strafe_counter++; strafe_num=0; nobuttons=3; } if(lastdir!=1&&me.fAngleSpeed>0)
{
lastdir=1;
strafe_counter++;
strafe_num=0;
nobuttons=3;
}
strafe_num++;

if(strafe_counter<=(cvar.strafe_helper_max_strafe)&&!me.bFPS && cvar.strafe_helper_add_strafe) { switch(cvar.strafe_dir) { case 1://forward if(me.fAngleSpeed<0){cmd->buttons|=IN_MOVELEFT;cmd->buttons&=~IN_MOVERIGHT;}//mouse left - left
if(me.fAngleSpeed>0){cmd->buttons|=IN_MOVERIGHT;cmd->buttons&=~IN_MOVELEFT;}//mouse right - right
break;
case 3: // back
if(me.fAngleSpeed<0){cmd->buttons|=IN_MOVERIGHT;cmd->buttons&=~IN_MOVELEFT;}//mouse left - right
if(me.fAngleSpeed>0){cmd->buttons|=IN_MOVELEFT;cmd->buttons&=~IN_MOVERIGHT;}//mouse right - left
break;
case 4://left
if(me.fAngleSpeed<0){cmd->buttons|=IN_BACK;cmd->buttons&=~IN_FORWARD;}//mouse left - back
if(me.fAngleSpeed>0){cmd->buttons|=IN_FORWARD;cmd->buttons&=~IN_BACK;}//mouse right - forward
break;
case 2://right
if(me.fAngleSpeed<0){cmd->buttons|=IN_FORWARD;cmd->buttons&=~IN_BACK;}//mouse left - forward
if(me.fAngleSpeed>0){cmd->buttons|=IN_BACK;cmd->buttons&=~IN_FORWARD;}//mouse right - back
break;
}
}
float sidespeed=0;
float forwardspeed=0;

if(cvar.strafe_helper_move_rand && cvar.strafe_helper_add_strafe)
{
if(cvar.strafe_helper_move_rand_min > cvar.strafe_helper_move_rand_max)
{
char buff[256];
sprintf(buff,"%sstrafe_helper_move_rand_min %i",prefix,cvar.strafe_helper_move_rand_max);
gEngfuncs.pfnClientCmd(buff);
}

if(cvar.strafe_helper_move_rand_max > 400)
{
char buff[256];
sprintf(buff,"%sstrafe_helper_move_rand_max 400",prefix);
gEngfuncs.pfnClientCmd(buff);
}

if(cvar.strafe_helper_move_rand_max <= 1) { char buff[256]; sprintf(buff,"%sstrafe_helper_move_rand_max 1",prefix); gEngfuncs.pfnClientCmd(buff); } if(cvar.strafe_helper_move_rand_min < 50) { char buff[256]; sprintf(buff,"%sstrafe_helper_move_rand_min 50",prefix); gEngfuncs.pfnClientCmd(buff); } if(cvar.strafe_helper_move_rand_min > 400)
{
char buff[256];
sprintf(buff,"%sstrafe_helper_move_rand_min 400",prefix);
gEngfuncs.pfnClientCmd(buff);
}
cvar.strafe_helper_move = gEngfuncs.pfnRandomFloat(cvar.strafe_helper_move_rand_min,cvar.strafe_helper_move_rand_max);
}

double ms = me.flXYspeed/me.flMaxSpeed;
sidespeed += cvar.strafe_helper_move*(me.fAngleSpeed<0?-1:1); forwardspeed = cvar.strafe_helper_main/ms; if(me.fAngleSpeed>0.0f||me.fAngleSpeed<0.0f) { switch(strafe_dir) { case 1: cmd->forwardmove=forwardspeed;
cmd->sidemove=sidespeed;
break;
case 2:
cmd->forwardmove=-sidespeed;
cmd->sidemove=forwardspeed;
break;
case 3:
cmd->forwardmove=-forwardspeed;
cmd->sidemove=-sidespeed;
break;
case 4:
cmd->forwardmove=sidespeed;
cmd->sidemove=-forwardspeed;
break;
}
}
}
}
}*/

//=================================================================================================================//

/*
void FastRun(struct usercmd_s *cmd)
{
if (cvar.fastrun && me.flXYspeed && me.flFallSpeed == 0 && !cvar.gstrafe && me.iFlags&FL_ONGROUND)
{
static bool _FastRun = false;
if ((cmd->buttons&IN_FORWARD && cmd->buttons&IN_MOVELEFT) || (cmd->buttons&IN_BACK && cmd->buttons&IN_MOVERIGHT)) {
if (_FastRun) { _FastRun = false; cmd->sidemove -= 89.6; cmd->forwardmove -= 89.6; }
else { _FastRun = true; cmd->sidemove += 89.6; cmd->forwardmove += 89.6; }
} else if ((cmd->buttons&IN_FORWARD && cmd->buttons&IN_MOVERIGHT) || (cmd->buttons&IN_BACK && cmd->buttons&IN_MOVELEFT)) {
if (_FastRun) { _FastRun = false; cmd->sidemove -= 89.6; cmd->forwardmove += 89.6; }
else { _FastRun = true; cmd->sidemove += 89.6; cmd->forwardmove -= 89.6; }
} else if(cmd->buttons&IN_FORWARD || cmd->buttons&IN_BACK) {
if (_FastRun) { _FastRun = false; cmd->sidemove -= 126.6; }
else { _FastRun = true; cmd->sidemove += 126.6; }
} else if (cmd->buttons&IN_MOVELEFT || cmd->buttons&IN_MOVERIGHT) {
if (_FastRun) { _FastRun = false; cmd->forwardmove -= 126.6; }
else { _FastRun = true; cmd->forwardmove += 126.6; }
}
}
}*/

//=================================================================================================================//

//static float ducke_fn = 0;
//static float ducke_f = 0;
//static bool ducked_s = true;
//void DuckAndStuf()
//{
// if(cvar.duck->value)
// {
// if(ducked_s && ducke_fn < g_Engine.GetClientTime()) // { // g_Engine.pfnClientCmd("+speed"); // ducke_f = g_Engine.GetClientTime()+0.295; // ducked_s = false; // } // if(ducke_f < g_Engine.GetClientTime() && ducked_s == false) // { // g_Engine.pfnClientCmd("-speed"); // ducke_fn = g_Engine.GetClientTime()+0.165; // ducked_s = true; // } // } //} //=================================================================================================================// /* void Bhop(float frametime, struct usercmd_s *cmd) { static bool bhop_standup_state = false; static bool lastFramePressedJump=false; static bool JumpInNextFrame=false; int curFramePressedJump=cmd->buttons&IN_JUMP;

if ( g_Local.flHeight <= 20 && bhop_standup_state == true && cvar.bhop->value !=0 && cvar.bhop_autoduck->value )
{
bhop_standup_state = false;
g_Engine.pfnClientCmd("-duck");
}

if ( bhop_standup_state == true && g_Local.fOnLadder == 1 )
{
g_Engine.pfnClientCmd("-duck");
}

if(JumpInNextFrame)
{
JumpInNextFrame=false;
cmd->buttons|=IN_JUMP;
goto bhopfuncend;
}
static int inAirBhopCnt=0;bool isJumped=false;

if(cvar.bhop->value !=0 && curFramePressedJump && !gstrafe)
{
if ( cvar.bhop_autoduck->value )
{
if ( g_Local.flHeight >= 30 && g_Local.flHeight <= 64 && bhop_standup_state == false && !g_Local.fOnLadder) { g_Engine.pfnClientCmd("+duck"); bhop_standup_state = true; g_Local.flDuckTimeMax = g_Engine.GetClientTime(); balance_bh = true; } } cmd->buttons &= ~IN_JUMP;
if( ((!lastFramePressedJump)|| g_Local.iFlags&FL_ONGROUND || g_Local.iWaterLevel >= 2 || g_Local.fOnLadder==1 || g_Local.flHeight<=2) && !jumpbug) { if(true) { if(cvar.bhop_nsd->value)
{
if((int)g_Local.flXYspeed <= 299 && !strafe) { AdjustSpeed(0.0001); } } static int bhop_jump_number=0; bhop_jump_number++; if(bhop_jump_number>=2)
{
bhop_jump_number=0;
JumpInNextFrame=true;
goto bhopfuncend;
}
}

if(cvar.bhop_cnt_rand_min->value > cvar.bhop_cnt_rand_max->value)
{
char buff[256];
sprintf(buff,"%sbhop_cnt_rand_min %i",prefix,cvar.bhop_cnt_rand_max->value);
g_Engine.pfnClientCmd(buff);
}

if(cvar.bhop_cnt_rand_min->value <= 1) { char buff[256]; sprintf(buff,"%sbhop_cnt_rand_min 1",prefix); g_Engine.pfnClientCmd(buff); } if(cvar.bhop_cnt_rand_min->value > 20)
{
char buff[256];
sprintf(buff,"%sbhop_cnt_rand_min 20",prefix);
g_Engine.pfnClientCmd(buff);
}

if(cvar.bhop_cnt_rand_max->value > 20)
{
char buff[256];
sprintf(buff,"%sbhop_cnt_rand_max 20",prefix);
g_Engine.pfnClientCmd(buff);
}

if(cvar.bhop_cnt_rand_max->value <= 1) { char buff[256]; sprintf(buff,"%sbhop_cnt_rand_max 1",prefix); g_Engine.pfnClientCmd(buff); } if(cvar.bhop_cnt_rand->value)
inAirBhopCnt = (int)g_Engine.pfnRandomFloat((int)cvar.bhop_cnt_rand_min->value,(int)cvar.bhop_cnt_rand_max->value);
else
inAirBhopCnt = cvar.bhop_cnt->value;

isJumped=true;
cmd->buttons |= IN_JUMP;
}
}
if(!isJumped)
{
if(inAirBhopCnt>0)
{
if(inAirBhopCnt%2==0) {cmd->buttons |= IN_JUMP;}
else cmd->buttons &= ~IN_JUMP;
inAirBhopCnt--;
}
}
bhopfuncend:
lastFramePressedJump = curFramePressedJump;
}
*/

/*

// redraw
if(g_Local.bJumped)
{
FrameCnt += 1;
FpsCnt += (1/g_Local.flFrametime);
}*/

//
//createmove
/*
if ( ( g_Engine.GetClientTime() - g_Local.flDuckTimeMax ) >= 0.8 && balance_bh == true)
{
g_Engine.pfnClientCmd("-duck");
balance_bh = false;
}*/

/*
if(CheckCvar("fps_override"))
g_Engine.pfnClientCmd("fps_override 0");
else
g_Engine.pfnClientCmd("developer 0");*/

/*
if(g_Local.bAlive)
{
//DuckAndStuf();*/

/*
Bhop(cmd);
Gstrafe(cmd);
FastRun(cmd);
StrafeHack(frametime,cmd,cvar.strafe_invisible,cvar.strafe_crazy);

if( me.flXYspeed > 0 )
{
StrafeHelper(frametime,cmd);
}

if(cvar.strafe_dir_auto)
AutoDir(cmd);

FixedMoves(frametime,cmd);

if(cvar.fps_helper > 0 && Init == true)
{
AdjustSpeed(((1/frametime)/cvar.fps_helper));
}

FpsSlowto();
*/

/*
if(g_Local.bJumped& (g_Local.iFlags&FL_ONGROUND||g_Local.fOnLadder == 1))
{
Vector endpos=g_Local.vOrigin;
endpos.z-=g_Local.iUseHull==0?36.0:18.0;
g_Local.vt2=endpos;
if(endpos.z==g_Local.StartJumpPos.z)
{
Vector lj=endpos-g_Local.StartJumpPos;
float dist=lj.Length()+32.0625f+0.003613;
if(dist>=200)
{
InterpFps = FpsCnt / FrameCnt;
FpsCnt = 0;
FrameCnt = 0;
g_Local.flJumpDist=dist;
g_Local.flJumpMessTime=g_Engine.GetClientTime()+7.0;
if(cvar.lj_stats_log->value)
add_lj_log("%s-> distance: %.3f, prestrafe: %.3f, jumpoff: %.3f, strafe_aa: %.0f, fps: %.3f",timeStr,dist, PreStrafe, JumpOff,(float)cvar.strafe_aa->value,InterpFps);
}
}
g_Local.bJumped=false;
}*/

/*
if(cmd->buttons&IN_FORWARD) { cfunc.p_for(); }
else { cfunc.m_for(); }

if(cmd->buttons&IN_MOVELEFT) { cfunc.p_ml(); }
else { cfunc.m_ml(); }

if(cmd->buttons&IN_MOVERIGHT) { cfunc.p_mr(); }
else { cfunc.m_mr(); }

if(cmd->buttons&IN_BACK) { cfunc.p_bk(); }
else { cfunc.m_bk(); }

if(cmd->buttons&IN_DUCK) { cfunc.p_dk(); }
else { cfunc.m_dk(); }

if(cmd->buttons&IN_JUMP) { cfunc.p_jp(); }
else { cfunc.m_jp(); }*/

// PlayerMove
UpdatePlayerMoveVars(ppmove);

// CMD's

/*
void CFunc::fps_on()
{
if(CheckCvarC("fps_override"))
g_Engine.pfnClientCmd("fps_override 1");

g_Engine.pfnClientCmd(PrefHack("exec +fps.cfg",prefix,""));
g_Local.bFPS = true;
}

void CFunc::fps_off()
{
if(CheckCvarC("fps_override"))
g_Engine.pfnClientCmd("fps_override 0");

g_Engine.pfnClientCmd(PrefHack("exec -fps.cfg",prefix,""));
g_Local.bFPS = false;
}*/

/*
static bool fix_str = false;

void strafe_on()
{
if ( cvar.strafe_helper->value == 1 )
{
fix_str = true;
cvar.strafe_helper->value = 0;
}
if(cvar.strafe_fps->value)
{
cfunc.fps_on();
}
strafe = true;
}

void strafe_off()
{
if ( cvar.strafe_helper->value == 0 && fix_str == true )
{
fix_str = false;
cvar.strafe_helper->value = 1;
}
if(cvar.strafe_fps->value)
{
cfunc.fps_off();
}
strafe = false;
}
*/