client.cpp
find this: Code:
if (cvar.jump && (usercmd->buttons & IN_JUMP) && !(me.pmFlags & FL_ONGROUND)) usercmd->buttons &= ~IN_JUMP;
replace all with this: Code:
if (cvar.jump && (usercmd->buttons & IN_JUMP) && !(me.pmFlags & FL_ONGROUND)) usercmd->buttons &= ~IN_JUMP;
if (cvar.autojump && me.pmFlags & FL_ONGROUND)
{
if (target!=-1)
{
usercmd->buttons |= IN_JUMP;
}
}
if (cvar.duck && !(me.pmFlags & FL_ONGROUND) && me.pmVelocity[2]>0) usercmd->buttons |= IN_DUCK;
if (cvar.autoduck && me.pmFlags & FL_ONGROUND)
{
if (target!=-1)
{
usercmd->buttons |= IN_DUCK;
}
}
cvar.cpp: Code:
REGISTER_CVAR_INT( autojump ,0)
REGISTER_CVAR_INT( autoduck ,0)
cvar.h: Code:
int autojump;
int autoduck;