Fix crashes in hell

This commit is contained in:
LightCat 2018-10-28 10:16:56 +01:00
parent f936f214b6
commit 496955da32
2 changed files with 4 additions and 1 deletions

View File

@ -13,6 +13,7 @@
#include <glez/draw.hpp>
#endif
#include <settings/Bool.hpp>
#include "PlayerTools.hpp"
#include <hacks/Backtrack.hpp>
static settings::Bool enable{ "backtrack.enable", "false" };
@ -124,6 +125,8 @@ void Run()
continue;
if (!pEntity->hitboxes.GetHitbox(0))
continue;
if (HasCondition<TFCond_HalloweenGhostMode>(pEntity))
continue;
float _viewangles = CE_VECTOR(pEntity, netvar.m_angEyeAngles).y;
float viewangles =
(_viewangles > 180) ? _viewangles - 360 : _viewangles;

View File

@ -257,7 +257,7 @@ void smart_crouch()
if (CE_BAD(ent) || ent->m_Type() != ENTITY_PLAYER ||
ent->m_iTeam() == LOCAL_E->m_iTeam() ||
!(ent->hitboxes.GetHitbox(0)) || !(ent->m_bAlivePlayer()) ||
player_tools::shouldTargetSteamId(ent->player_info.friendsID) !=
player_tools::shouldTarget(ent) !=
player_tools::IgnoreReason::DO_NOT_IGNORE ||
should_ignore_player(ent))
continue;