Better vischeck
This commit is contained in:
parent
3ad37e402e
commit
fbf16c1197
@ -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)
|
||||
{
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user