Стрейфы на 470+ юнитов!
Код
boolbStrafeProcess;
void fpson() { g_Engine.pfnClientCmd("exec +fps.cfg"); g_Local.bFPS = true; }
void fpsoff() { g_Engine.pfnClientCmd("exec -fps.cfg"); g_Local.bFPS = false; }
void STR_ON() {
if(cvar.strafe_fps->value)
{ fpson(); }
bStrafeProcess = true;
}
void STR_OFF() {
if(cvar.strafe_fps->value)
{ fpsoff(); }
bStrafeProcess = false;
}
//HUD_Frame:
cvar.strafe_fps = g_Engine.pfnRegisterVariable("nx0_strafe_fps","1",0);
g_Engine.pfnAddCommand("+nx0_strafe",STR_ON);
g_Engine.pfnAddCommand("-nx0_strafe",STR_OFF);
//CL_CreateMove:
if(bStrafeProcess && !(g_Local.iFlags&FL_ONGROUND))
{
cmd->forwardmove = 23.3 / ( g_Local.flXYspeed / g_Local.flMaxSpeed );
static bool Strafing;
if(Strafing)
{
cmd->sidemove = -310;
Strafing = false;
}
else
{
cmd->sidemove = +310;
Strafing = true;
}
}