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