press a to be gay today
This commit is contained in:
parent
0057c1c74d
commit
f956909c02
@ -200,13 +200,13 @@ void WorldTick()
|
||||
if (corneractivate)
|
||||
{
|
||||
Vector indirectOrigin =
|
||||
VischeckCorner(LOCAL_E, entity, 500,
|
||||
VischeckCorner(LOCAL_E, entity, float(follow_activation) / 2,
|
||||
true); // get the corner location that the
|
||||
// future target is visible from
|
||||
std::pair<Vector, Vector> corners;
|
||||
if (!indirectOrigin.z && entity->m_IDX == lastent) // if we couldn't find it, run wallcheck instead
|
||||
{
|
||||
corners = VischeckWall(LOCAL_E, entity, 500, true);
|
||||
corners = VischeckWall(LOCAL_E, entity, float(follow_activation) / 2, true);
|
||||
if (!corners.first.z || !corners.second.z)
|
||||
continue;
|
||||
addCrumbs(LOCAL_E, corners.first);
|
||||
|
@ -175,7 +175,7 @@ std::pair<Vector,Vector> VischeckWall(CachedEntity *player, CachedEntity *target
|
||||
// if we can see an entity, we don't need to run calculations
|
||||
if (VisCheckEntFromEnt(player, target))
|
||||
{
|
||||
std::pair<Vector, Vector> orig(origin, origin);
|
||||
std::pair<Vector, Vector> orig(origin, target->m_vecOrigin());
|
||||
if (!checkWalkable)
|
||||
return orig;
|
||||
else if (canReachVector(origin, target->m_vecOrigin()))
|
||||
@ -234,11 +234,13 @@ std::pair<Vector,Vector> VischeckWall(CachedEntity *player, CachedEntity *target
|
||||
continue;
|
||||
if (!IsVectorVisible(virtualOrigin, virtualOrigin2, true))
|
||||
continue;
|
||||
if (!IsVectorVisible(virtualOrigin2, target->m_vecOrigin(), true))
|
||||
continue;
|
||||
std::pair<Vector, Vector> toret(virtualOrigin, virtualOrigin2);
|
||||
if (!checkWalkable)
|
||||
return toret;
|
||||
// check if the location is accessible
|
||||
if (!canReachVector(origin, virtualOrigin) || !canReachVector(virtualOrigin2, virtualOrigin) || !canReachVector(target->m_vecOrigin(), virtualOrigin2))
|
||||
if (!canReachVector(origin, virtualOrigin) || !canReachVector(virtualOrigin2, virtualOrigin))
|
||||
continue;
|
||||
if (canReachVector(virtualOrigin2, target->m_vecOrigin()))
|
||||
return toret;
|
||||
|
Reference in New Issue
Block a user