Better vischeck

This commit is contained in:
LightCat 2018-10-27 17:42:26 +02:00
parent 3ad37e402e
commit fbf16c1197
2 changed files with 17 additions and 1 deletions

View File

@ -107,7 +107,7 @@ class ignoremanager
Vector second = end->m_center;
first.z += 42;
second.z += 42;
return IsVectorVisible(first, second, false);
return IsVectorVisible(first, second, true);
}
static ignore_status runIgnoreChecks(CNavArea *begin, CNavArea *end)
{

View File

@ -86,6 +86,7 @@ bool trace::FilterNoPlayer::ShouldHitEntity(IHandleEntity *handle, int mask)
return false;
entity = (IClientEntity *) handle;
clazz = entity->GetClientClass();
/* Ignore invisible entities that we don't wanna hit */
switch (clazz->m_ClassID)
{
@ -129,6 +130,21 @@ void trace::FilterNoEntity::SetSelf(IClientEntity *self)
bool trace::FilterNoEntity::ShouldHitEntity(IHandleEntity *handle, int mask)
{
IClientEntity *entity;
ClientClass *clazz;
if (!handle)
return false;
entity = (IClientEntity *) handle;
clazz = entity->GetClientClass();
// Hit doors, carts, etc
switch (clazz->m_ClassID)
{
case 6:
case 7:
return true;
}
return false;
}