Update: try fix windows padding
This commit is contained in:
parent
d53a21fd63
commit
801bdbe06f
3 changed files with 36 additions and 25 deletions
|
|
@ -144,11 +144,15 @@ struct TraceOptions
|
|||
|
||||
struct TraceResult
|
||||
{
|
||||
Vector EndPos;
|
||||
float EndPosX;
|
||||
float EndPosY;
|
||||
float EndPosZ;
|
||||
CEntityInstance* HitEntity;
|
||||
float Fraction;
|
||||
int AllSolid;
|
||||
Vector Normal;
|
||||
float NormalX;
|
||||
float NormalY;
|
||||
float NormalZ;
|
||||
};
|
||||
|
||||
class CRayTraceInterface
|
||||
|
|
|
|||
|
|
@ -87,24 +87,24 @@ namespace RayTrace
|
|||
}
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Explicit, Size = 44)]
|
||||
public struct TraceResult
|
||||
{
|
||||
[FieldOffset(0)] public float EndPosX;
|
||||
[FieldOffset(4)] public float EndPosY;
|
||||
[FieldOffset(8)] public float EndPosZ;
|
||||
[FieldOffset(16)] public nint HitEntity;
|
||||
[FieldOffset(24)] public float Fraction;
|
||||
[FieldOffset(28)] public int AllSolid;
|
||||
[FieldOffset(32)] public float NormalX;
|
||||
[FieldOffset(36)] public float NormalY;
|
||||
[FieldOffset(40)] public float NormalZ;
|
||||
[StructLayout(LayoutKind.Explicit, Size = 48)]
|
||||
public struct TraceResult
|
||||
{
|
||||
[FieldOffset(0)] public float EndPosX;
|
||||
[FieldOffset(4)] public float EndPosY;
|
||||
[FieldOffset(8)] public float EndPosZ;
|
||||
[FieldOffset(16)] public nint HitEntity;
|
||||
[FieldOffset(24)] public float Fraction;
|
||||
[FieldOffset(28)] public int AllSolid;
|
||||
[FieldOffset(32)] public float NormalX;
|
||||
[FieldOffset(36)] public float NormalY;
|
||||
[FieldOffset(40)] public float NormalZ;
|
||||
|
||||
public Vector3 EndPos => new(EndPosX, EndPosY, EndPosZ);
|
||||
public Vector3 Normal => new(NormalX, NormalY, NormalZ);
|
||||
public bool DidHit => Fraction < 1.0f;
|
||||
public bool IsAllSolid => AllSolid != 0;
|
||||
}
|
||||
public Vector3 EndPos => new(EndPosX, EndPosY, EndPosZ);
|
||||
public Vector3 Normal => new(NormalX, NormalY, NormalZ);
|
||||
public bool DidHit => Fraction < 1.0f;
|
||||
public bool IsAllSolid => AllSolid != 0;
|
||||
}
|
||||
#endregion
|
||||
|
||||
public static class CRayTrace
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue