void CBasePlayer::PreThink(void) { ... if (pev->button & IN_JUMP) Jump(); if ((pev->button & IN_DUCK) || FBitSet(pev->flags, FL_DUCKING) || (m_afPhysicsFlags & PFLAG_DUCKING)) Duck(); .... }