-
Автор темы
- #1
Кто-нибудь может помочь с IsVisible? Есть такой код, но всегда возвращает false. Пробовал смещение 280, наоборот всегда true...Было норм, но в последних обновах что-то поменяли, теперь не робит.
C++:
bool IsVisible(Vec3 at, Vec3 to)
{
RayHit hit;
return !SSGE::Singleton()->GetIPhysicalWorld()->RayWorldIntersection(to, at - to, 0x100 | 0x1, 0xA | 0x400, &hit, 1);
}
C++:
int RayWorldIntersection(const Vec3& org, const Vec3& dir, int objtypes, unsigned int flags, RayHit* hits, int nMaxHits, IPhysicalEntity** pSkipEnts = 0, int nSkipEnts = 0, void* pForeignData = 0, int iForeignData = 0, const char* pNameTag = XorStr("RayWorldIntersection(Game)"), RayHitCached* phitLast = 0, int iCaller = 4)
{
using oRayWorldIntersection = int(__fastcall*)(PVOID, const Vec3&, const Vec3&, int, unsigned int, RayHit*, int, IPhysicalEntity**, int, void*, int, const char*, RayHitCached*, int);
return virindex<oRayWorldIntersection>(this, 776)(this, org, dir, objtypes, flags, hits, nMaxHits, pSkipEnts,
nSkipEnts, pForeignData, iForeignData, pNameTag, phitLast, iCaller);
}