Skip to content

Commit

Permalink
Adjust debug visualization to changes in Draw3D
Browse files Browse the repository at this point in the history
  • Loading branch information
szapp committed Oct 29, 2017
1 parent e15c047 commit ee59e53
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions _work/data/Scripts/Content/GFA/_intern/aimRay.d
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ func int GFA_AimRay(var int distance, var int focusType, var int vobPtr, var int
subf(intersection[2], f5),
addf(intersection[0], f5),
addf(intersection[1], f5),
addf(intersection[2], f5), -1);
addf(intersection[2], f5));

// Trace ray trajectory
UpdateLine3(GFA_DebugTRTrj,
Expand All @@ -311,15 +311,15 @@ func int GFA_AimRay(var int distance, var int focusType, var int vobPtr, var int
traceRayVec[2],
addf(traceRayVec[0], traceRayVec[3]),
addf(traceRayVec[1], traceRayVec[4]),
addf(traceRayVec[2], traceRayVec[5]), -1);
addf(traceRayVec[2], traceRayVec[5]));

// Focus vob bounding box
if (foundVob) {
UpdateBBoxAddr(GFA_DebugTRBBoxVob, foundVob+zCVob_bbox3D_offset, -1);
UpdateBBoxAddr(GFA_DebugTRBBoxVob, foundVob+zCVob_bbox3D_offset);
} else {
const int QUARTER_BBOX_SIZE = sizeof_zTBBox3D/4;
var int empty[QUARTER_BBOX_SIZE];
UpdateBBoxAddr(GFA_DebugTRBBoxVob, _@(empty), -1);
UpdateBBoxAddr(GFA_DebugTRBBoxVob, _@(empty));
};
};
};
Expand Down
8 changes: 4 additions & 4 deletions _work/data/Scripts/Content/GFA/_intern/criticalHit.d
Original file line number Diff line number Diff line change
Expand Up @@ -135,14 +135,14 @@ func int GFA_CH_DetectIntersectionWithNode(var int npcPtr, var string nodeName,

// Debug visualization
if (BBoxVisible(GFA_DebugWSBBox)) {
UpdateBBoxAddr(GFA_DebugWSBBox, bboxPtr, -1);
UpdateBBoxAddr(GFA_DebugWSBBox, bboxPtr);
};

// Prevent debug drawing of oriented bounding box
if (OBBoxVisible(GFA_DebugWSOBBox)) {
const int QUARTER_BBOX_SIZE = sizeof_zTBBox3D/4;
var int emptyBBox[QUARTER_BBOX_SIZE];
UpdateOBBoxAddr(GFA_DebugWSOBBox, _@(emptyBBox), -1);
UpdateOBBoxAddr(GFA_DebugWSOBBox, _@(emptyBBox));
};

// Detect collision
Expand Down Expand Up @@ -210,14 +210,14 @@ func int GFA_CH_DetectIntersectionWithNode(var int npcPtr, var string nodeName,

// Debug visualization
if (OBBoxVisible(GFA_DebugWSOBBox)) {
UpdateOBBoxAddr(GFA_DebugWSOBBox, obboxPtr, -1);
UpdateOBBoxAddr(GFA_DebugWSOBBox, obboxPtr);
};

// Prevent debug drawing of bounding box
if (BBoxVisible(GFA_DebugWSBBox)) {
const int QUARTER_OBBOX_SIZE = sizeof_zCOBBox3D/4;
var int emptyOBBox[QUARTER_OBBOX_SIZE];
UpdateBBoxAddr(GFA_DebugWSBBox, _@(emptyOBBox), -1);
UpdateBBoxAddr(GFA_DebugWSBBox, _@(emptyOBBox));
};

// Detect collision
Expand Down
2 changes: 1 addition & 1 deletion _work/data/Scripts/Content/GFA/_intern/rangedShooting.d
Original file line number Diff line number Diff line change
Expand Up @@ -712,7 +712,7 @@ func int GFA_RefinedProjectileCollisionCheck(var int vobPtr, var int arrowAI) {
GFA_CollTrj[2],
addf(GFA_CollTrj[0], GFA_CollTrj[3]),
addf(GFA_CollTrj[1], GFA_CollTrj[4]),
addf(GFA_CollTrj[2], GFA_CollTrj[5]), -1);
addf(GFA_CollTrj[2], GFA_CollTrj[5]));
};

return +hit;
Expand Down

0 comments on commit ee59e53

Please sign in to comment.