mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2026-10-10 20:03:09 +08:00
Tp, Paintgun, refractor rainbow controller, refractor raycast (#1708)
This commit is contained in:
@@ -69,6 +69,34 @@ namespace big::entity
|
||||
return (bool)hit;
|
||||
}
|
||||
|
||||
inline bool raycast(Vector3* endcoor)
|
||||
{
|
||||
Entity ent;
|
||||
BOOL hit;
|
||||
Vector3 surfaceNormal;
|
||||
|
||||
Vector3 camCoords = CAM::GET_GAMEPLAY_CAM_COORD();
|
||||
Vector3 dir = math::rotation_to_direction(CAM::GET_GAMEPLAY_CAM_ROT(2));
|
||||
Vector3 farCoords;
|
||||
|
||||
farCoords.x = camCoords.x + dir.x * 1000;
|
||||
farCoords.y = camCoords.y + dir.y * 1000;
|
||||
farCoords.z = camCoords.z + dir.z * 1000;
|
||||
|
||||
int ray = SHAPETEST::START_EXPENSIVE_SYNCHRONOUS_SHAPE_TEST_LOS_PROBE(camCoords.x,
|
||||
camCoords.y,
|
||||
camCoords.z,
|
||||
farCoords.x,
|
||||
farCoords.y,
|
||||
farCoords.z,
|
||||
-1,
|
||||
0,
|
||||
7);
|
||||
SHAPETEST::GET_SHAPE_TEST_RESULT(ray, &hit, endcoor, &surfaceNormal, &ent);
|
||||
|
||||
return (bool)hit;
|
||||
}
|
||||
|
||||
inline bool network_has_control_of_entity(rage::netObject* net_object)
|
||||
{
|
||||
return !net_object || !net_object->m_next_owner_id && (net_object->m_control_id == -1);
|
||||
|
||||
Reference in New Issue
Block a user