加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
AntiCheat_test.cpp 1.55 KB
一键复制 编辑 原始数据 按行查看 历史
#include "AntiCheat_test.h"
#include "CPlayer.h"
#include "Entities/Transports.h"
AntiCheat_test::AntiCheat_test(CPlayer* player) : AntiCheat(player, AntiCheatType_test)
{
}
bool AntiCheat_test::HandleMovement(MovementInfo& MoveInfo, Opcodes opcode, bool cheat)
{
AntiCheat::HandleMovement(MoveInfo, opcode, cheat);
if (!Initialized())
return false;
float angle = std::atan2(GetDistanceZ(), GetDistance2D()) * 180.f / M_PI_F;
m_Player->BoxChat << "cosAngle: " << newMoveInfo.GetJumpInfo().cosAngle << "\n";
m_Player->BoxChat << "sinAngle: " << newMoveInfo.GetJumpInfo().sinAngle << "\n";
m_Player->BoxChat << "velocity: " << newMoveInfo.GetJumpInfo().velocity << "\n";
m_Player->BoxChat << "xyspeed: " << newMoveInfo.GetJumpInfo().xyspeed << "\n";
m_Player->BoxChat << "cposx: " << newMoveInfo.GetPos()->x << "\n";
m_Player->BoxChat << "cposy: " << newMoveInfo.GetPos()->y << "\n";
m_Player->BoxChat << "cposz: " << newMoveInfo.GetPos()->z << "\n";
m_Player->BoxChat << "angle: " << angle << "\n";
m_Player->BoxChat << "moving: " << (IsMoving(newMoveInfo) ? "true" : "false") << "\n";
m_Player->BoxChat << "falling: " << (isFalling(newMoveInfo) ? "true" : "false") << "\n";
m_Player->BoxChat << "flying: " << (isFlying(newMoveInfo) ? "true" : "false") << "\n";
m_Player->BoxChat << "transport: " << (isTransport(newMoveInfo) ? "true" : "false") << "\n";
m_Player->BoxChat << "slowfall: " << (newMoveInfo.HasMovementFlag(MOVEFLAG_SAFE_FALL) ? "true" : "false") << "\n";
return SetOldMoveInfo(false);
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化