Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- BOOL CEngine::IsVisible(IClientEntity* pLocalBaseEntity, IClientEntity* pBaseEntity)
- {
- trace_t tr;
- Ray_t ray ;
- CTraceFilter filter;
- filter.pSkip = pLocalBaseEntity;
- Vector begin = cEng.GetEyePosition(pLocalBaseEntity)/* + Vector(5, 5, 5)*/, end;
- if(!cEng.GetBonePosition(pBaseEntity, end, 10))
- return false ;
- ray.Init(begin, end);
- pEngineTrace->TraceRay(ray, 0x4600400B, &filter, &tr);
- //doTrace(begin, end, 0x46004003, pLocalBaseEntity, 0, &tr);
- //return tr.fraction >= 0.97f || (tr.m_pEntityHit && tr.m_pEntityHit == (DWORD*)pBaseEntity) || tr.allsolid || tr.startsolid;
- if(tr.fraction >= 0.97f)
- return 1;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement