本文整理汇总了C++中CBaseEntity::GetClip1方法的典型用法代码示例。如果您正苦于以下问题:C++ CBaseEntity::GetClip1方法的具体用法?C++ CBaseEntity::GetClip1怎么用?C++ CBaseEntity::GetClip1使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CBaseEntity
的用法示例。
在下文中一共展示了CBaseEntity::GetClip1方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Update
void aimbot::Update()
{
lp = LocalPlayer();
dummy = 1;
if (ragebot && (!ents->GetClientEntity(ragebot) || ragebot > globals->max_clients))
ragebot = 0;
if (dod() && !lp->IsOnGround())
return;
CBaseEntity* w = lp->GetActiveWeapon();
if (!w || !w->GetClip1() || w->IsReloading() || w->IsMelee())
return;
bullet = !(w->GetNextPrimaryFire() > globals->cur_time);
dummy = 0;
}
示例2: CreateMove
void CreateMove(CUserCmd* cmd)
{
sendPacket = 1;
CBaseEntity* me = LocalPlayer();
CBaseEntity* w = me->GetActiveWeapon();
Vector qrv = cmd->viewangles;
globals->cur_time = (float)me->GetTickBase() * ReadPtr<float>(me, m_flLaggedMovementValue) * globals->interval_per_tick;
aimbot::Update();
aimbot::PerformPrediction(cmd);
bool aim = 0;
if (MENU_AIMBOTEN && (!MENU_AIMBOTKB || util::IsKeyDown(MENU_AIMBOTKB)) && !aimbot::dummy)
aim = aimbot::Think(cmd);
if (!MENU_FAKEVIEW && aim)
engine->SetViewAngles(cmd->viewangles);
nospread::HandleCmd(cmd, w);
if (MENU_NORECOIL && !aimbot::dummy)
{
nospread::FixRecoil(cmd);
NormalizeAngles(cmd->viewangles);
}
if (MENU_SEMIFULL && !aimbot::dummy && !aimbot::bullet)
del(cmd->buttons, IN_ATTACK);
if (tf2() && MENU_AUTOSTAB && w && !strcmp(w->GetClientClass()->m_pNetworkName, "CTFKnife") &&
!me->TF2_IsCloaked() && ReadPtr<bool>(w, m_bReadyToBackstab))
add(cmd->buttons, IN_ATTACK);
if (MENU_AUTORELD && w && !w->IsMelee() && !w->GetClip1() && !w->IsReloading())
{
add(cmd->buttons, IN_RELOAD);
del(cmd->buttons, IN_ATTACK);
}
if (aim)
{
if (chk(cmd->buttons, IN_ATTACK) && aimbot::bullet)
aimbot::next_shot = aimbot::target_id;
}
else
aimbot::next_shot = 0;
if (gmod() && MENU_PROPKILL && w && !strcmp(w->GetClientClass()->m_pNetworkName, "CWeaponPhysGun"))
{
static int hold = 0, punt = 0;
if (chk(cmd->buttons, IN_ATTACK))
{
float latency = engine->GetNetChannel()->GetPing();
hold = (int)((1.0f / globals->interval_per_tick) * (latency + 0.05f));
punt = (int)((1.0f / globals->interval_per_tick) * (latency + 0.2f));
}
else
{
if (hold > 0)
{
add(cmd->buttons, IN_ATTACK);
hold--;
}
if (punt > 0)
{
*cmd->mousewheel() = 0x7F;
punt--;
}
}
}
if (MENU_FAKEDUCK && css() && me->IsAlive() && me->IsOnGround() && chk(cmd->buttons, IN_DUCK) && (cmd->tick_count % 2))
{
del(cmd->buttons, IN_DUCK);
del(cmd->buttons, IN_ATTACK);
sendPacket = 0;
}
if (MENU_SMACAIMB)
{
static Vector old = cmd->viewangles;
Vector snap = (cmd->viewangles - old);
NormalizeAngles(snap);
const float smac = 42.f;
if (snap.Normalize() > smac)
//.........这里部分代码省略.........