From d2468fcc0bd63e163a7a0564fa37b7880e2209df Mon Sep 17 00:00:00 2001 From: Justin Berger Date: Wed, 21 Mar 2018 09:23:36 -0600 Subject: Fixed nullptr issue in poser_sba --- redist/linmath.c | 3 +++ redist/linmath.h | 3 +++ 2 files changed, 6 insertions(+) (limited to 'redist') diff --git a/redist/linmath.c b/redist/linmath.c index 16f771e..d005074 100644 --- a/redist/linmath.c +++ b/redist/linmath.c @@ -653,3 +653,6 @@ void InvertPose(LinmathPose *poseout, const LinmathPose *pose) { quatrotatevector(poseout->Pos, poseout->Rot, pose->Pos); scale3d(poseout->Pos, poseout->Pos, -1); } + +LinmathQuat LinmathQuat_Identity = {1.0}; +LinmathPose LinmathPose_Identity = {.Rot = {1.0}}; diff --git a/redist/linmath.h b/redist/linmath.h index 782a13d..cacb1c6 100644 --- a/redist/linmath.h +++ b/redist/linmath.h @@ -56,6 +56,9 @@ typedef struct LinmathPose { LinmathQuat Rot; } LinmathPose; +extern LinmathQuat LinmathQuat_Identity; +extern LinmathPose LinmathPose_Identity; + //NOTE: Inputs may never be output with cross product. void cross3d( FLT * out, const FLT * a, const FLT * b ); -- cgit v1.2.3