FIx tele issue
This commit is contained in:
parent
30ff0d1923
commit
a62f8ae9d8
@ -66,6 +66,7 @@ public:
|
||||
offset_t m_flTeleCurrentRechargeDuration;
|
||||
offset_t m_iTeleTimesUsed;
|
||||
offset_t m_flTeleYawToExit;
|
||||
offset_t m_bMatchBuilding;
|
||||
offset_t iPipeType;
|
||||
offset_t iBuildingHealth;
|
||||
offset_t iBuildingMaxHealth;
|
||||
|
@ -138,6 +138,7 @@ void NetVars::Init()
|
||||
gNetvars.get_offset("DT_ObjectTeleporter", "m_iTimesUsed");
|
||||
this->m_flTeleYawToExit =
|
||||
gNetvars.get_offset("DT_ObjectTeleporter", "m_flYawToExit");
|
||||
this->m_bMatchBuilding = gNetvars.get_offset("DT_ObjectTeleporter", "m_bMatchBuilding");;
|
||||
this->iPipeType =
|
||||
gNetvars.get_offset("DT_TFProjectile_Pipebomb", "m_iType");
|
||||
this->iBuildingHealth =
|
||||
|
@ -532,8 +532,8 @@ CatCommand debug_tele("navbot_debug", "debug", []() {
|
||||
if (CE_BAD(ent))
|
||||
return;
|
||||
logging::Info(
|
||||
"%d %d %d %f %f %d %f %f %f", CE_INT(ent, netvar.m_iObjectType),
|
||||
CE_INT(ent, netvar.m_bBuilding), CE_INT(ent, netvar.m_iTeleState),
|
||||
"%d %u %d %d %f %f %d %f %f %f", CE_INT(ent, netvar.m_iObjectType),
|
||||
CE_BYTE(ent, netvar.m_bBuilding), CE_INT(ent, netvar.m_iTeleState), CE_INT(ent, netvar.m_bMatchBuilding),
|
||||
CE_FLOAT(ent, netvar.m_flTeleRechargeTime),
|
||||
CE_FLOAT(ent, netvar.m_flTeleCurrentRechargeDuration),
|
||||
CE_INT(ent, netvar.m_iTeleTimesUsed),
|
||||
@ -591,7 +591,7 @@ static HookedFunction
|
||||
CachedEntity *ent = ENTITY(idx);
|
||||
if (CE_GOOD(ent) && ent->m_flDistance() < 300.0f)
|
||||
if (CE_FLOAT(ent, netvar.m_flTeleYawToExit) &&
|
||||
CE_FLOAT(ent, netvar.m_flTeleRechargeTime) &&
|
||||
CE_INT(ent, netvar.m_iTeleState) == 2 &&
|
||||
CE_FLOAT(ent, netvar.m_flTeleRechargeTime) <
|
||||
g_GlobalVars->curtime)
|
||||
{
|
||||
|
Reference in New Issue
Block a user