Advertisement
encoree1996

Untitled

Apr 20th, 2015
257
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1.  
  2. BOOL CEngine::IsVisible(IClientEntity* pLocalBaseEntity, IClientEntity* pBaseEntity)
  3. {
  4. trace_t tr;
  5. Ray_t ray ;
  6. CTraceFilter filter;
  7. filter.pSkip = pLocalBaseEntity;
  8. Vector begin = cEng.GetEyePosition(pLocalBaseEntity)/* + Vector(5, 5, 5)*/, end;
  9. if(!cEng.GetBonePosition(pBaseEntity, end, 10))
  10. return false ;
  11. ray.Init(begin, end);
  12. pEngineTrace->TraceRay(ray, 0x4600400B, &filter, &tr);
  13. //doTrace(begin, end, 0x46004003, pLocalBaseEntity, 0, &tr);
  14. //return tr.fraction >= 0.97f || (tr.m_pEntityHit && tr.m_pEntityHit == (DWORD*)pBaseEntity) || tr.allsolid || tr.startsolid;
  15. if(tr.fraction >= 0.97f)
  16. return 1;
  17. return 0;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement