CS: Kuvik Hook
I have added somethings from 101 and tkz, what i can not find working is fastrun and strafehelper seems to slow things down, but i am not know with these functions and you need to set the binds in strafe.cpp because if set in cfg then you can not use the normal binds when off.
Also i added wavspeed for speedmode with waypoint, difference i notice is that it is much faster, when i rush i can have up to 700fps using developer 1 instead of 4 fps, i can play with bots without speeding them and the aim seems much more accurate.
#include "client.h"
StrafeBot Strafebot;
//***************************************************************************
bool Strafe = false;
bool Fastrun = false;
bool Gstrafe = false;
bool StrafeBhop = false;
bool Jumpbug = false;
//***************************************************************************
void func_strafe_on()
{
Strafe = true;
}
void func_strafe_off()
{
Strafe = false;
}
void func_jumpbug_on()
{
Jumpbug = true;
}
void func_jumpbug_off()
{
Jumpbug = false;
}
void func_bhop_on()
{
StrafeBhop = true;
}
void func_bhop_off()
{
StrafeBhop = false;
}
void func_gstrafe_on()
{
Gstrafe = true;
}
void func_gstrafe_off()
{
Gstrafe = false;
}
void func_fastrun_on()
{
Fastrun = true;
}
void func_fastrun_off()
{
Fastrun = false;
}
//***************************************************************************
void StrafeBot::commands()
{
cmd.AddCommand( "strafe_on", func_strafe_on);
cmd.AddCommand( "strafe_off", func_strafe_off);
cmd.AddCommand( "bhop_on", func_bhop_on);
cmd.AddCommand( "bhop_off", func_bhop_off);
cmd.AddCommand( "gstrafe_on", func_gstrafe_on);
cmd.AddCommand( "gstrafe_off", func_gstrafe_off);
cmd.AddCommand( "jumpbug_on", func_jumpbug_on);
cmd.AddCommand( "jumpbug_off", func_jumpbug_off);
cmd.AddCommand( "fastrun_on", func_fastrun_on);
cmd.AddCommand( "fastrun_off", func_fastrun_off);
}
//***************************************************************************
bool BindStrafe = true;
bool UnBindStrafe = false;
bool BindBhop = true;
bool UnBindBhop = false;
bool BindGstrafe = true;
bool UnBindGstrafe = false;
bool BindSlowDown = true;
bool UnBindSlowDown = false;
bool BindJumpBug = true;
bool UnBindJumpBug = false;
bool BindFastRun = true;
bool UnBindFastRun = false;
bool RunOnce = true;
void Bind()
{
if(cvar.strafehack && BindStrafe)
{
cmd.exec("bind alt +strafe");
BindStrafe = false;
UnBindStrafe = true;
}
if(!cvar.strafehack && UnBindStrafe)
{
cmd.exec("unbind alt");
BindStrafe = true;
UnBindStrafe = false;
}
if(cvar.bhop && BindBhop)
{
cmd.exec("bind space +bhop");
BindBhop = false;
UnBindBhop = true;
}
if(!cvar.bhop && UnBindBhop)
{
cmd.exec("unbind space");
BindBhop = true;
UnBindBhop = false;
}
if(cvar.groundstrafe && BindGstrafe)
{
cmd.exec("bind ctrl +gstrafe");
BindGstrafe = false;
UnBindGstrafe = true;
}
if(!cvar.groundstrafe && UnBindGstrafe)
{
cmd.exec("unbind ctrl");
BindGstrafe = true;
UnBindGstrafe = false;
}
if(cvar.slowdown && BindSlowDown)
{
cmd.exec("bind mwheelup \"Speed+\"");
cmd.exec("bind mwheeldown \"Speed-\"");
BindSlowDown = false;
UnBindSlowDown = true;
}
if(!cvar.slowdown && UnBindSlowDown)
{
cmd.exec("unbind mwheelup");
cmd.exec("unbind mwheeldown");
cmd.exec("Speed1");
BindSlowDown = true;
UnBindSlowDown = false;
}
if(cvar.jumpbug && BindJumpBug)
{
cmd.exec("bind e +jumpbug");
BindJumpBug = false;
UnBindJumpBug = true;
}
if(!cvar.jumpbug && UnBindJumpBug)
{
cmd.exec("unbind e");
BindJumpBug = true;
UnBindJumpBug = false;
}
if(cvar.fastrun && BindFastRun)
{
cmd.exec("bind f +fastrun");
BindFastRun = false;
UnBindFastRun = true;
}
if(!cvar.fastrun && UnBindFastRun)
{
cmd.exec("unbind f");
BindFastRun = true;
UnBindFastRun = false;
}
if(RunOnce)
{
cmd.exec("alias +strafe \"strafe_on\"");
cmd.exec("alias -strafe \"strafe_off\"");
cmd.exec("alias +bhop \"bhop_on\"");
cmd.exec("alias -bhop \"bhop_off\"");
cmd.exec("alias +gstrafe \"gstrafe_on\"");
cmd.exec("alias -gstrafe \"gstrafe_off\"");
cmd.exec("alias +jumpbug \"jumpbug_on\"");
cmd.exec("alias -jumpbug \"jumpbug_off\"");
cmd.exec("alias +fastrun \"fastrun_on\"");
cmd.exec("alias -fastrun \"fastrun_off\"");
cmd.exec("alias Speed01 \"wavspeed 0.1;.wait;.wait;alias Speed+ Speed02;alias Speed- Speed01\"");
cmd.exec("alias Speed02 \"wavspeed 0.2;.wait;.wait;alias Speed+ Speed03;alias Speed- Speed01\"");
cmd.exec("alias Speed03 \"wavspeed 0.3;.wait;.wait;alias Speed+ Speed04;alias Speed- Speed02\"");
cmd.exec("alias Speed04 \"wavspeed 0.4;.wait;.wait;alias Speed+ Speed05;alias Speed- Speed03\"");
cmd.exec("alias Speed05 \"wavspeed 0.5;.wait;.wait;alias Speed+ Speed06;alias Speed- Speed04\"");
cmd.exec("alias Speed06 \"wavspeed 0.6;.wait;.wait;alias Speed+ Speed07;alias Speed- Speed05\"");
cmd.exec("alias Speed07 \"wavspeed 0.7;.wait;.wait;alias Speed+ Speed08;alias Speed- Speed06\"");
cmd.exec("alias Speed08 \"wavspeed 0.8;.wait;.wait;alias Speed+ Speed09;alias Speed- Speed07\"");
cmd.exec("alias Speed09 \"wavspeed 0.9;.wait;.wait;alias Speed+ Speed1 ;alias Speed- Speed08\"");
cmd.exec("alias Speed1 \"wavspeed 1;.wait;.wait; alias Speed+ Speed1 ;alias Speed- Speed09\"");
cmd.exec("alias Speed+ \"Speed1\"");
cmd.exec("alias Speed- \"Speed1\"");
RunOnce = false;
}
}
void StrafeBot::Init(float frametime, struct usercmd_s *cmd)
{
if(cvar.strafehack == 1)
Strafebot.StrafeHacker(frametime,cmd,cvar.strafe_invisible,cvar.strafe_crazy);
if(cvar.strafehack == 2)
Strafebot.StrafeHack(frametime, cmd);
if(cvar.strafeautodir)
Strafebot.AutoDir(cmd);
if(cvar.fastrun == 1)
Strafebot.FastRunner(cmd);
if(cvar.fastrun == 2)
Strafebot.FastRun(frametime, cmd);
if(cvar.groundstrafe == 1)
Strafebot.GroundStrafer(cmd);
if(cvar.groundstrafe == 2)
Strafebot.GroundStrafe(cmd);
if(cvar.bhop == 1){
Strafebot.Bhopper(frametime, cmd);
if((gEngfuncs.GetClientTime() - me.flDuckTimeMax ) >= 0.8 && balance_bh == true)
{
gEngfuncs.pfnClientCmd("-duck");
balance_bh = false;
}
}
if(cvar.bhop == 2)
Strafebot.Bhop(frametime, cmd);
if(cvar.jumpbug == 1)
Strafebot.JumpBugger(frametime, cmd);
if(cvar.jumpbug == 2)
Strafebot.JumpBug(frametime, cmd);
if(cvar.strafe_helper)
if( me.pmfSpeed > 0 )
{
Strafebot.StrafeHelper(frametime,cmd);
}
Bind();
}
//***************************************************************************
void StrafeBot::StrafeHack(float frametime, struct usercmd_s *cmd)
{
if(Strafe && !(me.pmFlags & FL_ONGROUND) && (me.pmMoveType!=5))
{
float dir = 0.0f;
int dir_value = cvar.strafe_dir;
if(dir_value == 1)dir = 0 * PI / 180.0f;
else if(dir_value == 2) dir = 90 * PI / 180.0f;
else if(dir_value == 3) dir = 180 * PI / 180.0f;
else if(dir_value == 4) dir = -90 * PI / 180.0f;
if(me.pmfSpeed < 15.0f)
{
if(cmd->buttons&IN_FORWARD)
{
if(cmd->buttons&IN_MOVELEFT)
{
cmd->forwardmove = 900;
cmd->sidemove = -900;
}
else if(cmd->buttons&IN_MOVERIGHT)
{
cmd->forwardmove = 900;
cmd->sidemove = 900;
}
else
cmd->forwardmove = 900;
}
else if(cmd->buttons&IN_BACK)
{
if(cmd->buttons&IN_MOVELEFT)
{
cmd->forwardmove = -900;
cmd->sidemove = -900;
}
else if(cmd->buttons&IN_MOVERIGHT)
{
cmd->forwardmove = -900;
cmd->sidemove = 900;
}
else
cmd->forwardmove = -900;
}
else if(cmd->buttons&IN_MOVELEFT)
cmd->sidemove = -900;
else if(cmd->buttons&IN_MOVERIGHT)
cmd->sidemove = 900;
else
cmd->forwardmove = 900;
}
else
{
float va_speed = atan2(me.pmvVelocity.y, me.pmvVelocity.x);
float va[3] = {0,0,0};
gEngfuncs.GetViewAngles(va);
float adif = va_speed - va[1] * PI / 180.0f - dir;
adif = sin(adif);
adif = atan2(adif, sqrt(1 - adif*adif));
cmd->sidemove = (cvar.strafe_sidemove)*(adif > 0 ? 1 : -1);
cmd->forwardmove = 0;
float angle;
float osin, ocos, nsin, ncos;
angle = cmd->viewangles.y * PI / 180.0f;
osin = sin(angle);
ocos = cos(angle);
angle = 2.0f * cmd->viewangles.y * PI / 180.0f - va_speed + dir;
nsin = sin(angle);
ncos = cos(angle);
cmd->forwardmove = cmd->sidemove * (osin * ncos - ocos * nsin);
cmd->sidemove *= osin * nsin + ocos * ncos;
float fs = 0;
if(atan2(cvar.strafe_angle / me.pmfSpeed, 1.0f) >= abs(adif))
{
Vector vBodyDirection;
if(dir_value)
vBodyDirection = me.pmvForward;
else
vBodyDirection = me.pmvRight;
vBodyDirection[2] = 0;
vBodyDirection = vBodyDirection.Normalize();
float vel = POW(vBodyDirection[0] * me.pmvVelocity[0]) + POW(vBodyDirection[1] * me.pmvVelocity[1]);
fs = sqrt(cvar.strafe_speed * 100000 / vel);
}
cmd->forwardmove += fs;
}
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;
}
}
}
//***************************************************************************
float YawForVec(float* fwd)
{
if (fwd[1] == 0 && fwd[0] == 0)
{
return 0;
}
else
{
float yaw = (atan2(fwd[1], fwd[0]) * 180 / 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 StrafeBot::StrafeHacker(float frametime, struct usercmd_s *cmd,float visible,float crazy)
{
if(Strafe && !(me.pmFlags & FL_ONGROUND) && (me.pmMoveType!=5))
{
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.pmfSpeed < 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.pmvVelocity.x/me.pmfVSpeed,me.pmvVelocity.y/me.pmfVSpeed,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=(cvar.strafe_sidemove)*(adif>0?1:-1);
cmd->forwardmove=0;
bool onlysidemove=(abs(adif)>=atan(cvar.strafe_angle/me.pmfSpeed)/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.pmvForward;fw[2]=0;fw=fw.Normalize();
float vel=POW(fw[0]*me.pmvVelocity[0])+POW(fw[1]*me.pmvVelocity[1]);
fs=lv;
lv=sqrt(cvar.strafe_speed * 100000 / vel);
static float lastang=0;
float ca=abs(adif);
lastang=ca;
}
if(visible == 0) cmd->forwardmove+=fs;
else
{
float ang = atan(fs/cmd->sidemove)/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 StrafeBot::AutoDir(struct usercmd_s *cmd)
{
if(cmd->buttons&IN_FORWARD)
{
cvar.strafe_dir = 1;
}
if(cmd->buttons&IN_MOVERIGHT)
{
cvar.strafe_dir = 2;
}
if(cmd->buttons&IN_BACK)
{
cvar.strafe_dir = 3;
}
if(cmd->buttons&IN_MOVELEFT)
{
cvar.strafe_dir = 4;
}
}
//***************************************************************************
void StrafeBot::FastRun(float frametime, struct usercmd_s *cmd)
{
if(cvar.fastrun_nsd)
{
if(Fastrun && me.pmFlags&FL_ONGROUND && !Gstrafe )
{
if(!(cmd->buttons&(IN_FORWARD | IN_BACK | IN_MOVELEFT | IN_MOVERIGHT))) return;
if(cmd->buttons&IN_MOVELEFT && cmd->buttons&IN_MOVERIGHT)
cmd->buttons &= ~(IN_MOVELEFT | IN_MOVERIGHT);
if(cmd->buttons&IN_FORWARD && cmd->buttons&IN_BACK)
cmd->buttons &= ~(IN_FORWARD | IN_BACK);
float aaddtova;
if(cmd->buttons&IN_FORWARD)
{
if(cmd->buttons&IN_MOVELEFT)
aaddtova = 45.0f;
else if(cmd->buttons&IN_MOVERIGHT)
aaddtova = -45.0f;
else
aaddtova = 0.0f;
}
else if(cmd->buttons&IN_BACK)
{
if(cmd->buttons&IN_MOVELEFT)
aaddtova = 135.0f;
else if(cmd->buttons&IN_MOVERIGHT)
aaddtova = -135.0f;
else
aaddtova = 180.0f;
}
else if(cmd->buttons&IN_MOVELEFT)
aaddtova = 90.0f;
else if(cmd->buttons&IN_MOVERIGHT)
aaddtova = -90.0f;
if(me.pmfSpeed < 78)
{
if(cmd->buttons&IN_FORWARD)
{
if(cmd->buttons&IN_MOVELEFT)
{
cmd->forwardmove = 900;
cmd->sidemove = -900;
}
else if(cmd->buttons&IN_MOVERIGHT)
{
cmd->forwardmove = 900;
cmd->sidemove = 900;
}
else
cmd->forwardmove = 900;
}
else if(cmd->buttons&IN_BACK)
{
if(cmd->buttons&IN_MOVELEFT)
{
cmd->forwardmove = -900;
cmd->sidemove = -900;
}
else if(cmd->buttons&IN_MOVERIGHT)
{
cmd->forwardmove = -900;
cmd->sidemove = 900;
}
else
cmd->forwardmove = -900;
}
else if(cmd->buttons&IN_MOVELEFT)
cmd->sidemove = -900;
else if(cmd->buttons&IN_MOVERIGHT)
cmd->sidemove = 900;
return;
}
bool dir_rig = true;
float yaw = atan2(me.pmvVelocity.y, me.pmvVelocity.x) * 180.0 / PI;
yaw -= aaddtova;
yaw = cmd->viewangles.y - yaw;
int fadif = yaw;
fadif = (fadif + 360) % 360;
dir_rig = fadif <= 180;
float x = 135.06374825035877480180939653038* (dir_rig ? -1 : +1);
float y = 267.87643402987823669025530311859;
float a = DegToRad(aaddtova);
float sinA = sin(a);
float cosA = cos(a);
cmd->sidemove = x*cosA - y*sinA;
cmd->forwardmove = y*cosA + x*sinA;
x = cmd->sidemove;
y = cmd->forwardmove;
float newa = DegToRad(-yaw);
sinA = sin(newa);
cosA = cos(newa);
cmd->sidemove = x*cosA - y*sinA;
cmd->forwardmove = y*cosA + x*sinA;
}
}
else
{
if(Fastrun && me.pmFlags&FL_ONGROUND && !Gstrafe )
{
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; }
}
}
}
}
//***************************************************************************
void StrafeBot::FastRunner(struct usercmd_s *cmd)
{
if (Fastrun && me.pmfSpeed && me.pmflFallSpeed == 0/* && !gstrafe */&& me.pmFlags&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; }
}
}
}
//***************************************************************************
void StrafeBot::GroundStrafer(struct usercmd_s *cmd)
{
if(Gstrafe && !Jumpbug)
{
static int gs_state = 0;
if(cvar.gstrafe_standup && me.pmflHeightbuttons |=IN_DUCK;
}
if(gs_state == 0 && me.pmFlags&FL_ONGROUND)
{
if((me.pmflGroundAngle<5) && cvar.gstrafe_nsd != 0 &&(me.pmflHeight<=0.000001f || me.pmFlags&FL_ONGROUND))
{
Speedbot.AdjustSpeed(0.0001);
} cmd->buttons |=IN_DUCK;
gs_state = 1;
}
else if(gs_state == 1)
{
if((me.pmflGroundAngle<5) && cvar.gstrafe_nsd != 0 && (me.pmflHeight<=0.000001f || me.pmFlags&FL_ONGROUND))
{
Speedbot.AdjustSpeed(0.0001);
} if(cvar.gstrafe_bhop && me.pmiUseHull==0)
{
cmd->buttons|=IN_JUMP;
}
cmd->buttons &= ~IN_DUCK;
gs_state = 0;
}
}
}
//***************************************************************************
void StrafeBot::GroundStrafe(struct usercmd_s *cmd)
{
if(Gstrafe && !Jumpbug)
{
static int gs_state = 0;
if(cvar.gstrafe_standup != 0.0f)
{
if(me.pmflFallSpeed > 0)
{
if(me.pmflGroundAngle < 5.0f && ((me.pmFlags&FL_ONGROUND) || me.pmflHeight < 0.00001f))
{
Speedbot.AdjustSpeed(cvar.gstrafe_nsd <= 0.0f ? 0.0000001f : cvar.gstrafe_nsd);
}
if(me.pmflFallSpeed >= 140)
if(me.pmflHeight <= 30)
cmd->buttons |= IN_DUCK;
}
}
if(gs_state == 0 && (me.pmFlags&FL_ONGROUND))
{
if(me.pmflGroundAngle < 5.0f && ((me.pmFlags&FL_ONGROUND) || me.pmflHeight < 0.00001f))
{
Speedbot.AdjustSpeed(cvar.gstrafe_nsd <= 0.0f ? 0.000001f : cvar.gstrafe_nsd);
}
cmd->buttons |= IN_DUCK;
gs_state = 1;
}
else if(gs_state == 1)
{
if(me.pmflGroundAngle < 5.0f && ((me.pmFlags&FL_ONGROUND) || me.pmflHeight < 0.00001f))
{
Speedbot.AdjustSpeed(cvar.gstrafe_nsd <= 0.0f ? 0.00001f : cvar.gstrafe_nsd);
}
if(cvar.gstrafe_bhop != 0 && ((me.pmFlags&FL_DUCKING) ? 1 : 0) == 0)
cmd->buttons |= IN_JUMP;
cmd->buttons &= ~IN_DUCK;
gs_state = 0;
}
}
}
//***************************************************************************
void SlowDownSleep(struct usercmd_s *cmd, float fNeedSpeed)
{
float redspeed = me.pmfSpeed - fNeedSpeed;
float degspeed = atan2(me.pmvVelocity[1], me.pmvVelocity[0]);
if(degspeed < 0)
degspeed += (PI * 2.0f);
if(redspeed < 30.0f)
redspeed = (300.0f / me.pmAirAccelerate);
cmd->forwardmove = -redspeed * cos(cmd->viewangles.y * PI / 180.0f - degspeed);
cmd->sidemove = -redspeed * sin(cmd->viewangles.y * PI / 180.0f - degspeed);
}
//***************************************************************************
void StrafeBot::Bhop(float frametime, struct usercmd_s *cmd)
{
static bool lastFramePressedJump = false;
static bool JumpInNextFrame = false;
static int inAirBhopCnt = 0;
bool isJumped = false;
if(JumpInNextFrame)
{
JumpInNextFrame = false;
cmd->buttons |= IN_JUMP;
goto bhopfuncend;
}
if(StrafeBhop && !Gstrafe)
{
cmd->buttons &= ~IN_JUMP;
if(cvar.bhop_nsd != 0.0f)
{
if(!(me.pmFlags&FL_ONGROUND))
{
cmd->buttons &= ~IN_JUMP;
if(me.pmVelocity[2] < 0)
{
float redspeed = me.pmfSpeed - cvar.bhop_nsd;
int nframes = 0;
float addFallingSpeed = me.pmflFallSpeed;
float height = me.pmflHeight;
while(height > 2.0f)
{
height -= addFallingSpeed * me.pmframeTime;
addFallingSpeed += me.pmgravity * me.pmmovevarsgravity * 0.5 * me.pmframeTime;
nframes++;
}
float nstartframe = me.pmAirAccelerate * redspeed * me.pmframeTime * me.pmfriction;
if(redspeed > 0.0f)
SlowDownSleep(cmd, cvar.bhop_nsd);
}
}
}
if(!lastFramePressedJump || (me.pmFlags&FL_ONGROUND) || me.pmwaterlevel >= 2 || (me.pmMoveType == 5) || me.pmflHeight <= 2)
{
if(true)
{
static int bhop_jump_number = 0;
bhop_jump_number++;
if(bhop_jump_number >= RandomFloat(1.6, 3.6))
{
bhop_jump_number = 0;
JumpInNextFrame = true;
goto bhopfuncend;
}
}
{
inAirBhopCnt = 4;
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 = (cmd->buttons&IN_JUMP);
}
//***************************************************************************
void StrafeBot::Bhopper(float frametime, struct usercmd_s *cmd)
{
static bool bhop_standup_state = false;
static bool lastFramePressedJump=false;
static bool JumpInNextFrame=false;
static int inAirBhopCnt=0;
bool isJumped=false;
if ( me.pmflHeight <= 20 && bhop_standup_state == true && GetAsyncKeyState(VK_SPACE) !=0 && cvar.bhop_autoduck )
{
bhop_standup_state = false;
gEngfuncs.pfnClientCmd("-duck");
}
if ( bhop_standup_state == true && (me.pmMoveType == 5))
{
gEngfuncs.pfnClientCmd("-duck");
}
if(JumpInNextFrame)
{
JumpInNextFrame=false;
cmd->buttons|=IN_JUMP;
goto bhopfuncend;
}
if(StrafeBhop !=0 && !Gstrafe)
{
if ( cvar.bhop_autoduck )
{
if ( me.pmflHeight >= 30 && me.pmflHeight <= 64 && bhop_standup_state == false && me.pmMoveType != 5)
{
gEngfuncs.pfnClientCmd("+duck");
bhop_standup_state = true;
me.flDuckTimeMax = gEngfuncs.GetClientTime();
balance_bh = true;
}
}
cmd->buttons &= ~IN_JUMP;
if( ((!lastFramePressedJump)|| me.pmFlags&FL_ONGROUND || me.pmwaterlevel >= 2 || me.pmMoveType==5 || me.pmflHeight<=2)/* && !jumpbug*/)
{
if(true)
{
if(cvar.bhop_nsd)
{
if((int)me.pmfSpeed <= 299 && !Strafe)
{
Speedbot.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 > cvar.bhop_cnt_rand_max)
{
cvar.bhop_cnt_rand_min = cvar.bhop_cnt_rand_max;
}
if(cvar.bhop_cnt_rand_min <= 1)
{
cvar.bhop_cnt_rand_min = 1;
}
if(cvar.bhop_cnt_rand_min > 20)
{
cvar.bhop_cnt_rand_min = 20;
}
if(cvar.bhop_cnt_rand_max > 20)
{
cvar.bhop_cnt_rand_max = 20;
}
if(cvar.bhop_cnt_rand_max <= 1)
{
cvar.bhop_cnt_rand_max = 1;
}
if(cvar.bhop_cnt_rand)
inAirBhopCnt = (int)RandomFloat((int)cvar.bhop_cnt_rand_min,(int)cvar.bhop_cnt_rand_max);
else
inAirBhopCnt = cvar.bhop_cnt;
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 = cmd->buttons&IN_JUMP;
}
//***************************************************************************
double _my_abs(double n)
{
if (n >= 0)return n; //if positive, return without ant change
else return 0 - n; //if negative, return a positive version
}
void StrafeBot::JumpBugger(float frametime, struct usercmd_s *cmd)
{
static int state=0;
bool autojb=false;
if(cvar.jumpbugauto !=0 && me.pmflFallSpeed>=PLAYER_MAX_SAFE_FALL_SPEED)
if(me.pmflHeight-(me.pmflFallSpeed*frametime/cvar.wavspeed *15)<=0)
autojb=true;
if((Jumpbug||autojb)&& me.pmflFallSpeed>0)
{
bool curveang=false;
float fpheight=0;
if(me.pmflGroundAngle>1)
{
curveang=true;
Vector vTemp = me.pmvOrigin;
vTemp[2] -= 8192;
pmtrace_t *trace = PM_TraceLine(me.pmvOrigin, vTemp, 1, 2, -1);
fpheight=abs(me.pmvOrigin.z-trace->endpos.z-(me.pmiUseHull==1?18.0f:36.0f));
}
else fpheight=me.pmflHeight;
static float last_h=0.0f;
float cur_frame_zdist=abs((me.pmflFallSpeed+(800*frametime))*frametime);
cmd->buttons|=IN_DUCK;
cmd->buttons&=~IN_JUMP;
switch(state)
{
case 1:
cmd->buttons&=~IN_DUCK;
cmd->buttons|=IN_JUMP;
state=2;
break;
case 2:
state=0;
break;
default:
if(_my_abs(fpheight-cur_frame_zdist*1.5)<=(20.0)&&cur_frame_zdist>0.0f)
{
float needspd=_my_abs(fpheight-(19.0));
float scale=abs(needspd/cur_frame_zdist);
Speedbot.AdjustSpeed(scale);
state=1;
}
break;
}
last_h=fpheight;
}
else state=0;
}
//***************************************************************************
void SlowVerticalVel(float to, float frametime, usercmd_s *cmd)
{
float bvel = ((me.pmfVSpeed + me.pmfVSpeed*frametime) - to) / (frametime * 100);
float vspeed[3] = { me.pmvVelocity.x / me.pmfVSpeed,me.pmvVelocity.y / me.pmfVSpeed,0.0f };
float va_speed[3];
VectorAngles(vspeed, va_speed);
float adif = va_speed[1] - cmd->viewangles[1];
while (adif<-180)adif += 360;
while (adif>180)adif -= 360;
cmd->forwardmove = -bvel;
cmd->sidemove = 0;
if (!cmd->buttons&IN_JUMP && !cmd->buttons&IN_DUCK) cmd->buttons = 0;
RotateInvisible(-(va_speed[1] - cmd->viewangles[1]), 0, cmd);
}
void StrafeBot::JumpBug(float frametime, usercmd_s *cmd)
{
static float NeedOffset;
static int state;
bool autojb = false;
if ((cvar.jumpbugauto != 0 && me.pmflFallSpeed >= 504.8) && (me.pmflHeight - (me.pmflFallSpeed*frametime / cvar.wavspeed * 15) <= 0)) autojb = true;
if ((autojb || Jumpbug) && me.pmflFallSpeed > 0)
{
static float last_h;
bool curveang = false;
if (me.pmflGroundAngle == 45.0) NeedOffset = 20.0;
else NeedOffset = 19.0;
if (cvar.jumpbugslow)
{
if (me.pmflGroundAngle > 1)
{
if (me.pmfSpeed > 1 && me.pmflHeight <= cvar.jumpbugslow * 4 + (me.pmfSpeed / me.pmflFallSpeed)) curveang = true;
if (me.pmfSpeed > 10 && me.pmflHeight <= 504 * frametime * 7) Speedbot.AdjustSpeed(cvar.jumpbugslowspeed);
}
} float cur_frame_zdist = abs((me.pmflFallSpeed + (800 * frametime))*frametime);
cmd->buttons |= IN_DUCK;
cmd->buttons &= ~IN_JUMP;
if (cvar.jumpbugslow && curveang) SlowVerticalVel(0, frametime, cmd);
switch (state)
{
case 1:
cmd->buttons &= ~IN_DUCK;
cmd->buttons |= IN_JUMP;
state = 2;
break;
case 2:
state = 0;
break;
default:
if (abs(me.pmflHeight - cur_frame_zdist*1.5) <= 20.0 && cur_frame_zdist > 0.0f)
{
float needspd = abs(me.pmflHeight - (me.bPlayerjb ? 19.0 : NeedOffset));
float scale = abs(needspd / cur_frame_zdist);
Speedbot.AdjustSpeed(scale);
state = 1;
}
break;
}
last_h = me.pmflHeight;
}
else state = 0;
}
//***************************************************************************
void StrafeBot::StrafeHelper(float frametime, struct usercmd_s *cmd)
{
if(me.pmfSpeed > 0)
{
static int lastdir=0;
static int strafe_counter=0;
static int strafe_num=0;
if(me.pmFlags&FL_ONGROUND||me.pmMoveType==5||!(me.pmwaterlevel < 2)||(me.pmflGroundAngle>45.9&&me.pmflHeight<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)
{
cvar.strafe_helper_max_strafe_rand_min = cvar.strafe_helper_max_strafe_rand_max;
}
if( cvar.strafe_helper_max_strafe_rand_min <= 1 )
{
cvar.strafe_helper_max_strafe_rand_min = 1;
}
if( rand_strafe == true )
{
cvar.strafe_helper_max_strafe = RandomFloat(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.pmfAngleSpeed<0)
{
lastdir=-1;
strafe_counter++;
strafe_num=0;
nobuttons=3;
}
if(lastdir!=1&&me.pmfAngleSpeed>0)
{
lastdir=1;
strafe_counter++;
strafe_num=0;
nobuttons=3;
}
strafe_num++;
if(strafe_counter<=(cvar.strafe_helper_max_strafe) && cvar.strafe_helper_add_strafe)
{
switch(cvar.strafe_dir)
{
case 1://forward
if(me.pmfAngleSpeed<0){cmd->buttons|=IN_MOVELEFT;cmd->buttons&=~IN_MOVERIGHT;}//mouse left - left
if(me.pmfAngleSpeed>0){cmd->buttons|=IN_MOVERIGHT;cmd->buttons&=~IN_MOVELEFT;}//mouse right - right
break;
case 3: // back
if(me.pmfAngleSpeed<0){cmd->buttons|=IN_MOVERIGHT;cmd->buttons&=~IN_MOVELEFT;}//mouse left - right
if(me.pmfAngleSpeed>0){cmd->buttons|=IN_MOVELEFT;cmd->buttons&=~IN_MOVERIGHT;}//mouse right - left
break;
case 4://left
if(me.pmfAngleSpeed<0){cmd->buttons|=IN_BACK;cmd->buttons&=~IN_FORWARD;}//mouse left - back
if(me.pmfAngleSpeed>0){cmd->buttons|=IN_FORWARD;cmd->buttons&=~IN_BACK;}//mouse right - forward
break;
case 2://right
if(me.pmfAngleSpeed<0){cmd->buttons|=IN_FORWARD;cmd->buttons&=~IN_BACK;}//mouse left - forward
if(me.pmfAngleSpeed>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)
{
cvar.strafe_helper_move_rand_min = cvar.strafe_helper_move_rand_max;
}
if(cvar.strafe_helper_move_rand_max > 400)
{
cvar.strafe_helper_move_rand_max = 400;
}
if(cvar.strafe_helper_move_rand_max <= 1)
{
cvar.strafe_helper_move_rand_max = 1;
}
if(cvar.strafe_helper_move_rand_min < 50)
{
cvar.strafe_helper_move_rand_min = 50;
}
if(cvar.strafe_helper_move_rand_min > 400)
{
cvar.strafe_helper_move_rand_min = 400;
}
cvar.strafe_helper_move = RandomFloat(cvar.strafe_helper_move_rand_min,cvar.strafe_helper_move_rand_max);
}
double ms = me.pmfSpeed/me.pmMaxSpeed;
sidespeed += cvar.strafe_helper_move*(me.pmfAngleSpeed<0?-1:1);
forwardspeed = cvar.strafe_helper_main/ms;
if(me.pmfAngleSpeed>0.0f||me.pmfAngleSpeed<0.0f)
{
switch(cvar.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;
}
}
}
}
}
#include "client.h"
SpeedBot Speedbot;
//***************************************************************************
DWORD SpeedPtr;
DWORD dwSpeedptr = 0;
DWORD GetModuleSize(const DWORD Address){return PIMAGE_NT_HEADERS(Address + (DWORD)PIMAGE_DOS_HEADER(Address)->e_lfanew)->OptionalHeader.SizeOfImage;}
DWORD FarProc(const DWORD Address, DWORD LB, DWORD HB){return ( (Address < LB) || (Address > HB) );}
#define RENDERTYPE_UNDEFINED 0
#define RENDERTYPE_SOFTWARE 1
#define RENDERTYPE_HARDWARE 2
#define CompareMemory2(Buff1, Buff2, Size) __comparemem((const UCHAR *)Buff1, (const UCHAR *)Buff2, (UINT)Size)
#define FindMemoryClone2(Start, End, Clone, Size) __findmemoryclone((const ULONG)Start, (const ULONG)End, (const ULONG)Clone, (UINT)Size)
#define FindReference2(Start, End, Address) __findreference((const ULONG)Start, (const ULONG)End, (const ULONG)Address)
//***************************************************************************
void SpeedBot::AdjustSpeed( double x )
{
if(dwSpeedptr == 0)
{
dwSpeedptr = SpeedPtr;
}
static double LastSpeed=1;
if(x!=LastSpeed)
{
*(double*)dwSpeedptr = (x * 1000);
LastSpeed=x;
}
}
//***************************************************************************
BOOL __comparemem(const UCHAR *buff1, const UCHAR *buff2, UINT size)
{
for (UINT i = 0; i < size; i++, buff1++, buff2++)
{
if ((*buff1 != *buff2) && (*buff2 != 0xFF))
return FALSE;
}
return TRUE;
}
//***************************************************************************
ULONG __findmemoryclone(const ULONG start, const ULONG end, const ULONG clone, UINT size)
{
for (ULONG ul = start; (ul + size) < end; ul++)
{
if (CompareMemory2(ul, clone, size))
return ul;
}
return NULL;
}
//***************************************************************************
ULONG __findreference(const ULONG start, const ULONG end, const ULONG address)
{
UCHAR Pattern[5];
Pattern[0] = 0x68;
*(ULONG*)&Pattern[1] = address;
return FindMemoryClone2(start, end, Pattern, sizeof(Pattern)-1);
}
//***************************************************************************
void *SpeedBot::SpeedHackPtr(void)
{
DWORD Old = NULL;
PCHAR String = "Texture load: %6.1fms";
DWORD Address = (DWORD)FindMemoryClone2(HwBase, HwBase+HwSize, String, strlen(String));
void* SpeedPtr = (void*)*(DWORD*)(FindReference2(HwBase, HwBase+HwSize, Address) - 7);
if ( FarProc((DWORD)SpeedPtr,HwBase,HwEnd) )
{
// MessageBox("Couldn't find SpeedPtr pointer.");
}
else
VirtualProtect(SpeedPtr,sizeof(double),PAGE_READWRITE,&Old);
return SpeedPtr;
}
//***************************************************************************
/*void *SpeedBot::SpeedHackPtr(void) //if use this then not need Initialize
{
unsigned long HwBase = (unsigned long)GetModuleHandle(NULL);
unsigned long HwSize = (unsigned long)0x2116000;
unsigned long HwEnd = HwBase + HwSize - 1;
DWORD Old = NULL;
PCHAR String = "Texture load: %6.1fms";
DWORD Address = (DWORD)FindMemoryClone2(HwBase, HwBase+HwSize, String, strlen(String));
void* SpeedPtr = (void*)*(DWORD*)(FindReference2(HwBase, HwBase+HwSize, Address) - 7);
if ( FarProc((DWORD)SpeedPtr,HwBase,HwEnd) )
{
// MessageBox("Couldn't find SpeedPtr pointer.");
}
else
VirtualProtect(SpeedPtr,sizeof(double),PAGE_READWRITE,&Old);
return SpeedPtr;
}*/
//***************************************************************************
bool SpeedBot::Initialize(void) //then not need this..............
{
BYTE HLType = RENDERTYPE_UNDEFINED;
HwBase = (DWORD)GetModuleHandle("hw.dll"); // Hardware
if ( HwBase == NULL )
{
HwBase = (DWORD)GetModuleHandle("sw.dll"); // Software
if ( HwBase == NULL )
{
HwBase = (DWORD)GetModuleHandle(NULL); // Non-Steam?
if ( HwBase == NULL ) // Unknown client type
{
//MessageBox("Unknown client type.");
}
else
HLType = RENDERTYPE_UNDEFINED;
}
else
HLType = RENDERTYPE_SOFTWARE;
}
else
HLType = RENDERTYPE_HARDWARE;
HwSize = (DWORD)GetModuleSize(HwBase);
if ( HwSize == NULL )
{
switch(HwSize)
{
case RENDERTYPE_HARDWARE: {HwSize = 0x122A000;}break;
case RENDERTYPE_UNDEFINED: {HwSize = 0x2116000;}break;
case RENDERTYPE_SOFTWARE: {HwSize = 0xB53000;}break;
default: {/*MessageBox("Couldn't find module size.");*/}break;
}
}
HwEnd = HwBase + HwSize - 1;
return (HwBase);
}
//***************************************************************************
If you notice any mistakes i have done please help a noob
I am testing these things atm, unsure what cvars to add to menu as there is so many of them.
//strafe main
REGISTER_CVAR_INT( strafehack ,0) //1-2
REGISTER_CVAR_INT( strafeautodir ,0)
REGISTER_CVAR_INT( groundstrafe ,0) //1-2
REGISTER_CVAR_INT( bhop ,0) //1-2
REGISTER_CVAR_INT( jumpbug ,0) //1-2
REGISTER_CVAR_INT( fastrun ,0) //1-2
REGISTER_CVAR_INT( strafe_helper ,0)
//strafe settings
REGISTER_CVAR_INT( strafe_dir ,1) // 1-4
REGISTER_CVAR_INT( strafe_crazy ,0)
REGISTER_CVAR_INT( strafe_invisible ,1)
REGISTER_CVAR_INT( strafe_speed ,69)
REGISTER_CVAR_FLOAT( strafe_sidemove ,437.8928)
REGISTER_CVAR_INT( strafe_angle ,30)
REGISTER_CVAR_INT( fastrun_nsd ,0)
REGISTER_CVAR_INT( gstrafe_standup ,0)
REGISTER_CVAR_INT( gstrafe_bhop ,0)
REGISTER_CVAR_FLOAT( gstrafe_nsd ,1.0)
REGISTER_CVAR_INT( bhop_nsd ,1)
REGISTER_CVAR_INT( bhop_autoduck ,0)
REGISTER_CVAR_INT( bhop_cnt_rand_min ,0)
REGISTER_CVAR_INT( bhop_cnt_rand_max ,12)
REGISTER_CVAR_INT( bhop_cnt_rand ,1)
REGISTER_CVAR_INT( bhop_cnt ,4)
REGISTER_CVAR_INT( jumpbugauto ,0)
REGISTER_CVAR_INT( jumpbugslow ,100)
REGISTER_CVAR_INT( jumpbugslowspeed ,1)
REGISTER_CVAR_INT( strafe_helper_boost ,0)
REGISTER_CVAR_INT( strafe_helper_add_strafe ,1)
REGISTER_CVAR_INT( strafe_helper_max_strafe_rand ,0)
REGISTER_CVAR_INT( strafe_helper_max_strafe_rand_min ,3)
REGISTER_CVAR_INT( strafe_helper_max_strafe_rand_max ,6)
REGISTER_CVAR_INT( strafe_helper_max_strafe ,6)
REGISTER_CVAR_INT( strafe_helper_main ,30)
REGISTER_CVAR_INT( strafe_helper_move_rand ,1)
REGISTER_CVAR_INT( strafe_helper_move_rand_min ,50)
REGISTER_CVAR_INT( strafe_helper_move_rand_max ,400)
REGISTER_CVAR_INT( strafe_helper_move ,400)
REGISTER_CVAR_INT( slowdown ,0)
|