-
-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[add] tracing [add] visible check example (search for "@note: this is a simple example of how to check if the player is visible") [add] bone cache in CSkeletonInstance [add] Matrix4x2 struct [change] update product string version
- Loading branch information
Showing
11 changed files
with
312 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
// used: game trace manager | ||
#include "cgametracemanager.h" | ||
// used: c_csplayerpawn | ||
#include "../../sdk/entity.h" | ||
|
||
SurfaceData_t* GameTrace_t::GetSurfaceData() | ||
{ | ||
using fnGetSurfaceData = std::uint64_t(__fastcall*)(void*); | ||
static fnGetSurfaceData oGetSurfaceData = reinterpret_cast<fnGetSurfaceData>(MEM::GetAbsoluteAddress(MEM::FindPattern(CLIENT_DLL, CS_XOR("E8 ? ? ? ? 48 85 C0 74 ? 44 38 60")), 0x1, 0x0)); | ||
|
||
#ifdef CS_PARANOID | ||
CS_ASSERT(oGetSurfaceData != nullptr); | ||
#endif | ||
|
||
return reinterpret_cast<SurfaceData_t*>(oGetSurfaceData(m_pSurface)); | ||
} | ||
|
||
int GameTrace_t::GetHitboxId() | ||
{ | ||
if (m_pHitboxData) | ||
return m_pHitboxData->m_nHitboxId; | ||
return 0; | ||
} | ||
|
||
int GameTrace_t::GetHitgroup() | ||
{ | ||
if (m_pHitboxData) | ||
return m_pHitboxData->m_nHitGroup; | ||
return 0; | ||
} | ||
|
||
bool GameTrace_t::IsVisible() const | ||
{ | ||
return (m_flFraction > 0.97f); | ||
} | ||
|
||
TraceFilter_t::TraceFilter_t(std::uint64_t uMask, C_CSPlayerPawn* pSkip1, C_CSPlayerPawn* pSkip2, int nLayer) | ||
{ | ||
m_uTraceMask = uMask; | ||
m_v1[0] = m_v1[1] = 0; | ||
m_v2 = 7; | ||
m_v3 = nLayer; | ||
m_v4 = 0x49; | ||
m_v5 = 0; | ||
|
||
if (pSkip1 != nullptr) | ||
{ | ||
m_arrSkipHandles[0] = pSkip1->GetRefEHandle().GetEntryIndex(); | ||
m_arrSkipHandles[2] = pSkip1->GetOwnerHandleIndex(); | ||
m_arrCollisions[0] = pSkip1->GetCollisionMask(); | ||
} | ||
|
||
if (pSkip2 != nullptr) | ||
{ | ||
m_arrSkipHandles[0] = pSkip2->GetRefEHandle().GetEntryIndex(); | ||
m_arrSkipHandles[2] = pSkip2->GetOwnerHandleIndex(); | ||
m_arrCollisions[0] = pSkip2->GetCollisionMask(); | ||
} | ||
} |
Oops, something went wrong.